<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Perf] Pre validate _mesa_sampler_uniforms_pipeline_are_valid like _mesa_sampler_uniforms_are_valid"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96410#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Perf] Pre validate _mesa_sampler_uniforms_pipeline_are_valid like _mesa_sampler_uniforms_are_valid"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96410">bug 96410</a>
from <span class="vcard"><a class="email" href="mailto:gregory.hainaut@gmail.com" title="gregory.hainaut@gmail.com">gregory.hainaut@gmail.com</a>
</span></b>
<pre>Currently looking at the code of single program flow namely
_mesa_update_shader_textures_used
The current check fails to detect wrongly reused sampler in multiple shader
stage. The spec seems to imply that is must be checked in the full program (all
stages).
<<
Errors
It is not allowed to have variables of different sampler types pointing to
the same texture image unit within a program object. This situation can only
be detected at the next rendering command issued which triggers shader invo-
cations, and an INVALID_OPERATION error will then be generated.
<span class="quote">>></span >
Here a typical example of an invalid program that will wrongly run fine.
***** Vertex Shader
layout(binding = 0) uniform sampler1D sampler_1d;
***** Fragment Shader
layout(binding = 0) uniform sampler2D sampler_2d;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>