summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-13 07:16:38 -0700
committerEric Anholt <[email protected]>2010-08-13 17:54:47 -0700
commit8f8cdbfba43550d0b8985fb087961864e4cd92b6 (patch)
tree3f8fb030267b1c128268e6beb84d4ab98523d81d /src/glsl/glsl_parser_extras.cpp
parent42cab131dac469475c67ab38a2c29f2f66e6ff49 (diff)
glsl2: Add a pass to strip out noop swizzles.
With the glsl2-965 branch, the optimization of glsl-algebraic-rcp-rcp regressed due to noop swizzles hiding information from ir_algebraic. This cleans up those noop swizzles for us.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 2ed3905abc9..d1bb1ae5ecc 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -737,6 +737,7 @@ do_common_optimization(exec_list *ir, bool linked)
progress = do_if_return(ir) || progress;
progress = do_vec_index_to_swizzle(ir) || progress;
progress = do_swizzle_swizzle(ir) || progress;
+ progress = do_noop_swizzle(ir) || progress;
return progress;
}