On 06/09/2014 09:40 PM, Matt Turner wrote: > On Mon, Jun 9, 2014 at 4:29 AM, Tapani Pälli <tapani.pa...@intel.com> wrote: >> Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79724 >> --- >> src/glsl/ast_to_hir.cpp | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp >> index d1c77f1..131b25f 100644 >> --- a/src/glsl/ast_to_hir.cpp >> +++ b/src/glsl/ast_to_hir.cpp >> @@ -4629,6 +4629,15 @@ ast_case_label::hir(exec_list *instructions, >> } >> } >> >> + /* Check that types match (no implicit conversions allowed). */ > Good news. GLSL 4.30 updated the text to say (I think as a > clarification, so we should have this behavior always):
OK, should have realized to check the latest spec too. This is a good addition. > The type of the init-expression value in a switch statement must be a > scalar int or uint. The type of the constant-expression value in a case > label also must be a scalar int or uint. When any pair of these values > is tested for "equal value" and the types do not match, an implicit > conversion will be done to convert the int to a uint (see section 4.1.10 > “Implicit Conversions”) before the compare is done. > > Please replace this comment with that spec citation in our usual > format. I guess we'll need a little bit of code to handle implicit > conversions here, but apparently only for int -> uint which is a > relief. Thanks, I will make the appropriate changes. // Tapani _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev