asahi: dirty track stage uniforms

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Alyssa Rosenzweig 2024-01-22 16:02:35 -04:00 committed by Marge Bot
parent 6be7c5f889
commit 8ba151aa16
2 changed files with 9 additions and 3 deletions

View file

@ -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);

View file

@ -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);