Commit ff281e62 authored by Dave Airlie's avatar Dave Airlie Committed by Kenneth Graunke
Browse files

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's avatarKenneth Graunke <kenneth@whitecape.org>
parent 5bd83696
......@@ -144,6 +144,12 @@ combine_clip_cull(nir_shader *nir,
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 cull_array_size = get_unwrapped_array_length(nir, cull);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment