iris: only clip lower if there's something to clip against
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 10 Nov 2018 01:35:29 +0000 (17:35 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index b1ed00778934e2351e39419d6837199c1d12c9b4..d5e92a56523576fd535d9b7cf6557b34f491fbec 100644 (file)
@@ -2973,7 +2973,8 @@ iris_populate_vs_key(const struct iris_context *ice,
 
    iris_populate_sampler_key(ice, &key->tex);
 
-   if (info->clip_distance_array_size == 0)
+   if (info->clip_distance_array_size == 0 &&
+       (info->outputs_written & (VARYING_BIT_POS | VARYING_BIT_CLIP_VERTEX)))
       key->nr_userclip_plane_consts = cso_rast->num_clip_plane_consts;
 }