Module: Mesa
Branch: master
Commit: 9c4e9ce051bb43861adb4f8cd8e88a733c2f3ed1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c4e9ce051bb43861adb4f8cd8e88a733c2f3ed1

Author: Eric Anholt <[email protected]>
Date:   Mon May 14 08:51:03 2012 -0700

glsl: Fix assertion failure on handling switch on uint expressions.

Fixes piglit glsl-1.30/execution/switch/fs-uint.

Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>

---

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

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index c59e5e6..998f8dd 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -3599,7 +3599,7 @@ ast_switch_statement::test_to_hir(exec_list *instructions,
       test_expression->hir(instructions,
                           state);
 
-   state->switch_state.test_var = new(ctx) ir_variable(glsl_type::int_type,
+   state->switch_state.test_var = new(ctx) ir_variable(test_val->type,
                                                       "switch_test_tmp",
                                                       ir_var_temporary);
    ir_dereference_variable *deref_test_var =

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

Reply via email to