ir3: fix max const size calculation for the binning pass

The binning pass should never exceed the const size of the non-binning
pass.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
This commit is contained in:
Job Noorman 2025-03-03 09:58:54 +01:00 committed by Marge Bot
parent 434b82469f
commit fbe8fc0dae

View file

@ -1054,6 +1054,10 @@ ir3_const_state_mut(const struct ir3_shader_variant *v)
static inline unsigned
_ir3_max_const(const struct ir3_shader_variant *v, bool safe_constlen)
{
if (v->binning_pass) {
return v->nonbinning->constlen;
}
const struct ir3_compiler *compiler = v->compiler;
bool shared_consts_enable =
ir3_const_state(v)->push_consts_type == IR3_PUSH_CONSTS_SHARED;