Mesa (main): freedreno/ir3: indicate that clipdist arrays are in use

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 29 05:05:36 UTC 2021


Module: Mesa
Branch: main
Commit: 13fb587b8af860a64ef3ce01af1a80a64c3c3955
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13fb587b8af860a64ef3ce01af1a80a64c3c3955

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sat Nov 20 03:42:03 2021 -0500

freedreno/ir3: indicate that clipdist arrays are in use

We expose the compact array cap, which means that we get compact
clipdist arrays. Indicate this to the lowering pass so that it works for
gl_ClipDistance from fs, among others.

Fixes, among others, on a420,

tests/spec/glsl-1.30/execution/clipping/fs-clip-distance-interpolated.shader_test

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13891>

---

 src/freedreno/ci/freedreno-a530-fails.txt | 1 -
 src/freedreno/ir3/ir3_nir.c               | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/freedreno/ci/freedreno-a530-fails.txt b/src/freedreno/ci/freedreno-a530-fails.txt
index 56e4b29b4f1..aeff66ec33c 100644
--- a/src/freedreno/ci/freedreno-a530-fails.txt
+++ b/src/freedreno/ci/freedreno-a530-fails.txt
@@ -478,7 +478,6 @@ spec at nv_copy_image@nv_copy_image-formats,Fail
 spec at nv_copy_image@nv_copy_image-formats at Source: GL_DEPTH32F_STENCIL8/Destination: GL_DEPTH32F_STENCIL8,Fail
 spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3,Crash
 spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3 at oes_egl_image_external_essl3_imageLoad,Fail
-spec at glsl-1.30@execution at clipping@fs-clip-distance-interpolated,Crash
 spec at glsl-1.30@execution at fs-large-local-array-vec2,Fail
 spec at glsl-1.30@execution at fs-large-local-array-vec3,Fail
 spec at glsl-1.30@execution at fs-large-local-array-vec4,Fail
diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c
index 19e41ac0477..25eea123683 100644
--- a/src/freedreno/ir3/ir3_nir.c
+++ b/src/freedreno/ir3/ir3_nir.c
@@ -668,7 +668,7 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s)
    if (s->info.stage == MESA_SHADER_VERTEX) {
       if (so->key.ucp_enables)
          progress |=
-            OPT(s, nir_lower_clip_vs, so->key.ucp_enables, false, false, NULL);
+            OPT(s, nir_lower_clip_vs, so->key.ucp_enables, false, true, NULL);
    } else if (s->info.stage == MESA_SHADER_FRAGMENT) {
       bool layer_zero =
          so->key.layer_zero && (s->info.inputs_read & VARYING_BIT_LAYER);
@@ -676,7 +676,7 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s)
          so->key.view_zero && (s->info.inputs_read & VARYING_BIT_VIEWPORT);
 
       if (so->key.ucp_enables && !so->shader->compiler->has_clip_cull)
-         progress |= OPT(s, nir_lower_clip_fs, so->key.ucp_enables, false);
+         progress |= OPT(s, nir_lower_clip_fs, so->key.ucp_enables, true);
       if (layer_zero || view_zero)
          progress |= OPT(s, ir3_nir_lower_view_layer_id, layer_zero, view_zero);
    }



More information about the mesa-commit mailing list