radv/ac: gather4 cube workaround integer
authorDave Airlie <airlied@redhat.com>
Mon, 27 Feb 2017 01:30:41 +0000 (11:30 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 14 Mar 2017 23:51:53 +0000 (09:51 +1000)
commit3ece76f03dc01bb654f47864b5da3a72c250c8b4
tree3cf4d624d1311bf8122ace837cbffb197290b6d7
parent407fa776698e768c9cf47612343502f271960548
radv/ac: gather4 cube workaround integer

This fix is extracted from amdgpu-pro shader traces.

It appears the gather4 workaround for integer types doesn't
work for cubes, so instead if forces a float scaled sample,
then converts to integer.

It modifies the descriptor before calling the gather.

This also produces some ugly asm code for reasons specified
in the patch, llvm could probably do better than dumping
sgprs to vgprs.

This fixes:
dEQP-VK.glsl.texture_gather.basic.cube.rgba8*

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c