From: Dave Airlie Date: Fri, 2 Feb 2018 06:56:27 +0000 (+1000) Subject: r600/eg: fix cube map array buffer images. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c1432f0be9c7772573bb86b997c9f085d16c204;p=mesa.git r600/eg: fix cube map array buffer images. This fixes a crash in: KHR-GL45.texture_cube_map_array.texture_size_compute_sh. Reviewed-by: Roland Scheidegger Signed-off-by: Dave Airlie --- diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index d9c74b5f47c..477372c3c14 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1421,7 +1421,7 @@ void eg_setup_buffer_constants(struct r600_context *rctx, int shader_type) int idx = i - sview_bits; if (images->enabled_mask & (1 << idx)) { uint32_t offset = (base_offset / 4) + i; - constants[offset] = images->views[i].base.resource->array_size / 6; + constants[offset] = images->views[idx].base.resource->array_size / 6; } } }