radeonsi: fix out-of-bounds indexing of shader images
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 21 Mar 2016 19:50:50 +0000 (14:50 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 23 Mar 2016 16:49:53 +0000 (11:49 -0500)
commitc4931ae17452cabbc7830cd9d5a356b835fd4c48
tree92a9bd7fead3872fd8442fecc9c13102fee96d9a
parenta8f5d11426af0eeadf6977c3d8f3a76afe8f03c5
radeonsi: fix out-of-bounds indexing of shader images

Results are undefined but may not crash. Without this change, out-of-bounds
indexing can lead to VM faults and GPU hangs.

Constant buffers, samplers, and possibly others will eventually need similar
treatment to support GL_ARB_robust_buffer_access_behavior.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c