Mesa (master): r600/eg: fix cube map array buffer images.

Dave Airlie airlied at kemper.freedesktop.org
Sun Feb 4 19:16:14 UTC 2018


Module: Mesa
Branch: master
Commit: 6c1432f0be9c7772573bb86b997c9f085d16c204
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c1432f0be9c7772573bb86b997c9f085d16c204

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Feb  2 16:56:27 2018 +1000

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 <sroland at vmware.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_state_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index d9c74b5f47..477372c3c1 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;
 			}
 		}
 	}




More information about the mesa-commit mailing list