From 8ba151aa16cdb6129a109eb8b8843d9b2b6d5e8a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 22 Jan 2024 16:02:35 -0400 Subject: [PATCH] asahi: dirty track stage uniforms Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 9 +++++++++ src/gallium/drivers/asahi/agx_uniforms.c | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 2b797562850..47556e9684d 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -3091,9 +3091,18 @@ agx_update_descriptors(struct agx_batch *batch, struct agx_compiled_shader *cs, if (!cs) return; + if (ctx->stage[stage].dirty & AGX_STAGE_DIRTY_CONST) + agx_set_cbuf_uniforms(batch, stage); + + if (ctx->stage[stage].dirty & AGX_STAGE_DIRTY_SSBO) + agx_set_ssbo_uniforms(batch, stage); + if (ctx->stage[stage].dirty & AGX_STAGE_DIRTY_IMAGE) agx_upload_textures(batch, cs, stage); + if (ctx->stage[stage].dirty & AGX_STAGE_DIRTY_SAMPLER) + agx_set_sampler_uniforms(batch, stage); + if ((ctx->stage[stage].dirty & AGX_STAGE_DIRTY_SAMPLER) || (ctx->stage[merged_stage(ctx, stage)].dirty & AGX_STAGE_DIRTY_SAMPLER)) agx_upload_samplers(batch, cs, stage); diff --git a/src/gallium/drivers/asahi/agx_uniforms.c b/src/gallium/drivers/asahi/agx_uniforms.c index 58032ae877d..03a1354e319 100644 --- a/src/gallium/drivers/asahi/agx_uniforms.c +++ b/src/gallium/drivers/asahi/agx_uniforms.c @@ -187,9 +187,6 @@ agx_upload_stage_uniforms(struct agx_batch *batch, uint64_t textures, struct agx_stage_uniforms *unif = &batch->stage_uniforms[stage]; unif->texture_base = textures; - agx_set_sampler_uniforms(batch, stage); - agx_set_cbuf_uniforms(batch, stage); - agx_set_ssbo_uniforms(batch, stage); return agx_pool_upload_aligned(&batch->pool, unif, sizeof(struct agx_stage_uniforms), 16);