pan/bi: Update the push constant count when emitting load_push_constant

This is needed for panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28175>
This commit is contained in:
Boris Brezillon 2024-01-29 14:13:31 +01:00
parent d53e848936
commit 3bac815c78

View file

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