I think this is reasonable in the short term.. and looks like it was what I intended to do, so:
Reviewed-by: Rob Clark <robdcl...@gmail.com> Doing better would require shuffling things around a bit so we could look up the shader variant. Possibly moving some of this bookkeeping into helper fxns that are called back from per-gen backend would be better.. idk.. BR, -R On Mon, Sep 25, 2017 at 11:15 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > We do, based on the program... an ssbo may be marked as readonly. Not > sure if it's worth-while retrieving that info though. > > On Mon, Sep 25, 2017 at 11:12 AM, Tomeu Vizoso > <tomeu.viz...@collabora.com> wrote: >> As the comments say, we don't have a way of knowing for sure that they >> will be only read, so mark them as written. >> >> Signed-off-by: Tomeu Vizoso <tomeu.viz...@collabora.com> >> --- >> src/gallium/drivers/freedreno/freedreno_draw.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c >> b/src/gallium/drivers/freedreno/freedreno_draw.c >> index f2ccfc585488..fa23a480f25b 100644 >> --- a/src/gallium/drivers/freedreno/freedreno_draw.c >> +++ b/src/gallium/drivers/freedreno/freedreno_draw.c >> @@ -163,7 +163,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct >> pipe_draw_info *info) >> * 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); >> + resource_written(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); >> @@ -438,7 +438,7 @@ fd_launch_grid(struct pipe_context *pctx, const struct >> pipe_grid_info *info) >> * read vs written, so just assume the worst >> */ >> foreach_bit(i, ctx->shaderbuf[PIPE_SHADER_COMPUTE].enabled_mask) >> - resource_read(batch, >> ctx->shaderbuf[PIPE_SHADER_COMPUTE].sb[i].buffer); >> + resource_written(batch, >> ctx->shaderbuf[PIPE_SHADER_COMPUTE].sb[i].buffer); >> >> /* UBO's are read */ >> foreach_bit(i, ctx->constbuf[PIPE_SHADER_COMPUTE].enabled_mask) >> -- >> 2.13.5 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev