st/glsl_to_tgsi: fix 64-bit integer bit shifts
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 30 Mar 2017 15:07:34 +0000 (17:07 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 31 Mar 2017 16:15:50 +0000 (18:15 +0200)
commitd10fbe5159ce1f7e05e959bb44e50f40a2402fb5
treecee3b29d02141b0f3614269427bed83dd4144ad4
parentc22841d8d20c7d981ba8bbfd10300952586a6b69
st/glsl_to_tgsi: fix 64-bit integer bit shifts

Fix a bug that was caused by a type mismatch in the shift count between
GLSL and TGSI. I briefly considered adjusting the TGSI semantics, but
since both LLVM and AMD GCN require both arguments to be of the same type,
it makes more sense to keep TGSI as-is -- it reflects the underlying
implementation better.

I'm also sending out piglit tests that expose this error.

v2: use the right number of components for the temporary register

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp