freedreno: handle images in rebind_resource()

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
Rob Clark 2019-06-07 11:20:11 -07:00
parent c6ae354299
commit 846b8a76bd

View file

@ -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++) {