diff options
author | Eric Anholt <[email protected]> | 2012-05-14 08:39:54 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-05-17 10:05:24 -0700 |
commit | 5d6ea16dfe99e1aba61c25a897b66951faab1a39 (patch) | |
tree | eb0fd2083ffa5dc41bcd0e9dd646fdb4097d0269 /src/glsl/ast_to_hir.cpp | |
parent | 5462f3679ab7217d3a3be48365750801c7771237 (diff) |
glsl: Let the constructor figure out the types of switch-related expressions.
I noticed this while unindenting the code.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 9252df14952..513908a0dbd 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -3731,7 +3731,6 @@ ast_case_label::hir(exec_list *instructions, new(ctx) ir_dereference_variable(state->switch_state.test_var); ir_rvalue *const test_cond = new(ctx) ir_expression(ir_binop_all_equal, - glsl_type::bool_type, label_const, deref_test_var); @@ -3788,9 +3787,7 @@ ast_iteration_statement::condition_to_hir(ir_loop *stmt, * like 'if (!condition) break;' as the loop termination condition. */ ir_rvalue *const not_cond = - new(ctx) ir_expression(ir_unop_logic_not, glsl_type::bool_type, - cond, - NULL); + new(ctx) ir_expression(ir_unop_logic_not, cond); ir_if *const if_stmt = new(ctx) ir_if(not_cond); |