#include "util/u_surface.h"
#include "pipe/p_context.h"
+XA_EXPORT void
+xa_context_flush(struct xa_context *ctx)
+{
+ ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0);
+}
XA_EXPORT struct xa_context *
xa_context_default(struct xa_tracker *xa)
}
pipe->transfer_unmap(pipe, transfer);
if (to_surface)
- pipe->flush(pipe, &ctx->last_fence, 0);
+ xa_context_flush(ctx);
}
return XA_ERR_NONE;
}
return NULL;
if (usage & XA_MAP_READ)
- transfer_direction = PIPE_TRANSFER_READ;
+ transfer_direction |= PIPE_TRANSFER_READ;
if (usage & XA_MAP_WRITE)
- transfer_direction = PIPE_TRANSFER_WRITE;
+ transfer_direction |= PIPE_TRANSFER_WRITE;
if (!transfer_direction)
return NULL;
{
if (!ctx->simple_copy) {
renderer_draw_flush(ctx);
- ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0);
+ xa_context_flush(ctx);
} else
- ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0);
+ xa_context_flush(ctx);
}
static void
xa_solid_done(struct xa_context *ctx)
{
renderer_draw_flush(ctx);
- ctx->pipe->flush(ctx->pipe, &ctx->last_fence, 0);
+ xa_context_flush(ctx);
ctx->comp = NULL;
ctx->has_solid_color = FALSE;