src_vars contains the stack_size of the shader that is about to get inlined.
Fixes:
7fadee9b70c9d1d7229c7bbc9811a858297b193c ('radv/rt: only reserve stack_sizes after rt_case insertion')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21768>
if (shader->info.stage == MESA_SHADER_CLOSEST_HIT || call_idx == 1)
NIR_PASS_V(shader, lower_hit_attribs, NULL, workgroup_size);
- vars->stack_size = MAX2(vars->stack_size, shader->scratch_size);
+ src_vars.stack_size = MAX2(src_vars.stack_size, shader->scratch_size);
nir_push_if(b, nir_ieq_imm(b, idx, call_idx));
nir_inline_function_impl(b, nir_shader_get_entrypoint(shader), NULL, var_remap);