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/v3dx_draw.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/v3dx_draw.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 46e629d0c64..7f111bbe75f 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -478,6 +478,17 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) job->submit.in_sync_bcl = v3d->out_sync; } + /* Mark SSBOs as being written. We don't actually know which ones are + * read vs written, so just assume the worst + */ + for (int s = 0; s < PIPE_SHADER_TYPES; s++) { + foreach_bit(i, v3d->ssbo[s].enabled_mask) { + v3d_job_add_write_resource(job, + v3d->ssbo[s].sb[i].buffer); + job->tmu_dirty_rcl = true; + } + } + /* Get space to emit our draw call into the BCL, using a branch to * jump to a new BO if necessary. */ |