diff options
author | Rob Clark <[email protected]> | 2017-04-17 10:56:20 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-05-04 13:48:06 -0400 |
commit | 4d841fbaae3eac04f33f6a52f3dd829cfb1913b5 (patch) | |
tree | 716891b43a4db013837854c022c9d897207ec718 /src/gallium/drivers/freedreno/freedreno_draw.c | |
parent | fd6ed7b5628678ada0db3bf6ae1bcf80628c6947 (diff) |
freedreno: core SSBO support
The generation-independent support for binding shader buffer objects.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index d5b9a7b23a5..6691f65db97 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -151,6 +151,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) batch->gmem_reason |= FD_GMEM_BLEND_ENABLED; } + /* Mark SSBOs as being written.. we don't actually know which ones are + * read vs written, so just assume the worst + */ + foreach_bit(i, ctx->shaderbuf[PIPE_SHADER_FRAGMENT].enabled_mask) + resource_read(batch, ctx->shaderbuf[PIPE_SHADER_FRAGMENT].sb[i].buffer); + foreach_bit(i, ctx->constbuf[PIPE_SHADER_VERTEX].enabled_mask) resource_read(batch, ctx->constbuf[PIPE_SHADER_VERTEX].cb[i].buffer); foreach_bit(i, ctx->constbuf[PIPE_SHADER_FRAGMENT].enabled_mask) |