Mesa (staging/21.0): drisw: move zink down the list below the sw drivers.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 6 17:35:38 UTC 2021


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Mar 25 08:34:28 2021 +1000

drisw: move zink down the list below the sw drivers.

We don't ever want drisw path picking zink as the driver,
we can revisit this when the penny wrapper work gets further
along.

This selection causes systems with nvidia/intel dual-gpus
to try and pick the intel gpu for rendering in the nvidia
context if there is no nvidia GL driver or accel doesn't work.

This is a partial revert of the original commit.

Fixes: 4a3b42a717ce ("drisw: Prefer hardware-layered sw-winsys drivers over pure sw")
Acked-by: Jesse Natalie <jenatali at microsoft.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9816>
(cherry picked from commit 3e1698fe1baa22d000e29bd267b1c39b59910cca)

---

 .pick_status.json                                       | 2 +-
 src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 6 +++---
 src/gallium/auxiliary/target-helpers/sw_helper.h        | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3fa4152425b..8c0acfaaf9c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -22,7 +22,7 @@
         "description": "drisw: move zink down the list below the sw drivers.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "4a3b42a717ce4fa4450066352f04f2e1ef78ad9a"
     },
diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
index c494840c44e..76eda8467b8 100644
--- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
@@ -81,9 +81,6 @@ sw_screen_create(struct sw_winsys *winsys)
    UNUSED bool only_sw = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
    const char *drivers[] = {
       debug_get_option("GALLIUM_DRIVER", ""),
-#if defined(GALLIUM_ZINK)
-      only_sw ? "" : "zink",
-#endif
 #if defined(GALLIUM_D3D12)
       only_sw ? "" : "d3d12",
 #endif
@@ -95,6 +92,9 @@ sw_screen_create(struct sw_winsys *winsys)
 #endif
 #if defined(GALLIUM_SWR)
       "swr",
+#endif
+#if defined(GALLIUM_ZINK)
+      only_sw ? "" : "zink",
 #endif
    };
 
diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h
index d9469d9f5e3..88a5086d261 100644
--- a/src/gallium/auxiliary/target-helpers/sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/sw_helper.h
@@ -86,9 +86,6 @@ sw_screen_create(struct sw_winsys *winsys)
    UNUSED bool only_sw = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
    const char *drivers[] = {
       debug_get_option("GALLIUM_DRIVER", ""),
-#if defined(GALLIUM_ZINK)
-      only_sw ? "" : "zink",
-#endif
 #if defined(GALLIUM_D3D12)
       only_sw ? "" : "d3d12",
 #endif
@@ -100,6 +97,9 @@ sw_screen_create(struct sw_winsys *winsys)
 #endif
 #if defined(GALLIUM_SWR)
       "swr",
+#endif
+#if defined(GALLIUM_ZINK)
+      only_sw ? "" : "zink",
 #endif
    };
 



More information about the mesa-commit mailing list