glsl: Exclude ir_var_hidden variables from the program resource list.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Apr 2016 04:00:32 +0000 (21:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Apr 2016 04:56:43 +0000 (21:56 -0700)
We occasionally generate variables internally that we want to exclude
from the program resource list, as applications won't be expecting them
to be present.

The next patch will make use of this.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/compiler/glsl/linker.cpp

index 510a22e5bd3dbc9ddef67933f6f1893ffd2c37f8..cd096bafd0ac0d57d0d1e6306abb68e4d1be7428 100644 (file)
@@ -3525,7 +3525,7 @@ add_interface_variables(struct gl_shader_program *shProg,
       ir_variable *var = node->as_variable();
       uint8_t mask = 0;
 
-      if (!var)
+      if (!var || var->data.how_declared == ir_var_hidden)
          continue;
 
       switch (var->data.mode) {