nvc0/ir: prevent out of bounds when no images are bound
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Apr 2016 15:12:00 +0000 (17:12 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 26 Apr 2016 17:47:49 +0000 (19:47 +0200)
commitfbeb69757c769f594d5f9340adf067a300eddc1d
tree7002d621175f893f1b96f471f860e033a1114c54
parent5ba57144830f5ab9dc8044d3a6fc59dfe16f0dd2
nvc0/ir: prevent out of bounds when no images are bound

Checking if the image address is not 0 should be enough to prevent
read faults. To improve robustness, make sure that the destination
value of atomic operations is correctly initialized in case the
instruction is not performed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp