glsl: Allow implicit int -> uint conversions for bitwise operators (&, ^, |).
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 15 Jan 2016 07:27:03 +0000 (23:27 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 16 Jan 2016 01:53:44 +0000 (17:53 -0800)
commitd54a70aa18a0139a5eefbc5193fabaf739317533
treea39030390a733694b8a3345bb435a3829e5c1db4
parent61b0cfd84ee6fb1273928ee2c8751301ae805eaa
glsl: Allow implicit int -> uint conversions for bitwise operators (&, ^, |).

The ARB has decided that implicit conversions should be performed for
bitwise operators in future language revisions.  Implementations of
current language revisions may or may not perform them.

This patch makes Mesa apply implicti conversions even on current
language versions.  Applications appear to expect this behavior,
and there's really no downside to doing so.

Fixes shader compilation in Shadow of Mordor.

Bugzilla: https://www.khronos.org/bugzilla/show_bug.cgi?id=1405
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
src/glsl/ast_to_hir.cpp