diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 2d64eed1c10..2106b9b3a5e 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -218,10 +218,21 @@ bool si_alloc_resource(struct si_screen *sscreen, old_buf = res->buf; res->buf = new_buf; /* should be atomic */ - if (sscreen->info.has_virtual_memory) + if (sscreen->info.has_virtual_memory) { res->gpu_address = sscreen->ws->buffer_get_virtual_address(res->buf); - else + + if (res->flags & RADEON_FLAG_32BIT) { + uint64_t start = res->gpu_address; + uint64_t last = start + res->bo_size - 1; + (void)start; + (void)last; + + assert((start >> 32) == sscreen->info.address32_hi); + assert((last >> 32) == sscreen->info.address32_hi); + } + } else { res->gpu_address = 0; + } pb_reference(&old_buf, NULL); |