radv: fix texel fetch offset with 2d arrays.
authorDave Airlie <airlied@redhat.com>
Thu, 24 Nov 2016 03:10:52 +0000 (03:10 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 24 Nov 2016 08:06:05 +0000 (18:06 +1000)
commitbb8ac183404541ca8dee31563709d5aca8de0e73
tree7768d6c45af9ed7d4a504bdf1d5f27202719538f
parent116fed80ff1e65802ecf0244a10a68b83e979258
radv: fix texel fetch offset with 2d arrays.

The code didn't limit the offsets to the number supplied, so
if we expected 3 but only got 2 we were accessing undefined memory.

This fixes random failures in:
dEQP-VK.glsl.texture_functions.texelfetchoffset.sampler2darray_*

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c