* pipe_context
*/
-static void r600_flush_from_st(struct pipe_context *ctx,
- struct pipe_fence_handle **fence,
- unsigned flags)
-{
- struct r600_context *rctx = (struct r600_context *)ctx;
- unsigned fflags;
-
- fflags = flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0;
-
- /* flush gfx & dma ring, order does not matter as only one can be live */
- if (rctx->b.rings.dma.cs) {
- rctx->b.rings.dma.flush(rctx, fflags, NULL);
- }
- rctx->b.rings.gfx.flush(rctx, fflags, fence);
-}
-
static void r600_destroy_context(struct pipe_context *context)
{
struct r600_context *rctx = (struct r600_context *)context;
rctx->b.b.screen = screen;
rctx->b.b.priv = priv;
rctx->b.b.destroy = r600_destroy_context;
- rctx->b.b.flush = r600_flush_from_st;
if (!r600_common_context_init(&rctx->b, &rscreen->b))
goto fail;
{
}
+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)
{
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);
/*
* pipe_context
*/
-static void si_flush_from_st(struct pipe_context *ctx,
- struct pipe_fence_handle **fence,
- unsigned flags)
-{
- struct si_context *sctx = (struct si_context *)ctx;
- unsigned rflags = 0;
-
- if (flags & PIPE_FLUSH_END_OF_FRAME)
- rflags |= RADEON_FLUSH_END_OF_FRAME;
-
- if (sctx->b.rings.dma.cs) {
- sctx->b.rings.dma.flush(sctx, rflags, NULL);
- }
- sctx->b.rings.gfx.flush(sctx, rflags, fence);
-}
-
static void si_destroy_context(struct pipe_context *context)
{
struct si_context *sctx = (struct si_context *)context;
sctx->b.b.screen = screen; /* this must be set first */
sctx->b.b.priv = priv;
sctx->b.b.destroy = si_destroy_context;
- sctx->b.b.flush = si_flush_from_st;
sctx->screen = sscreen; /* Easy accessing of screen/winsys. */
if (!r600_common_context_init(&sctx->b, &sscreen->b))