Mesa (master): radeonsi: fix incorrect index buffer max size for lowered 8-bit indices

Marek Olšák mareko at kemper.freedesktop.org
Tue Oct 28 22:41:25 UTC 2014


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Oct 22 23:22:16 2014 +0200

radeonsi: fix incorrect index buffer max size for lowered 8-bit indices

Cc: 10.2 10.3 mesa-stable at lists.freedesktop.org
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

---

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

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 4f81dac..708e42a 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -750,7 +750,7 @@ static void si_state_draw(struct si_context *sctx,
 
 	if (info->indexed) {
 		uint32_t max_size = (ib->buffer->width0 - ib->offset) /
-				 sctx->index_buffer.index_size;
+				    ib->index_size;
 		uint64_t va = r600_resource(ib->buffer)->gpu_address + ib->offset;
 
 		si_pm4_add_bo(pm4, (struct r600_resource *)ib->buffer, RADEON_USAGE_READ,




More information about the mesa-commit mailing list