From: Rob Clark Date: Fri, 7 Jun 2019 18:20:11 +0000 (-0700) Subject: freedreno: handle images in rebind_resource() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=846b8a76bd0c86e7e60e5dfb15fc6f7b1502ed12;p=mesa.git freedreno: handle images in rebind_resource() Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen --- 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++) {