Mesa (master): glsl: Exclude ir_var_hidden variables from the program resource list.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Apr 2 05:05:33 UTC 2016


Module: Mesa
Branch: master
Commit: 33df1c293504597c195cb2dca6b0b84e462388cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=33df1c293504597c195cb2dca6b0b84e462388cf

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Apr  1 21:00:32 2016 -0700

glsl: Exclude ir_var_hidden variables from the program resource list.

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 at whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/compiler/glsl/linker.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 510a22e..cd096ba 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -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) {




More information about the mesa-commit mailing list