st/xorg: abstract flushing and syncing for the exa code
This commit is contained in:
parent
16886c8be3
commit
974dec2e7b
|
@ -227,15 +227,14 @@ ExaDone(PixmapPtr pPixmap)
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
|
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
|
||||||
struct exa_context *exa = ms->exa;
|
struct exa_context *exa = ms->exa;
|
||||||
struct pipe_fence_handle *fence = NULL;
|
|
||||||
|
|
||||||
if (!priv)
|
if (!priv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
exa->ctx->flush(exa->ctx, PIPE_FLUSH_RENDER_CACHE, &fence);
|
#if 1
|
||||||
#if 0
|
xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, NULL);
|
||||||
exa->ctx->screen->fence_finish(exa->ctx->screen, fence, 0);
|
#else
|
||||||
exa->ctx->screen->fence_reference(exa->ctx->screen, &fence, NULL);
|
xorg_finish(exa);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (priv->src_surf)
|
if (priv->src_surf)
|
||||||
|
@ -728,3 +727,19 @@ exa_gpu_surface(struct exa_context *exa, struct exa_pixmap_priv *priv)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
|
||||||
|
struct pipe_fence_handle **fence)
|
||||||
|
{
|
||||||
|
exa->ctx->flush(exa->ctx, pipeFlushFlags, fence);
|
||||||
|
}
|
||||||
|
|
||||||
|
void xorg_exa_finish(struct exa_context *exa)
|
||||||
|
{
|
||||||
|
struct pipe_fence_handle *fence = NULL;
|
||||||
|
|
||||||
|
xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, &fence);
|
||||||
|
|
||||||
|
exa->ctx->screen->fence_finish(exa->ctx->screen, fence, 0);
|
||||||
|
exa->ctx->screen->fence_reference(exa->ctx->screen, &fence, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,5 +46,8 @@ struct exa_pixmap_priv
|
||||||
struct pipe_surface *
|
struct pipe_surface *
|
||||||
exa_gpu_surface(struct exa_context *exa, struct exa_pixmap_priv *priv);
|
exa_gpu_surface(struct exa_context *exa, struct exa_pixmap_priv *priv);
|
||||||
|
|
||||||
|
void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
|
||||||
|
struct pipe_fence_handle **fence);
|
||||||
|
void xorg_exa_finish(struct exa_context *exa);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue