summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-02-25 15:01:07 -0500
committerRob Clark <[email protected]>2018-03-05 08:05:33 -0500
commit76687b0c0aa629a2871223770145abf0f2729ff9 (patch)
treefa3fda25aa11e275dea096112b3425acacd0c357 /src/gallium
parent9e4f5966e892485a882c9537247bae17ea132be9 (diff)
freedreno: add pctx->memory_barrier()
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c8
1 files changed, 8 insertions, 0 deletions
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)