Module: Mesa Branch: master Commit: ed80746c1c519bb173217fde39266c2af3525a0c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed80746c1c519bb173217fde39266c2af3525a0c
Author: Ian Romanick <[email protected]> Date: Tue Sep 26 17:54:48 2017 -0700 glsl/ast: Stop processing a switch-statement after an error in the init-expression This happens to work now because ir_binop_all_equal is used. This causes vector typed init-expressions to produce scalar Boolean values after comparison. The next commit changes ir_binop_all_equal to ir_binop_equal. Vector typed init-expressions will then produce vector Boolean values, and, in debug builds, the ir_assignment constructor will fail an assertion. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> --- src/compiler/glsl/ast_to_hir.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 1999e68158..4323ec3226 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -6407,6 +6407,7 @@ ast_switch_statement::hir(exec_list *instructions, state, "switch-statement expression must be scalar " "integer"); + return NULL; } /* Track the switch-statement nesting in a stack-like manner. _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
