From 76687b0c0aa629a2871223770145abf0f2729ff9 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 25 Feb 2018 15:01:07 -0500 Subject: freedreno: add pctx->memory_barrier() Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_context.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gallium/drivers/freedreno') diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index 7dd088730d0..9c6a21ca5b8 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -80,6 +80,13 @@ fd_texture_barrier(struct pipe_context *pctx, unsigned flags) fd_context_flush(pctx, NULL, 0); } +static void +fd_memory_barrier(struct pipe_context *pctx, unsigned flags) +{ + fd_context_flush(pctx, NULL, 0); + /* TODO do we need to check for persistently mapped buffers and fd_bo_cpu_prep()?? */ +} + /** * emit marker string as payload of a no-op packet, which can be * decoded by cffdump. @@ -295,6 +302,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen, pctx->create_fence_fd = fd_create_fence_fd; pctx->fence_server_sync = fd_fence_server_sync; pctx->texture_barrier = fd_texture_barrier; + pctx->memory_barrier = fd_memory_barrier; pctx->stream_uploader = u_upload_create_default(pctx); if (!pctx->stream_uploader) -- cgit v1.2.3