radeonsi: fix vertex buffer address computation with full 64-bit addresses
authorMarek Olšák <marek.olsak@amd.com>
Wed, 21 Feb 2018 22:33:38 +0000 (23:33 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Mar 2018 18:55:38 +0000 (13:55 -0500)
src/gallium/drivers/radeonsi/si_descriptors.c

index 4a0cc29091144005508ff00fb13b23b0cabb3cf4..e6c58ffca78cd05f291dd637c48af3822c038bc5 100644 (file)
@@ -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) {