Commit b3b6b00a authored by Marek Olšák's avatar Marek Olšák

radeonsi: assume has_virtual_memory == true

parent 53db2790
......@@ -217,21 +217,16 @@ bool si_alloc_resource(struct si_screen *sscreen,
* the others are using it. */
old_buf = res->buf;
res->buf = new_buf; /* should be atomic */
res->gpu_address = sscreen->ws->buffer_get_virtual_address(res->buf);
if (sscreen->info.has_virtual_memory) {
res->gpu_address = sscreen->ws->buffer_get_virtual_address(res->buf);
if (res->flags & RADEON_FLAG_32BIT) {
uint64_t start = res->gpu_address;
uint64_t last = start + res->bo_size - 1;
(void)start;
(void)last;
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;
assert((start >> 32) == sscreen->info.address32_hi);
assert((last >> 32) == sscreen->info.address32_hi);
}
pb_reference(&old_buf, NULL);
......@@ -685,12 +680,7 @@ si_buffer_from_user_memory(struct pipe_screen *screen,
return NULL;
}
if (sscreen->info.has_virtual_memory)
rbuffer->gpu_address =
ws->buffer_get_virtual_address(rbuffer->buf);
else
rbuffer->gpu_address = 0;
rbuffer->gpu_address = ws->buffer_get_virtual_address(rbuffer->buf);
rbuffer->vram_usage = 0;
rbuffer->gart_usage = templ->width0;
......
......@@ -135,9 +135,6 @@ unsigned si_gfx_write_fence_dwords(struct si_screen *screen)
screen->info.chip_class == VI)
dwords *= 2;
if (!screen->info.has_virtual_memory)
dwords += 2;
return dwords;
}
......@@ -222,18 +219,15 @@ void si_need_dma_space(struct r600_common_context *ctx, unsigned num_dw,
RADEON_USAGE_WRITE)))
r600_dma_emit_wait_idle(ctx);
/* If GPUVM is not supported, the CS checker needs 2 entries
* in the buffer list per packet, which has to be done manually.
*/
if (ctx->screen->info.has_virtual_memory) {
if (dst)
radeon_add_to_buffer_list(ctx, &ctx->dma, dst,
RADEON_USAGE_WRITE,
RADEON_PRIO_SDMA_BUFFER);
if (src)
radeon_add_to_buffer_list(ctx, &ctx->dma, src,
RADEON_USAGE_READ,
RADEON_PRIO_SDMA_BUFFER);
if (dst) {
radeon_add_to_buffer_list(ctx, &ctx->dma, dst,
RADEON_USAGE_WRITE,
RADEON_PRIO_SDMA_BUFFER);
}
if (src) {
radeon_add_to_buffer_list(ctx, &ctx->dma, src,
RADEON_USAGE_READ,
RADEON_PRIO_SDMA_BUFFER);
}
/* this function is called before all DMA calls, so increment this. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment