Mesa (staging/22.1): nir: mark XFB varyings as unmoveable to prevent them to be remapped

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 26 16:22:28 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: c2037211162c8be16939832d03bdafde4a8a021e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2037211162c8be16939832d03bdafde4a8a021e

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Apr 22 10:13:56 2022 +0200

nir: mark XFB varyings as unmoveable to prevent them to be remapped

XFB varyings are considered as always active IO to prevent them to
be removed or compacted. Though, if the NIR linker doesn't mark XFB
varyings as unmoveable it still possible to remap other varyings to
the same location/component.

Fixes KHR-Single-GL46.enhanced_layouts.xfb_override_qualifiers_with_api
with Zink and a bunch of other dEQP XFB tests.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6301
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri  <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16092>
(cherry picked from commit 4ebb5391acf1d0bcd24947af84ce8930a9429894)

Conflicts:
	src/gallium/drivers/zink/ci/zink-radv-fails.txt

---

 .pick_status.json                               |  2 +-
 src/compiler/nir/nir_linking_helpers.c          |  3 ++-
 src/gallium/drivers/zink/ci/zink-radv-fails.txt | 17 -----------------
 3 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index bf94a516ecd..525e1270c7f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -634,7 +634,7 @@
         "description": "nir: mark XFB varyings as unmoveable to prevent them to be remapped",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index b0ddb36ec7d..1d056fc97b1 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -310,7 +310,8 @@ get_unmoveable_components_masks(nir_shader *shader,
          /* If we can pack this varying then don't mark the components as
           * used.
           */
-         if (is_packing_supported_for_type(type))
+         if (is_packing_supported_for_type(type) &&
+             !var->data.always_active_io)
             continue;
 
          unsigned location = var->data.location - VARYING_SLOT_VAR0;
diff --git a/src/gallium/drivers/zink/ci/zink-radv-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-fails.txt
index ef6b196c12b..0a9b1707940 100644
--- a/src/gallium/drivers/zink/ci/zink-radv-fails.txt
+++ b/src/gallium/drivers/zink/ci/zink-radv-fails.txt
@@ -49,16 +49,6 @@ KHR-GL46.shader_image_load_store.non-layered_binding,Fail
 # amd issue #6305
 KHR-GL46.shader_ballot_tests.ShaderBallotFunctionRead,Fail
 
-# radv issue #6301
-KHR-Single-GL46.enhanced_layouts.varying_array_components,Fail
-KHR-Single-GL46.enhanced_layouts.varying_array_locations,Fail
-KHR-Single-GL46.enhanced_layouts.varying_components,Fail
-KHR-Single-GL46.enhanced_layouts.varying_locations,Fail
-KHR-Single-GL46.enhanced_layouts.varying_structure_locations,Fail
-KHR-Single-GL46.enhanced_layouts.xfb_override_qualifiers_with_api,Fail
-
-
-
 dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_center,Fail
 dEQP-GLES2.functional.clipping.line.wide_line_clip_viewport_corner,Fail
 dEQP-GLES2.functional.clipping.point.wide_point_clip,Fail
@@ -194,13 +184,6 @@ dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_1,Fail
 dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_2,Fail
 dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex,Fail
 dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler2dshadow_vertex,Fail
-dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.lines.6,Fail
-dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.3,Fail
-dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.points.6,Fail
-dEQP-GLES3.functional.transform_feedback.random.interleaved.triangles.7,Fail
-dEQP-GLES3.functional.transform_feedback.random.separate.lines.6,Fail
-dEQP-GLES3.functional.transform_feedback.random.separate.points.6,Fail
-dEQP-GLES3.functional.transform_feedback.random.separate.triangles.6,Fail
 
 # cubes are hard #6270
 spec at glsl-1.20@execution at tex-miplevel-selection gl2:texture() cube,Fail



More information about the mesa-commit mailing list