radeonsi: Fix crash on shaders using MSAA image load/store
authorAlex Smith <asmith@feralinteractive.com>
Wed, 30 May 2018 08:39:27 +0000 (09:39 +0100)
committerAlex Smith <asmith@feralinteractive.com>
Fri, 1 Jun 2018 07:53:38 +0000 (08:53 +0100)
commit01a2414045bd819267821423dbf77c3655cc214d
treea574b9a832df133ccc41132c28c4b598e35f776d
parentdfff9fb6f8d4b4ecd087cc01e9841244a83558b6
radeonsi: Fix crash on shaders using MSAA image load/store

The value returned by tgsi_util_get_texture_coord_dim() does not
account for the sample index. This means image_fetch_coords() will not
fetch it, leading to a null deref in ac_build_image_opcode() which
expects it to be present (the return value of ac_num_coords() *does*
include the sample index).

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Cc: "18.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c