From 846b8a76bd0c86e7e60e5dfb15fc6f7b1502ed12 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 7 Jun 2019 11:20:11 -0700 Subject: [PATCH] freedreno: handle images in rebind_resource() Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen --- src/gallium/drivers/freedreno/freedreno_resource.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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++) { -- 2.30.2