Mesa (staging/21.1): zink: remove incorrect border-swizzle assumption

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 17 20:22:45 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 90bed9f33750c3881edd086f68aca8a1d5f0bad3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=90bed9f33750c3881edd086f68aca8a1d5f0bad3

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Apr 19 14:19:53 2021 +0200

zink: remove incorrect border-swizzle assumption

According to the Khronos issue[1], it seems like RADV and NVIDIA is in
the wrong, so let's turn the logic around here.

This makes us do the right thing for Lavapipe, and we should probablt
remove RADV from this list once !9731 lands.

[1]: https://github.com/KhronosGroup/Vulkan-Docs/issues/1421

Fixes: cdb9a4775bf ("zink: set PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10321>
(cherry picked from commit 26b28bf0a6cf6a4ff2f4273f005fc0ad3311fc67)

---

 .pick_status.json                                     |  2 +-
 src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt | 18 ------------------
 src/gallium/drivers/zink/zink_screen.c                | 10 +++++++---
 3 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 062f79d942b..62207fd201e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -3514,7 +3514,7 @@
         "description": "zink: remove incorrect border-swizzle assumption",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "cdb9a4775bff5c6510eb985891120668ac8f5664"
     },
diff --git a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
index 5cd9b383770..13fbca3dea0 100644
--- a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
+++ b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
@@ -58,7 +58,6 @@ spec@!opengl 1.1 at texwrap 1d proj bordercolor,Fail
 spec@!opengl 1.1 at texwrap 2d bordercolor,Fail
 spec@!opengl 1.1 at texwrap 2d proj bordercolor,Fail
 spec@!opengl 1.1 at texwrap formats bordercolor,Fail
-spec@!opengl 1.1 at texwrap formats bordercolor-swizzled,Fail
 spec@!opengl 1.2 at copyteximage 3d,Fail
 spec@!opengl 1.2 at texwrap 3d bordercolor,Fail
 spec@!opengl 1.2 at texwrap 3d proj bordercolor,Fail
@@ -91,7 +90,6 @@ spec at arb_depth_texture@depth-tex-modes,Fail
 spec at arb_depth_texture@texwrap formats bordercolor,Fail
 spec at arb_depth_texture@texwrap formats bordercolor-swizzled,Fail
 spec at arb_es2_compatibility@texwrap formats bordercolor,Fail
-spec at arb_es2_compatibility@texwrap formats bordercolor-swizzled,Fail
 spec at arb_fragment_program@fp-abs-01,Crash
 spec at arb_framebuffer_object@fbo-blit-scaled-linear,Fail
 spec at arb_framebuffer_object@fbo-gl_pointcoord,Fail
@@ -120,26 +118,18 @@ spec at arb_texture_buffer_object@indexed,Fail
 spec at arb_texture_buffer_object@render-no-bo,Crash
 spec at arb_texture_buffer_range@ranges-2 compat,Fail
 spec at arb_texture_compression@texwrap formats bordercolor,Fail
-spec at arb_texture_compression@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_compression_bptc@texwrap formats bordercolor,Fail
-spec at arb_texture_compression_bptc@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_cube_map_array@arb_texture_cube_map_array-sampler-cube-array-shadow,Fail
 spec at arb_texture_float@fbo-blending-formats,Fail
 spec at arb_texture_float@texwrap formats bordercolor,Fail
-spec at arb_texture_float@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_rectangle@texwrap rect bordercolor,Fail
 spec at arb_texture_rectangle@texwrap rect proj bordercolor,Fail
 spec at arb_texture_rg@multisample-fast-clear gl_arb_texture_rg-int,Fail
 spec at arb_texture_rg@texwrap formats bordercolor,Fail
-spec at arb_texture_rg@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_rg@texwrap formats-float bordercolor,Fail
-spec at arb_texture_rg@texwrap formats-float bordercolor-swizzled,Fail
 spec at arb_texture_rg@texwrap formats-int bordercolor,Fail
-spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled,Fail
 spec at arb_texture_rgb10_a2ui@texwrap formats bordercolor,Fail
-spec at arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_stencil8@texwrap formats bordercolor,Fail
-spec at arb_texture_stencil8@texwrap formats bordercolor-swizzled,Fail
 spec at arb_texture_view@rendering-formats,Fail
 spec at arb_texture_view@sampling-2d-array-as-cubemap-array,Fail
 spec at arb_uniform_buffer_object@maxblocks,Crash
@@ -195,24 +185,16 @@ spec at ext_packed_depth_stencil@texwrap formats bordercolor,Fail
 spec at ext_packed_depth_stencil@texwrap formats bordercolor-swizzled,Fail
 spec at ext_packed_float@query-rgba-signed-components,Fail
 spec at ext_packed_float@texwrap formats bordercolor,Fail
-spec at ext_packed_float@texwrap formats bordercolor-swizzled,Fail
 spec at ext_provoking_vertex@provoking-vertex,Fail
 spec at ext_texture_compression_rgtc@texwrap formats bordercolor,Fail
-spec at ext_texture_compression_rgtc@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_compression_s3tc@texwrap formats bordercolor,Fail
-spec at ext_texture_compression_s3tc@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_integer@multisample-fast-clear gl_ext_texture_integer,Fail
 spec at ext_texture_integer@texwrap formats bordercolor,Fail
-spec at ext_texture_integer@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_shared_exponent@texwrap formats bordercolor,Fail
-spec at ext_texture_shared_exponent@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_snorm@fbo-blending-formats,Fail
 spec at ext_texture_snorm@texwrap formats bordercolor,Fail
-spec at ext_texture_snorm@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_srgb@texwrap formats bordercolor,Fail
-spec at ext_texture_srgb@texwrap formats bordercolor-swizzled,Fail
 spec at ext_texture_srgb@texwrap formats-s3tc bordercolor,Fail
-spec at ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled,Fail
 spec at ext_texture_swizzle@depth_texture_mode_and_swizzle,Fail
 spec at ext_transform_feedback2@counting with pause,Fail
 spec at ext_transform_feedback@generatemipmap prims_generated,Fail
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 610fdd7597b..c2b8c3d65e9 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -319,9 +319,13 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return 0;
 
    case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
-      return screen->info.driver_props.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR ||
-             screen->info.driver_props.driverID == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR ?
-             0 : PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
+      /* This is also broken on the other AMD drivers for old HW, but
+       * there's no obvious way to test for that.
+       */
+      if (screen->info.driver_props.driverID == VK_DRIVER_ID_MESA_RADV ||
+          screen->info.driver_props.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY)
+         return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
+      return 0;
 
    case PIPE_CAP_MAX_TEXTURE_2D_SIZE:
       return screen->info.props.limits.maxImageDimension2D;



More information about the mesa-commit mailing list