diff options
author | Eric Anholt <[email protected]> | 2017-12-10 17:11:25 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-01-14 15:40:55 -0800 |
commit | 5932c2f0b9b56e6eeee87baa7b0b493227850f69 (patch) | |
tree | c93d65bea9cebf3f236fc72ad6960ef7dca1b416 /src/gallium/drivers/v3d/v3d_context.c | |
parent | 6c8edcb89c1264c43f5e98444551edb8df2f91f9 (diff) |
v3d: Add SSBO/atomic counters support.
So far I assume that all the buffers get written. If they weren't, you'd
probably be using UBOs instead.
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_context.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index b9eaf7e67ec..104096d5248 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -66,6 +66,16 @@ v3d_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, } static void +v3d_memory_barrier(struct pipe_context *pctx, unsigned int flags) +{ + struct v3d_context *v3d = v3d_context(pctx); + + /* We only need to flush jobs writing to SSBOs/images. */ + perf_debug("Flushing all jobs for glMemoryBarrier(), could do better"); + v3d_flush(pctx); +} + +static void v3d_set_debug_callback(struct pipe_context *pctx, const struct pipe_debug_callback *cb) { @@ -172,6 +182,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) pctx->priv = priv; pctx->destroy = v3d_context_destroy; pctx->flush = v3d_pipe_flush; + pctx->memory_barrier = v3d_memory_barrier; pctx->set_debug_callback = v3d_set_debug_callback; pctx->invalidate_resource = v3d_invalidate_resource; pctx->get_sample_position = v3d_get_sample_position; |