[Mesa-dev] [Bug 97524] Samplers referring to the same texture unit with different types should raise GL_INVALID_OPERATION

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 26 00:35:53 UTC 2016


--- Comment #15 from Timothy Arceri <t_arceri at yahoo.com.au> ---
(In reply to Nicolai Hähnle from comment #10)
> I can reproduce this now. It really seems like this should be fixed in Mesa
> main, though: there is already code that checks for this condition when it
> affects a single program stage (in _mesa_update_shader_textures_used) and
> when it affects a SSO pipeline (in
> _mesa_sampler_uniforms_pipeline_are_valid). This code needs to be hooked
> into the non-SSO case as well.

It looks like its hooked up ok the _mesa_update_shader_textures_used() function
just doesn't do what it should.

It needs to be looping over the other stages attached to the gl_shader_program
each time it is called and setting SamplersValidated accordingly.

In its current form we could fail to throw an error when two shaders have a
different types at the same texture unit as in the attached program and I
believe also when the Vertex shader has two conflicting types but the fragment
shader is ok, since the SamplersValidated flag will be overwritten before we
check it.

We obviously need some more piglit tests for this. Looking at the history this
may have regressed somewhat with 953a0af8e3f73

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161026/d3fc1ba8/attachment.html>

More information about the mesa-dev mailing list