r600g: limit texture offset application to specific types (v2)
authorDave Airlie <airlied@redhat.com>
Tue, 18 Nov 2014 06:44:51 +0000 (16:44 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 18 Nov 2014 22:22:13 +0000 (08:22 +1000)
commit1830138cc04a2948b4cbc24b04faac3f6e195992
tree1ffd39c8c80681dc0792f0885b2a8f6a271c40e3
parentd4c342f67e128dd9c17e8ae48a44677baf546295
r600g: limit texture offset application to specific types (v2)

For 1D and 2D arrays we don't want the other coordinates being
offset and affecting where we sample. I wrote this patch 6 months
ago but lost it.

Fixes:
./bin/tex-miplevel-selection textureLodOffset 1DArray
./bin/tex-miplevel-selection textureLodOffset 2DArray
./bin/tex-miplevel-selection textureOffset 1DArray
./bin/tex-miplevel-selection textureOffset 1DArrayShadow
./bin/tex-miplevel-selection textureOffset 2DArray
./bin/tex-miplevel-selection textureOffset(bias) 1DArray
./bin/tex-miplevel-selection textureOffset(bias) 2DArray

v2: rewrite to handle more cases and be consistent with code
above.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c