summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-01-23 02:36:44 -0800
committerKenneth Graunke <[email protected]>2019-02-05 13:58:46 -0800
commit5730364d695b706c99c0d3fe6379cbeac61d79f1 (patch)
treeff9b65f2733fb3857a657ea822e095aef435a412 /src
parentef99f4c8d176f4e854e12afa1545fa53f651d758 (diff)
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 ff281e6204, 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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_clip_cull_distance_arrays.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
index 6e1557ef40d..79d61fabea3 100644
--- a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
+++ b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
@@ -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;
}