diff options
author | Rob Clark <[email protected]> | 2019-06-07 11:20:11 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-06-11 10:55:27 -0700 |
commit | 846b8a76bd0c86e7e60e5dfb15fc6f7b1502ed12 (patch) | |
tree | 5a093462f3ebc37662133775c4ca5c636ae83f3b /src/gallium/drivers/freedreno | |
parent | c6ae354299986c13c7be7d4716f4d20c3a47706c (diff) |
freedreno: handle images in rebind_resource()
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 97bead52686..30ef1965d3f 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -86,6 +86,15 @@ rebind_resource(struct fd_context *ctx, struct pipe_resource *prsc) ctx->dirty_shader[stage] |= FD_DIRTY_SHADER_TEX; } + /* Images */ + const unsigned num_images = util_last_bit(ctx->shaderimg[stage].enabled_mask); + for (unsigned i = 0; i < num_images; i++) { + if (ctx->dirty_shader[stage] & FD_DIRTY_SHADER_IMAGE) + break; + if (ctx->shaderimg[stage].si[i].resource == prsc) + ctx->dirty_shader[stage] |= FD_DIRTY_SHADER_IMAGE; + } + /* SSBOs */ const unsigned num_ssbos = util_last_bit(ctx->shaderbuf[stage].enabled_mask); for (unsigned i = 0; i < num_ssbos; i++) { |