summaryrefslogtreecommitdiff
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-08-04 20:33:57 -0700
committerEric Anholt <eric@anholt.net>2010-08-04 20:52:33 -0700
commit046bef235744e891e4a48076e1a3ff9a61a63092 (patch)
tree1ddd953a9e7ec14e1726d16011985910e372742a /src/glsl/ir.cpp
parenta08f27940ac72538ce0b264917207111d629f097 (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/ir.cpp')
-rw-r--r--src/glsl/ir.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index c3bade8d54..dd059e470d 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -902,7 +902,6 @@ ir_swizzle::variable_referenced()
ir_variable::ir_variable(const struct glsl_type *type, const char *name,
ir_variable_mode mode)
: max_array_access(0), read_only(false), centroid(false), invariant(false),
- shader_in(false), shader_out(false),
mode(mode), interpolation(ir_var_smooth), array_lvalue(false)
{
this->ir_type = ir_type_variable;
@@ -922,9 +921,6 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
const char *
ir_variable::interpolation_string() const
{
- if (!this->shader_in && !this->shader_out)
- return "";
-
switch (this->interpolation) {
case ir_var_smooth: return "smooth";
case ir_var_flat: return "flat";