From bb663b8595a949666461db78c29332bcf48ddf33 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 17 Aug 2023 10:55:27 -0400 Subject: [PATCH] asahi: Dirty the shader stage when the shader changes We need to re-emit all descriptors in this case for correctness. Avoids regressions from the following commit. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index aad0147..c0b5a85 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -3082,17 +3082,21 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, batch->resolve |= ctx->zs->store; } - if (agx_update_vs(ctx)) + if (agx_update_vs(ctx)) { ctx->dirty |= AGX_DIRTY_VS | AGX_DIRTY_VS_PROG; - else if (ctx->stage[PIPE_SHADER_VERTEX].dirty || - (ctx->dirty & AGX_DIRTY_VERTEX)) + ctx->stage[PIPE_SHADER_VERTEX].dirty = ~0; + } else if (ctx->stage[PIPE_SHADER_VERTEX].dirty || + (ctx->dirty & AGX_DIRTY_VERTEX)) { ctx->dirty |= AGX_DIRTY_VS; + } - if (agx_update_fs(batch)) + if (agx_update_fs(batch)) { ctx->dirty |= AGX_DIRTY_FS | AGX_DIRTY_FS_PROG; - else if (ctx->stage[PIPE_SHADER_FRAGMENT].dirty || - (ctx->dirty & (AGX_DIRTY_BLEND_COLOR | AGX_DIRTY_SAMPLE_MASK))) + ctx->stage[PIPE_SHADER_FRAGMENT].dirty = ~0; + } else if (ctx->stage[PIPE_SHADER_FRAGMENT].dirty || + (ctx->dirty & (AGX_DIRTY_BLEND_COLOR | AGX_DIRTY_SAMPLE_MASK))) { ctx->dirty |= AGX_DIRTY_FS; + } agx_batch_add_bo(batch, ctx->vs->bo); agx_batch_add_bo(batch, ctx->fs->bo); -- 2.7.4