glsl2: Remove an inlined unvalued return statement.
authorEric Anholt <eric@anholt.net>
Thu, 29 Jul 2010 20:42:39 +0000 (13:42 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 29 Jul 2010 21:02:10 +0000 (14:02 -0700)
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

index b143190ff6e30b4b9e33751605bb52ca93979d44..9daffeb017193005d274c39739698344ff62e2f5 100644 (file)
@@ -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();
       }
    }
 }