pan/bi: Make bi_opt_push_ubo optional
It's an optimization pass -- omitting it should not cause MMU faults (!). Make sure the UBO push mask is set regardless of whether the pass is called, and just call the pass when required. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12328>
This commit is contained in:
committed by
Marge Bot
parent
01b0935d31
commit
ff03f096bf
@@ -128,12 +128,6 @@ bi_pick_ubo(struct panfrost_ubo_push *push, struct bi_ubo_analysis *analysis)
|
||||
void
|
||||
bi_opt_push_ubo(bi_context *ctx)
|
||||
{
|
||||
if (ctx->inputs->no_ubo_to_push) {
|
||||
/* If nothing is pushed, all UBOs need to be uploaded */
|
||||
ctx->ubo_mask = ~0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* This pass only runs once */
|
||||
assert(ctx->info->push.count == 0);
|
||||
|
||||
|
||||
@@ -3576,6 +3576,10 @@ bifrost_compile_shader_nir(nir_shader *nir,
|
||||
ctx->stage = nir->info.stage;
|
||||
ctx->quirks = bifrost_get_quirks(inputs->gpu_id);
|
||||
ctx->arch = inputs->gpu_id >> 12;
|
||||
|
||||
/* If nothing is pushed, all UBOs need to be uploaded */
|
||||
ctx->ubo_mask = ~0;
|
||||
|
||||
list_inithead(&ctx->blocks);
|
||||
|
||||
/* Lower gl_Position pre-optimisation, but after lowering vars to ssa
|
||||
@@ -3677,7 +3681,10 @@ bifrost_compile_shader_nir(nir_shader *nir,
|
||||
bi_validate(ctx, "Early lowering");
|
||||
|
||||
/* Runs before copy prop */
|
||||
bi_opt_push_ubo(ctx);
|
||||
if (!ctx->inputs->no_ubo_to_push) {
|
||||
bi_opt_push_ubo(ctx);
|
||||
}
|
||||
|
||||
bi_opt_constant_fold(ctx);
|
||||
|
||||
bi_opt_copy_prop(ctx);
|
||||
|
||||
Reference in New Issue
Block a user