Module: Mesa
Branch: main
Commit: 551f61bdb3fc408809f3b15643f9f399bc19beac
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=551f61bdb3fc408809f3b15643f9f399bc19beac

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>

---

 src/gallium/drivers/zink/zink_screen.c | 1 +
 1 file changed, 1 insertion(+)

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