diff options
Diffstat (limited to 'src/gallium/state_trackers/xa')
-rw-r--r-- | src/gallium/state_trackers/xa/xa_composite.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_context.c | 17 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_context.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_priv.h | 3 |
4 files changed, 17 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/xa/xa_composite.c b/src/gallium/state_trackers/xa/xa_composite.c index eb949b93cd1..a6bfa11a2f1 100644 --- a/src/gallium/state_trackers/xa/xa_composite.c +++ b/src/gallium/state_trackers/xa/xa_composite.c @@ -527,7 +527,7 @@ XA_EXPORT void xa_composite_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; diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c index b31d555c50a..badd47cd3fc 100644 --- a/src/gallium/state_trackers/xa/xa_context.c +++ b/src/gallium/state_trackers/xa/xa_context.c @@ -34,6 +34,11 @@ #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) @@ -119,7 +124,7 @@ xa_surface_dma(struct xa_context *ctx, } pipe->transfer_unmap(pipe, transfer); if (to_surface) - pipe->flush(pipe, &ctx->last_fence, 0); + xa_context_flush(ctx); } return XA_ERR_NONE; } @@ -139,9 +144,9 @@ xa_surface_map(struct xa_context *ctx, 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; @@ -244,9 +249,9 @@ xa_copy_done(struct xa_context *ctx) { 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 @@ -325,7 +330,7 @@ XA_EXPORT 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; diff --git a/src/gallium/state_trackers/xa/xa_context.h b/src/gallium/state_trackers/xa/xa_context.h index b547abf96a3..202b8e56e23 100644 --- a/src/gallium/state_trackers/xa/xa_context.h +++ b/src/gallium/state_trackers/xa/xa_context.h @@ -40,6 +40,8 @@ extern struct xa_context *xa_context_create(struct xa_tracker *xa); extern void xa_context_destroy(struct xa_context *r); +extern void xa_context_flush(struct xa_context *ctx); + /** * xa_yuv_planar_blit - 2D blit with color conversion and scaling. * diff --git a/src/gallium/state_trackers/xa/xa_priv.h b/src/gallium/state_trackers/xa/xa_priv.h index de4639a41a8..2ab11b82b26 100644 --- a/src/gallium/state_trackers/xa/xa_priv.h +++ b/src/gallium/state_trackers/xa/xa_priv.h @@ -205,6 +205,9 @@ struct xa_shader xa_shaders_get(struct xa_shaders *shaders, /* * xa_context.c */ +extern void +xa_context_flush(struct xa_context *ctx); + extern int xa_ctx_srf_create(struct xa_context *ctx, struct xa_surface *dst); |