Mesa (master): radeonsi: fix vertex buffer address computation with full 64-bit addresses

Marek Olšák mareko at kemper.freedesktop.org
Wed Mar 7 18:56:05 UTC 2018


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Feb 21 23:33:38 2018 +0100

radeonsi: fix vertex buffer address computation with full 64-bit addresses

---

 src/gallium/drivers/radeonsi/si_descriptors.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 4a0cc29091..e6c58ffca7 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1064,9 +1064,9 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
 			continue;
 		}
 
-		int offset = (int)vb->buffer_offset + (int)velems->src_offset[i];
-		int64_t va = (int64_t)rbuffer->gpu_address + offset;
-		assert(va > 0);
+		int64_t offset = (int64_t)((int)vb->buffer_offset) +
+				 velems->src_offset[i];
+		uint64_t va = rbuffer->gpu_address + offset;
 
 		int64_t num_records = (int64_t)rbuffer->b.b.width0 - offset;
 		if (sctx->b.chip_class != VI && vb->stride) {




More information about the mesa-commit mailing list