glsl: type check between switch init-expression and case
authorTapani Pälli <tapani.palli@intel.com>
Thu, 12 Jun 2014 09:48:43 +0000 (12:48 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 17 Jun 2014 05:13:28 +0000 (08:13 +0300)
commit39cdf1621efaebcefc74403b0ef8fa1f699e4b97
treed75bd1f77833877be9e0fd16193d8765058546df
parent5357c14da4ec8c8ca780eaab74279372d3f223e5
glsl: type check between switch init-expression and case

Patch adds a type check between switch init-expression and case label
and performs a implicit signed->unsigned type conversion when possible.

v2: add GLSL spec reference, do implicit conversion if possible (Matt)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79724
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ast_to_hir.cpp