From 13fb587b8af860a64ef3ce01af1a80a64c3c3955 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 20 Nov 2021 03:42:03 -0500 Subject: [PATCH] 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 Reviewed-by: Matt Turner Part-of: --- 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@nv_copy_image@nv_copy_image-formats,Fail spec@nv_copy_image@nv_copy_image-formats@Source: GL_DEPTH32F_STENCIL8/Destination: GL_DEPTH32F_STENCIL8,Fail spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3,Crash spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3@oes_egl_image_external_essl3_imageLoad,Fail -spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash spec@glsl-1.30@execution@fs-large-local-array-vec2,Fail spec@glsl-1.30@execution@fs-large-local-array-vec3,Fail spec@glsl-1.30@execution@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); }