diff options
author | Marek Olšák <[email protected]> | 2014-04-12 17:57:32 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-16 14:02:52 +0200 |
commit | adfadeadd8316e95626fec4771393d32a70af649 (patch) | |
tree | 0f35d96cf6882b6701f1cff5b6a4fdf53ca7af78 /src/gallium/drivers/radeon | |
parent | 586011486dba1c977d8f9aeb8f95b14e891afcbb (diff) |
r600g,radeonsi: share r600_flush_from_st
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index bc4838842c1..3a0d9811ce6 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -53,6 +53,22 @@ static void r600_memory_barrier(struct pipe_context *ctx, unsigned flags) { } +static void r600_flush_from_st(struct pipe_context *ctx, + struct pipe_fence_handle **fence, + unsigned flags) +{ + struct r600_common_context *rctx = (struct r600_common_context *)ctx; + unsigned rflags = 0; + + if (flags & PIPE_FLUSH_END_OF_FRAME) + rflags |= RADEON_FLUSH_END_OF_FRAME; + + if (rctx->rings.dma.cs) { + rctx->rings.dma.flush(rctx, rflags, NULL); + } + rctx->rings.gfx.flush(rctx, rflags, fence); +} + static void r600_flush_dma_ring(void *ctx, unsigned flags, struct pipe_fence_handle **fence) { @@ -86,6 +102,7 @@ bool r600_common_context_init(struct r600_common_context *rctx, rctx->b.transfer_unmap = u_transfer_unmap_vtbl; rctx->b.transfer_inline_write = u_default_transfer_inline_write; rctx->b.memory_barrier = r600_memory_barrier; + rctx->b.flush = r600_flush_from_st; r600_init_context_texture_functions(rctx); r600_streamout_init(rctx); |