glsl/ast: Stop processing a switch-statement after an error in the init-expression
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 27 Sep 2017 00:54:48 +0000 (17:54 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 2 Oct 2017 21:46:02 +0000 (14:46 -0700)
commited80746c1c519bb173217fde39266c2af3525a0c
tree682feb25b1362040869165e26f63d019f076de10
parent6d1765c63aed1b814b29051c702f8e79ead6dbed
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 <ian.d.romanick@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/ast_to_hir.cpp