nir: fix clip cull lowering to not assert if GLSL already lowered.
If GLSL has already done the lowering, we'd rather not crash in this pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
5bd8369681
commit
ff281e6204
|
@ -144,6 +144,12 @@ combine_clip_cull(nir_shader *nir,
|
||||||
cull = var;
|
cull = var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if the GLSL lowering pass has already run, don't bother repeating */
|
||||||
|
if (!cull && clip) {
|
||||||
|
if (!glsl_type_is_array(clip->type))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const unsigned clip_array_size = get_unwrapped_array_length(nir, clip);
|
const unsigned clip_array_size = get_unwrapped_array_length(nir, clip);
|
||||||
const unsigned cull_array_size = get_unwrapped_array_length(nir, cull);
|
const unsigned cull_array_size = get_unwrapped_array_length(nir, cull);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue