nvc0/ir: return 0 in imageLoad on incomplete textures
authorKarol Herbst <kherbst@redhat.com>
Sat, 23 Jun 2018 17:01:34 +0000 (19:01 +0200)
committerKarol Herbst <kherbst@redhat.com>
Sat, 4 Aug 2018 16:25:20 +0000 (18:25 +0200)
commitc3325097be93d6374a6b5f9fb5eee0878698ef77
treeb25e3c0b1ba2949dbd5f5d591284f5461f556e5b
parent0ca046d7e97564c0479cb8d42ba40c798c163bb5
nvc0/ir: return 0 in imageLoad on incomplete textures

We already guarded all OP_SULDP against out of bound accesses, but we
ended up just reusing whatever value was stored in the dest registers.

Fixes CTS test shader_image_load_store.incomplete_textures

v2: fix for loads not ending up with predicates (bindless_texture)
v3: fix replacing the def

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h