[Mesa-dev] [PATCH 06/10] glsl: Clean up some leftover cruft.

Kenneth Graunke kenneth at whitecape.org
Thu Mar 31 18:53:39 UTC 2016


stages is always 1 << stage now.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/compiler/glsl/linker.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 48aa395..7d6c60a 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3525,8 +3525,6 @@ add_interface_variables(struct gl_shader_program *shProg,
 
    foreach_in_list(ir_instruction, node, ir) {
       ir_variable *var = node->as_variable();
-      uint8_t stages = 0;
-
       if (!var)
          continue;
 
@@ -3569,9 +3567,7 @@ add_interface_variables(struct gl_shader_program *shProg,
       if (!sha_v)
          return false;
 
-      stages |= 1 << stage;
-
-      if (!add_program_resource(shProg, programInterface, sha_v, stages))
+      if (!add_program_resource(shProg, programInterface, sha_v, 1 << stage))
          return false;
    }
    return true;
-- 
2.7.4



More information about the mesa-dev mailing list