diff options
author | Timothy Arceri <[email protected]> | 2017-04-07 11:24:37 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-04-08 11:18:32 +1000 |
commit | bfabef0e7104dc4043a74ef44e71ecc7636cfe12 (patch) | |
tree | 80c1095eb57129ac87b098c87366654664fe1fe0 /src/compiler/glsl/tests | |
parent | 5dd490f134cff8a0b6da1417d146e92df1860b0f (diff) |
glsl: fix lower jumps for nested non-void returns
Fixes the case were a loop contains a return and the loop is
nested inside an if.
Reviewed-by: Roland Scheidegger <[email protected]>
https://bugs.freedesktop.org/show_bug.cgi?id=100303
Diffstat (limited to 'src/compiler/glsl/tests')
-rw-r--r-- | src/compiler/glsl/tests/lower_jumps/create_test_cases.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/glsl/tests/lower_jumps/create_test_cases.py b/src/compiler/glsl/tests/lower_jumps/create_test_cases.py index 20f5ace199e..623487eb44c 100644 --- a/src/compiler/glsl/tests/lower_jumps/create_test_cases.py +++ b/src/compiler/glsl/tests/lower_jumps/create_test_cases.py @@ -628,7 +628,10 @@ def test_lower_return_non_void_at_end_of_loop(): loop(assign_x('a', const_float(1)) + lowered_return_simple(const_float(2)) + break_()) + - if_not_return_flag(assign_x('b', const_float(3)) + + if_return_flag(assign_x('return_value', '(var_ref return_value)') + + assign_x('return_flag', const_bool(1)) + + assign_x('execute_flag', const_bool(0)), + assign_x('b', const_float(3)) + lowered_return(const_float(4))) + final_return() )) |