lavapipe: do not assert on more than 32 samplers
We can have more than 32 samplers, but the code below will assert in that
case. The return value is not used for samplers, so let's just return
zero early and be done with it.
Fixes: c18ff60087
("lavapipe: emit correct textures_used for texture-arrays")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11845>
This commit is contained in:
parent
206fe780d5
commit
bff8a948f7
|
@ -144,6 +144,9 @@ lower_vri_instr_tex_deref(nir_tex_instr *tex,
|
|||
else
|
||||
tex->texture_index = value;
|
||||
|
||||
if (deref_src_type == nir_tex_src_sampler_deref)
|
||||
return 0;
|
||||
|
||||
if (deref_instr->deref_type == nir_deref_type_array) {
|
||||
assert(glsl_type_is_array(var->type));
|
||||
assert(value >= 0);
|
||||
|
|
Loading…
Reference in New Issue