[Mesa-dev] [PATCH 0/6] mesa: support for EGL_ANDROID_native_fence_sync

Rob Clark robdclark at gmail.com
Fri Apr 1 20:29:44 UTC 2016


From: Rob Clark <robclark at freedesktop.org>

This patchset implements support for EGL_ANDROID_native_fence_sync[1]
for egl and gallium.  This extension provides support for native fence
fd's (file descriptors) for the GPU.  In a similar way to dma-buf fd's,
which provide a reference-counted userspace handle to buffers which
can be shared across drivers and across processes, native fence fd's
provide a reference-counted userspace handle to fences which can be
shared across drivers and across processes.

This extension is already in use on android, and should be useful in
other environments.

This is almost an RFC at this point (but I'd still like to get review
comments), since no driver actually supports this yet, and the upstream
kernel support for native fence fd's is work-in-progress[2][3][4].  But
it is a needed piece to fully wire up explicit synchronization across
devices, and needed to have an open source userspace for the ongoing
kernel work.

[1] https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt
[2] https://lists.freedesktop.org/archives/dri-devel/2016-March/103060.html 
[3] https://lists.freedesktop.org/archives/dri-devel/2016-March/103451.html
[4] https://lists.freedesktop.org/archives/dri-devel/2016-March/103108.html

Rob Clark (6):
  egl: initialize SyncCondition after attr parsing
  dri: extend fence extension to support native fd fences
  egl: add EGL_ANDROID_native_fence_sync
  gallium: add way for drivers to create fences without flushing
  gallium: wire up server_wait_sync
  gallium: support for native fence fd's

 include/GL/internal/dri_interface.h   | 44 ++++++++++++++++++-
 src/egl/drivers/dri2/egl_dri2.c       | 48 +++++++++++++++++++++
 src/egl/main/eglapi.c                 | 36 ++++++++++++++--
 src/egl/main/eglapi.h                 |  2 +
 src/egl/main/egldisplay.h             |  1 +
 src/egl/main/eglfallbacks.c           |  1 +
 src/egl/main/eglsync.c                | 32 +++++++++++---
 src/egl/main/eglsync.h                |  1 +
 src/gallium/include/pipe/p_context.h  | 47 ++++++++++++++++++++
 src/gallium/include/pipe/p_defines.h  |  1 +
 src/gallium/include/pipe/p_screen.h   |  8 ++++
 src/gallium/state_trackers/dri/dri2.c | 80 +++++++++++++++++++++++++++++------
 12 files changed, 278 insertions(+), 23 deletions(-)

-- 
2.5.5



More information about the mesa-dev mailing list