summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-02-21 23:33:38 +0100
committerEmil Velikov <[email protected]>2018-03-20 16:57:26 +0000
commit3d4383f1399f9bd3cdaea794b0fa9be87f3d80f8 (patch)
tree1bebb7b5b91378e62bbe3df77eac8272316671c1
parent3fec971d712c604adb0bd33def50d97b56da0b66 (diff)
radeonsi: fix vertex buffer address computation with full 64-bit addresses
(cherry picked from commit 2a47660754ba49d5998929550f639677506c4515)
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 17115e1355a..e484ab338a7 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1066,9 +1066,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) {