Bug 25878 - [GLSL] sampler is converted to int successfully
Summary: [GLSL] sampler is converted to int successfully
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Ian Romanick
QA Contact:
Depends on:
Blocks: 29044
  Show dependency treegraph
Reported: 2010-01-03 17:50 UTC by Gordon Jin
Modified: 2010-08-18 19:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-01-03 17:50:17 UTC
GLSL spec 4.1.7 says "Samplers are not allowed to be operands in expressions".

But piglit/tests/glslparsertest/shaders/dataType19.frag uses sampler in constructor expression, and it gets passed in current mesa:

uniform sampler1D s;
void main()
    int i = int(s); // conversion not allowed
Comment 1 Eric Anholt 2010-08-17 08:45:24 UTC
Fixed with glsl2 merge.
Comment 2 Gordon Jin 2010-08-18 19:39:52 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.