Module: Mesa
Branch: staging/23.3
Commit: 765cb46e2d5b178049cd0eba4b2b3fd3e989008f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=765cb46e2d5b178049cd0eba4b2b3fd3e989008f

Author: Yiwei Zhang <zzyi...@chromium.org>
Date:   Mon Nov  6 11:41:18 2023 -0800

zink: apply can_do_invalid_linear_modifier to Venus

This unblocks Xwayland with zink-on-venus + sommelier wayland proxy.
- For glamor, zink uses linear modifier.
- For Virgl clients, classic 3d resource is used and sommelier fixes
  the modifier and stride infos no matter wl-drm or dma-buf protocol.
- For Venus clients:
  - via the legacy wl-drm protocol, invalid modifier is passed via
    sommelier, and host recovers the tiling in the way dealing with
    modifier unaware clients (e.g. I915_GEM_GET_TILING). For hosts
    unable to recover, they assume linear and venus forces linear on
    legacy path.
  - via the new zwp_linux_dmabuf_feedback_v1 (version 3/4) protocol,
    explicit modifier is used, and zink handles that without issues.

This doesn't deserve a driconfig as zink-on-venus to support xserver
itself already requires special enough integration beyond a config.

Reported-by: Igor Torrente <igor.torre...@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10066
Fixes: 1c3db3e39a7 ("zink: blow up broken xservers more reliably")
Signed-off-by: Yiwei Zhang <zzyi...@chromium.org>
Reviewed-by: Ryan Neph <ryann...@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26082>
(cherry picked from commit 551f61bdb3fc408809f3b15643f9f399bc19beac)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_screen.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 08f5bf762d4..484d047be6e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -654,7 +654,7 @@
         "description": "zink: apply can_do_invalid_linear_modifier to Venus",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "1c3db3e39a7c14a863358f476069849523cc6fe5",
         "notes": null
diff --git a/src/gallium/drivers/zink/zink_screen.c 
b/src/gallium/drivers/zink/zink_screen.c
index 0edb8d5f35e..29a377acfb6 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -2879,6 +2879,7 @@ init_driver_workarounds(struct zink_screen *screen)
    /* these drivers can successfully do INVALID <-> LINEAR dri3 modifier swap 
*/
    switch (screen->info.driver_props.driverID) {
    case VK_DRIVER_ID_MESA_TURNIP:
+   case VK_DRIVER_ID_MESA_VENUS:
       screen->driver_workarounds.can_do_invalid_linear_modifier = true;
       break;
    default:

Reply via email to