Module: Mesa
Branch: glsl2
Commit: 4285247f12d45b0505da06773d7cafcd2c296fb5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4285247f12d45b0505da06773d7cafcd2c296fb5

Author: Eric Anholt <[email protected]>
Date:   Thu Jul 29 13:42:39 2010 -0700

glsl2: Remove an inlined unvalued return statement.

We already have asserts that it was the last call in the function, so
it's safe to remove after it got cloned in.

Fixes:
glsl-fs-functions-4.

---

 src/glsl/ir_function_inlining.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/ir_function_inlining.cpp 
b/src/glsl/ir_function_inlining.cpp
index b143190..9daffeb 100644
--- a/src/glsl/ir_function_inlining.cpp
+++ b/src/glsl/ir_function_inlining.cpp
@@ -97,6 +97,7 @@ replace_return_with_assignment(ir_instruction *ir, void *data)
          * have reached here. (see can_inline()).
          */
         assert(!ret->next->is_tail_sentinal());
+        ret->remove();
       }
    }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to