diff options
author | Eric Anholt <[email protected]> | 2010-08-04 20:33:57 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-04 20:52:33 -0700 |
commit | 046bef235744e891e4a48076e1a3ff9a61a63092 (patch) | |
tree | 1ddd953a9e7ec14e1726d16011985910e372742a /src/glsl/linker.cpp | |
parent | a08f27940ac72538ce0b264917207111d629f097 (diff) |
glsl2: Remove the shader_in/shader_out tracking separate from var->mode.
I introduced this for ir_dead_code to distinguish function parameter
outvals from varying outputs. Only, since ast_to_hir's
current_function is unset when setting up function parameters (they're
needed for making the function signature in the first place), all
function parameter outvals were marked as shader outputs anyway. This
meant that an inlined function's cloned outval was marked as a shader
output and couldn't be dead-code eliminated. Instead, since
ir_dead_code doesn't even look at function parameters, just use
var->mode.
The longest Mesa IR coming out of ir_to_mesa for Yo Frankie drops from
725 instructions to 636.
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index b2953c67d11..94db57d6a52 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1124,7 +1124,6 @@ assign_varying_locations(struct gl_shader_program *prog, * by the following stage. */ if (var->location == -1) { - var->shader_out = false; var->mode = ir_var_auto; } } @@ -1158,7 +1157,6 @@ assign_varying_locations(struct gl_shader_program *prog, /* An 'in' variable is only really a shader input if its * value is written by the previous stage. */ - var->shader_in = false; var->mode = ir_var_auto; } } |