Commit 5730364d authored by Kenneth Graunke's avatar Kenneth Graunke
Browse files

nir: Bail on clip/cull distance lowering if GLSL IR already did it.

We have a GLSL IR pass to convert clip/cull distance float[] arrays
into vec4[2] arrays.  In ff281e62

, we attempted to skip this pass
if the GLSL IR lowering had already run.  But, that code was not quite
right, as we forgot to strip away the per-vertex IO array layer for
geometry and tessellation shader varyings.

If the GLSL IR pass has run, the variables will not be marked as
"compact".  So we can simply check that and bail.
Reviewed-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
parent ef99f4c8
......@@ -144,9 +144,9 @@ 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))
/* The GLSL IR lowering pass must have converted these to vectors */
if (!clip->data.compact)
return false;
}
......
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