diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index e31071a37f8..11cafae342d 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -1162,6 +1162,12 @@ bi_emit_load_push_constant(bi_builder *b, nir_intrinsic_instr *instr) } bi_emit_collect_to(b, bi_def_index(&instr->def), channels, n); + + /* Update push->count to report the highest push constant word being accessed + * by this shader. + */ + b->shader->info.push->count = + MAX2((base / 4) + n, b->shader->info.push->count); } static bi_index