diff options
author | Marek Olšák <[email protected]> | 2018-04-01 15:37:11 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-04-05 15:34:58 -0400 |
commit | 3069cb8b7818fb4fe3a94924a18a68fd2ea1c6bc (patch) | |
tree | c7bdb149066a0ae67b24fdba581f30fec0b0eb93 /src/gallium/drivers/radeon | |
parent | 71d9028b7a746c7744c2fe2d0d7847718d6ca4f9 (diff) |
radeonsi: use r600_common_context less pt2
Acked-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_cs.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 20 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 3 |
4 files changed, 16 insertions, 13 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 8a4ad2dc6db..aff2360c2c0 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -65,10 +65,10 @@ void *si_buffer_map_sync_with_rings(struct r600_common_context *ctx, ctx->ws->cs_is_buffer_referenced(ctx->gfx_cs, resource->buf, rusage)) { if (usage & PIPE_TRANSFER_DONTBLOCK) { - si_flush_gfx_cs(ctx, PIPE_FLUSH_ASYNC, NULL); + si_flush_gfx_cs(sctx, PIPE_FLUSH_ASYNC, NULL); return NULL; } else { - si_flush_gfx_cs(ctx, 0, NULL); + si_flush_gfx_cs(sctx, 0, NULL); busy = true; } } diff --git a/src/gallium/drivers/radeon/r600_cs.h b/src/gallium/drivers/radeon/r600_cs.h index 0283ad7bff5..c90f06bdc6d 100644 --- a/src/gallium/drivers/radeon/r600_cs.h +++ b/src/gallium/drivers/radeon/r600_cs.h @@ -105,7 +105,7 @@ radeon_add_to_gfx_buffer_list_check_mem(struct si_context *sctx, !radeon_cs_memory_below_limit(sctx->screen, sctx->b.gfx_cs, sctx->b.vram + rbo->vram_usage, sctx->b.gtt + rbo->gart_usage)) - si_flush_gfx_cs(&sctx->b, PIPE_FLUSH_ASYNC, NULL); + si_flush_gfx_cs(sctx, PIPE_FLUSH_ASYNC, NULL); radeon_add_to_buffer_list(&sctx->b, sctx->b.gfx_cs, rbo, usage, priority); } diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index ad859c40d56..97412239a0c 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -827,7 +827,8 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, struct r600_resource *buffer, uint64_t va) { - struct radeon_winsys_cs *cs = ctx->gfx_cs; + struct si_context *sctx = (struct si_context*)ctx; + struct radeon_winsys_cs *cs = sctx->b.gfx_cs; uint64_t fence_va = 0; switch (query->b.type) { @@ -858,9 +859,9 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, va += 8; /* fall through */ case PIPE_QUERY_TIMESTAMP: - si_gfx_write_event_eop(ctx, V_028A90_BOTTOM_OF_PIPE_TS, - 0, EOP_DATA_SEL_TIMESTAMP, NULL, va, - 0, query->b.type); + si_gfx_write_event_eop(sctx, V_028A90_BOTTOM_OF_PIPE_TS, + 0, EOP_DATA_SEL_TIMESTAMP, NULL, va, + 0, query->b.type); fence_va = va + 8; break; case PIPE_QUERY_PIPELINE_STATISTICS: { @@ -882,10 +883,10 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, RADEON_PRIO_QUERY); if (fence_va) - si_gfx_write_event_eop(ctx, V_028A90_BOTTOM_OF_PIPE_TS, 0, - EOP_DATA_SEL_VALUE_32BIT, - query->buffer.buf, fence_va, 0x80000000, - query->b.type); + si_gfx_write_event_eop(sctx, V_028A90_BOTTOM_OF_PIPE_TS, 0, + EOP_DATA_SEL_VALUE_32BIT, + query->buffer.buf, fence_va, 0x80000000, + query->b.type); } static void r600_query_hw_emit_stop(struct r600_common_context *ctx, @@ -1626,6 +1627,7 @@ static void r600_query_hw_get_result_resource(struct r600_common_context *rctx, struct pipe_resource *resource, unsigned offset) { + struct si_context *sctx = (struct si_context*)rctx; struct r600_query_hw *query = (struct r600_query_hw *)rquery; struct r600_query_buffer *qbuf; struct r600_query_buffer *qbuf_prev; @@ -1756,7 +1758,7 @@ static void r600_query_hw_get_result_resource(struct r600_common_context *rctx, va = qbuf->buf->gpu_address + qbuf->results_end - query->result_size; va += params.fence_offset; - si_gfx_wait_fence(rctx, va, 0x80000000, 0x80000000); + si_gfx_wait_fence(sctx, va, 0x80000000, 0x80000000); } rctx->b.launch_grid(&rctx->b, &grid); diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 8ff427f8476..9be31955939 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1828,6 +1828,7 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx, static void r600_texture_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer* transfer) { + struct si_context *sctx = (struct si_context*)ctx; struct r600_common_context *rctx = (struct r600_common_context*)ctx; struct r600_transfer *rtransfer = (struct r600_transfer*)transfer; struct pipe_resource *texture = transfer->resource; @@ -1863,7 +1864,7 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx, * The result is that the kernel memory manager is never a bottleneck. */ if (rctx->num_alloc_tex_transfer_bytes > rctx->screen->info.gart_size / 4) { - si_flush_gfx_cs(rctx, PIPE_FLUSH_ASYNC, NULL); + si_flush_gfx_cs(sctx, PIPE_FLUSH_ASYNC, NULL); rctx->num_alloc_tex_transfer_bytes = 0; } |