diff options
author | Eric Anholt <[email protected]> | 2010-08-05 12:10:31 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-05 12:56:03 -0700 |
commit | 9f82806c7b5109553cf806a5652e6b6198665094 (patch) | |
tree | d09c0725d013f3ede715c0b02d007af6f761b727 /src/glsl/ir_dead_code.cpp | |
parent | 3bd7e70bf7c4a9a52b425284c9f23689f00de93c (diff) |
glsl2: Don't dead-code eliminate a call where the return value is unused.
This showed up since the disabling of inlining at compile time, which
I apparently didn't regenerate piglit summary for.
Fixes:
glsl-deadcode-call.
Diffstat (limited to 'src/glsl/ir_dead_code.cpp')
-rw-r--r-- | src/glsl/ir_dead_code.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_dead_code.cpp b/src/glsl/ir_dead_code.cpp index a8d264f39a9..87988871c7e 100644 --- a/src/glsl/ir_dead_code.cpp +++ b/src/glsl/ir_dead_code.cpp @@ -78,7 +78,8 @@ do_dead_code(exec_list *instructions) * Don't do so if it's a shader output, though. */ if (entry->var->mode != ir_var_out && - entry->var->mode != ir_var_inout) { + entry->var->mode != ir_var_inout && + !ir_has_call(entry->assign)) { entry->assign->remove(); progress = true; |