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

Author: Julia Tatz <[email protected]>
Date:   Mon Jul 11 18:44:16 2022 -0400

zink: Advertise PIPE_CAP_NATIVE_FENCE_FD

Enables EGL_ANDROID_native_fence_sync

Acked-by: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17478>

---

 src/gallium/drivers/zink/zink_instance.py | 1 +
 src/gallium/drivers/zink/zink_screen.c    | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_instance.py 
b/src/gallium/drivers/zink/zink_instance.py
index 1e2bce75e80..d6f09e7972b 100644
--- a/src/gallium/drivers/zink/zink_instance.py
+++ b/src/gallium/drivers/zink/zink_instance.py
@@ -38,6 +38,7 @@ EXTENSIONS = [
     Extension("VK_EXT_debug_utils"),
     Extension("VK_KHR_get_physical_device_properties2"),
     Extension("VK_KHR_external_memory_capabilities"),
+    Extension("VK_KHR_external_semaphore_capabilities"),
     Extension("VK_MVK_moltenvk",
         nonstandard=True),
     Extension("VK_KHR_surface"),
diff --git a/src/gallium/drivers/zink/zink_screen.c 
b/src/gallium/drivers/zink/zink_screen.c
index f073de687b5..6ae51cf45c5 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -410,6 +410,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap 
param)
       return screen->instance_info.have_KHR_external_memory_capabilities && 
(screen->info.have_KHR_external_memory_fd || 
screen->info.have_KHR_external_memory_win32);
    case PIPE_CAP_FENCE_SIGNAL:
       return screen->info.have_KHR_external_semaphore_fd || 
screen->info.have_KHR_external_semaphore_win32;
+   case PIPE_CAP_NATIVE_FENCE_FD:
+      return screen->instance_info.have_KHR_external_semaphore_capabilities && 
screen->info.have_KHR_external_semaphore_fd;
 
    case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
    case PIPE_CAP_QUERY_MEMORY_INFO:

Reply via email to