summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r--src/mesa/shader/slang/slang_link.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index e33272eff2a..57dbfc23885 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -173,7 +173,7 @@ link_uniform_vars(struct gl_shader_program *shProg,
* Furthermore, we'll need to fix the state-var's size/datatype info.
*/
- if (p->Type == PROGRAM_UNIFORM ||
+ if ((p->Type == PROGRAM_UNIFORM && p->Used) ||
p->Type == PROGRAM_SAMPLER) {
_mesa_append_uniform(shProg->Uniforms, p->Name, prog->Target, i);
}