nvc0/ir: fix textureGather with a single offset
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 12 Oct 2016 14:24:59 +0000 (10:24 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 12 Oct 2016 17:18:14 +0000 (13:18 -0400)
commita48a343c299a6486a1540cdf7d083f38aa4ace55
treefa223071b775a746d7b3cf684407e373202f3c64
parent300b5ad023962ee95322e890a9ba57396392407e
nvc0/ir: fix textureGather with a single offset

Recent fix for non-const offsets broke the case of a single offset (vs 4
offsets). The later code relies on the offs array to contain null values
to tell whether they should be added onto the srcs list.

Fixes: 5239bd592 ("nvc0/ir: fix overwriting of value backing non-constant gather offset")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp