[Mesa-dev] [PATCH 00/22] Add support for GL_EXT_semaphore v2

Andres Rodriguez andresx7 at gmail.com
Fri Dec 22 00:45:37 UTC 2017


Patch #2 is a little large so it is stuck in the moderation queue. The
patch doesn't introduce any functionality changes, just renames fences
to semaphores.

[snip]

     [PATCH 02/22] gallium: rename pipe fences to semaphores

Is being held until the list moderator can review it for approval.

The reason it is being held:

     Message body is too big: 271096 bytes with a limit of 128 KB

[snip]

On 2017-12-21 07:41 PM, Andres Rodriguez wrote:
> Sorry for the long time to get this v2 out, past month has been
> a bit hectic.
> 
> This incorporates the feedback I received from mareko and nha on
> the previous iteration.
> 
> Some of the notable changes:
>    - Merged fences and semaphores at the gallium level
>    - Fixed latency due to delayed flushing
>    - Moved the flush from gallium into the radeonsi pipe
>    - Added tests (on piglit mailing list)
>    - Some fixups for bugs found with the tests are at the end of the series
> 
> Thanks for taking the time to review.
> 
> Kind Regards,
> Andres
> 
> Andres Rodriguez (22):
>    gallium: add type parameter to create_fence_fd
>    gallium: rename pipe fences to semaphores
>    gallium: documentation updates for fence->semaphore rename
>    gallium: introduce PIPE_CAP_SEMAPHORE_SIGNAL
>    gallium: introduce PIPE_FD_TYPE_SYNCOBJ
>    gallium: add semaphore_server_signal()
>    u_threaded_context: add support for semaphore_server_signal
>    mesa/st: introduce EXT_semaphore and EXT_semaphore_fd v2
>    mesa: add support for semaphore object creation/import/delete v2
>    mesa/st: add support for semaphore object create/import/delete
>    mesa: add semaphore parameter stub v2
>    mesa: add support for semaphore object signal/wait v2
>    mesa/st: add support for semaphore object signal/wait v2
>    mesa: implement buffer/texture barriers for semaphore signal/wait v2
>    winsys/amdgpu: add support for syncobj signaling v2
>    radeonsi: add support for importing PIPE_FD_TYPE_SYNCOBJ semaphores
>    radeonsi: implement semaphore_server_signal
>    radeonsi: fix semaphore_server_sync() holding up extra work
>    radeonsi: advertise support for GL_EXT_semaphore
>    mesa: fix error codes for importing memory/semaphore FDs
>    mesa: fix glGet for ext_external_objects parameters
>    mesa: check for invalid index on UUID glGet queries
> 
>   src/gallium/auxiliary/pipebuffer/pb_buffer.h       |   6 +-
>   .../auxiliary/pipebuffer/pb_buffer_fenced.c        |  20 +-
>   .../auxiliary/pipebuffer/pb_buffer_fenced.h        |  14 +-
>   .../auxiliary/pipebuffer/pb_buffer_malloc.c        |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c    |   2 +-
>   .../auxiliary/pipebuffer/pb_bufmgr_ondemand.c      |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c  |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c  |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_validate.c     |   2 +-
>   src/gallium/auxiliary/pipebuffer/pb_validate.h     |   4 +-
>   src/gallium/auxiliary/util/u_tests.c               |  55 ++---
>   src/gallium/auxiliary/util/u_threaded_context.c    |  57 ++++--
>   src/gallium/auxiliary/util/u_threaded_context.h    |  10 +-
>   .../auxiliary/util/u_threaded_context_calls.h      |   3 +-
>   src/gallium/docs/source/context.rst                |  65 ++++--
>   src/gallium/docs/source/screen.rst                 |   2 +
>   src/gallium/drivers/ddebug/dd_draw.c               |  24 +--
>   src/gallium/drivers/ddebug/dd_pipe.h               |   6 +-
>   src/gallium/drivers/ddebug/dd_screen.c             |  18 +-
>   src/gallium/drivers/etnaviv/etnaviv_context.c      |   8 +-
>   src/gallium/drivers/etnaviv/etnaviv_fence.c        |  40 ++--
>   src/gallium/drivers/etnaviv/etnaviv_fence.h        |  15 +-
>   src/gallium/drivers/etnaviv/etnaviv_screen.c       |   3 +-
>   src/gallium/drivers/freedreno/freedreno_batch.c    |   4 +-
>   src/gallium/drivers/freedreno/freedreno_batch.h    |   2 +-
>   src/gallium/drivers/freedreno/freedreno_context.c  |  16 +-
>   src/gallium/drivers/freedreno/freedreno_fence.c    |  42 ++--
>   src/gallium/drivers/freedreno/freedreno_fence.h    |  28 +--
>   src/gallium/drivers/freedreno/freedreno_gmem.c     |   2 +-
>   src/gallium/drivers/freedreno/freedreno_screen.c   |   9 +-
>   src/gallium/drivers/i915/i915_batch.h              |   2 +-
>   src/gallium/drivers/i915/i915_flush.c              |   4 +-
>   src/gallium/drivers/i915/i915_screen.c             |  21 +-
>   src/gallium/drivers/i915/i915_winsys.h             |  16 +-
>   src/gallium/drivers/llvmpipe/lp_context.c          |   2 +-
>   src/gallium/drivers/llvmpipe/lp_fence.h            |   2 +-
>   src/gallium/drivers/llvmpipe/lp_flush.c            |   8 +-
>   src/gallium/drivers/llvmpipe/lp_flush.h            |   4 +-
>   src/gallium/drivers/llvmpipe/lp_query.c            |   2 +-
>   src/gallium/drivers/llvmpipe/lp_scene.c            |   4 +-
>   src/gallium/drivers/llvmpipe/lp_screen.c           |  19 +-
>   src/gallium/drivers/llvmpipe/lp_setup.c            |  12 +-
>   src/gallium/drivers/llvmpipe/lp_setup.h            |   4 +-
>   src/gallium/drivers/noop/noop_pipe.c               |  16 +-
>   src/gallium/drivers/nouveau/nouveau_fence.h        |   2 +-
>   src/gallium/drivers/nouveau/nouveau_screen.c       |  12 +-
>   src/gallium/drivers/nouveau/nv30/nv30_context.c    |   2 +-
>   src/gallium/drivers/nouveau/nv30/nv30_screen.c     |   3 +-
>   src/gallium/drivers/nouveau/nv50/nv50_context.c    |   2 +-
>   src/gallium/drivers/nouveau/nv50/nv50_screen.c     |   3 +-
>   src/gallium/drivers/nouveau/nvc0/nvc0_context.c    |   2 +-
>   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c     |   3 +-
>   src/gallium/drivers/r300/r300_context.c            |   2 +-
>   src/gallium/drivers/r300/r300_context.h            |   2 +-
>   src/gallium/drivers/r300/r300_flush.c              |   8 +-
>   src/gallium/drivers/r300/r300_query.c              |   2 +-
>   src/gallium/drivers/r300/r300_screen.c             |  19 +-
>   src/gallium/drivers/r600/r600_hw_context.c         |   4 +-
>   src/gallium/drivers/r600/r600_pipe.c               |   3 +-
>   src/gallium/drivers/r600/r600_pipe.h               |   2 +-
>   src/gallium/drivers/r600/r600_pipe_common.c        |  62 +++---
>   src/gallium/drivers/r600/r600_pipe_common.h        |   6 +-
>   src/gallium/drivers/r600/r600_query.c              |   6 +-
>   src/gallium/drivers/r600/radeon_vce.c              |   2 +-
>   src/gallium/drivers/radeon/r600_pipe_common.c      |  10 +-
>   src/gallium/drivers/radeon/r600_pipe_common.h      |   6 +-
>   src/gallium/drivers/radeon/r600_query.c            |   6 +-
>   src/gallium/drivers/radeon/radeon_vce.c            |   2 +-
>   src/gallium/drivers/radeon/radeon_vcn_enc.c        |   2 +-
>   src/gallium/drivers/radeon/radeon_winsys.h         |  30 ++-
>   src/gallium/drivers/radeonsi/si_fence.c            | 181 +++++++++++------
>   src/gallium/drivers/radeonsi/si_get.c              |   5 +-
>   src/gallium/drivers/radeonsi/si_hw_context.c       |   6 +-
>   src/gallium/drivers/radeonsi/si_pipe.c             |   3 +-
>   src/gallium/drivers/radeonsi/si_pipe.h             |   4 +-
>   src/gallium/drivers/rbug/rbug_context.c            |   2 +-
>   src/gallium/drivers/rbug/rbug_screen.c             |  18 +-
>   src/gallium/drivers/softpipe/sp_fence.c            |  14 +-
>   src/gallium/drivers/softpipe/sp_flush.c            |  10 +-
>   src/gallium/drivers/softpipe/sp_flush.h            |   6 +-
>   src/gallium/drivers/softpipe/sp_screen.c           |   3 +-
>   src/gallium/drivers/svga/svga_context.c            |  16 +-
>   src/gallium/drivers/svga/svga_context.h            |   2 +-
>   src/gallium/drivers/svga/svga_pipe_flush.c         |  28 +--
>   src/gallium/drivers/svga/svga_pipe_query.c         |  16 +-
>   src/gallium/drivers/svga/svga_resource_texture.c   |   8 +-
>   src/gallium/drivers/svga/svga_screen.c             |  29 +--
>   src/gallium/drivers/svga/svga_screen_cache.c       |   6 +-
>   src/gallium/drivers/svga/svga_screen_cache.h       |   4 +-
>   src/gallium/drivers/svga/svga_winsys.h             |  26 +--
>   src/gallium/drivers/swr/swr_context.cpp            |   4 +-
>   src/gallium/drivers/swr/swr_draw.cpp               |  12 +-
>   src/gallium/drivers/swr/swr_fence.cpp              |  22 +-
>   src/gallium/drivers/swr/swr_fence.h                |  20 +-
>   src/gallium/drivers/swr/swr_fence_work.cpp         |  10 +-
>   src/gallium/drivers/swr/swr_fence_work.h           |   8 +-
>   src/gallium/drivers/swr/swr_query.cpp              |  10 +-
>   src/gallium/drivers/swr/swr_query.h                |   2 +-
>   src/gallium/drivers/swr/swr_screen.cpp             |  11 +-
>   src/gallium/drivers/swr/swr_screen.h               |   2 +-
>   src/gallium/drivers/swr/swr_state.cpp              |   2 +-
>   src/gallium/drivers/trace/tr_context.c             |   2 +-
>   src/gallium/drivers/trace/tr_screen.c              |  24 +--
>   src/gallium/drivers/vc4/vc4_context.c              |   6 +-
>   src/gallium/drivers/vc4/vc4_fence.c                |  14 +-
>   src/gallium/drivers/vc4/vc4_screen.c               |   3 +-
>   src/gallium/drivers/vc5/vc5_context.c              |   6 +-
>   src/gallium/drivers/vc5/vc5_fence.c                |  14 +-
>   src/gallium/drivers/vc5/vc5_screen.c               |   2 +-
>   src/gallium/drivers/virgl/virgl_context.c          |   2 +-
>   src/gallium/drivers/virgl/virgl_screen.c           |  19 +-
>   src/gallium/drivers/virgl/virgl_winsys.h           |  12 +-
>   src/gallium/include/pipe/p_context.h               |  49 +++--
>   src/gallium/include/pipe/p_defines.h               |  11 +-
>   src/gallium/include/pipe/p_screen.h                |  40 ++--
>   src/gallium/include/pipe/p_video_codec.h           |   2 +-
>   src/gallium/include/state_tracker/opencl_interop.h |   2 +-
>   src/gallium/include/state_tracker/st_api.h         |   4 +-
>   src/gallium/state_trackers/clover/api/interop.cpp  |   2 +-
>   src/gallium/state_trackers/clover/core/event.cpp   |  10 +-
>   src/gallium/state_trackers/clover/core/event.hpp   |   8 +-
>   src/gallium/state_trackers/clover/core/queue.cpp   |   4 +-
>   src/gallium/state_trackers/dri/dri2.c              |   6 +-
>   src/gallium/state_trackers/dri/dri_drawable.c      |  22 +-
>   src/gallium/state_trackers/dri/dri_drawable.h      |   2 +-
>   src/gallium/state_trackers/dri/dri_helpers.c       |  20 +-
>   src/gallium/state_trackers/glx/xlib/xm_api.c       |   6 +-
>   src/gallium/state_trackers/nine/swapchain9.c       |  38 ++--
>   src/gallium/state_trackers/nine/swapchain9.h       |   2 +-
>   src/gallium/state_trackers/vdpau/output.c          |   2 +-
>   src/gallium/state_trackers/vdpau/presentation.c    |  10 +-
>   src/gallium/state_trackers/vdpau/vdpau_private.h   |   2 +-
>   src/gallium/state_trackers/wgl/stw_context.c       |   2 +-
>   src/gallium/state_trackers/xa/xa_context.c         |  10 +-
>   src/gallium/state_trackers/xa/xa_priv.h            |   4 +-
>   src/gallium/state_trackers/xvmc/surface.c          |   4 +-
>   src/gallium/state_trackers/xvmc/xvmc_private.h     |   4 +-
>   src/gallium/tools/trace/dump_state.py              |   4 +-
>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.c          |  12 +-
>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.h          |   2 +-
>   src/gallium/winsys/amdgpu/drm/amdgpu_cs.c          | 149 ++++++++++----
>   src/gallium/winsys/amdgpu/drm/amdgpu_cs.h          |  20 +-
>   src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c |   4 +-
>   src/gallium/winsys/i915/drm/i915_drm_fence.c       |  20 +-
>   src/gallium/winsys/i915/drm/i915_drm_winsys.h      |   2 +-
>   src/gallium/winsys/radeon/drm/radeon_drm_cs.c      |  42 ++--
>   src/gallium/winsys/radeon/drm/radeon_drm_cs.h      |   4 +-
>   .../winsys/svga/drm/pb_buffer_simple_fenced.c      |  20 +-
>   src/gallium/winsys/svga/drm/vmw_buffer.c           |   2 +-
>   src/gallium/winsys/svga/drm/vmw_context.c          |   8 +-
>   src/gallium/winsys/svga/drm/vmw_fence.c            |  60 +++---
>   src/gallium/winsys/svga/drm/vmw_fence.h            |  18 +-
>   src/gallium/winsys/svga/drm/vmw_screen.h           |   4 +-
>   src/gallium/winsys/svga/drm/vmw_screen_ioctl.c     |   6 +-
>   src/gallium/winsys/svga/drm/vmw_screen_svga.c      |  40 ++--
>   src/gallium/winsys/virgl/drm/virgl_drm_winsys.c    |  14 +-
>   src/gallium/winsys/virgl/drm/virgl_drm_winsys.h    |   4 +-
>   .../winsys/virgl/vtest/virgl_vtest_winsys.c        |  14 +-
>   .../winsys/virgl/vtest/virgl_vtest_winsys.h        |   4 +-
>   src/mesa/Makefile.sources                          |   2 +
>   src/mesa/drivers/dri/i915/intel_syncobj.c          |   6 +-
>   src/mesa/drivers/dri/i965/brw_sync.c               |  10 +-
>   src/mesa/main/dd.h                                 |  58 ++++++
>   src/mesa/main/extensions_table.h                   |   2 +
>   src/mesa/main/externalobjects.c                    | 223 ++++++++++++++++++++-
>   src/mesa/main/externalobjects.h                    |  31 ++-
>   src/mesa/main/get.c                                |   7 +
>   src/mesa/main/get_hash_params.py                   |   5 +
>   src/mesa/main/mtypes.h                             |  10 +
>   src/mesa/main/shared.c                             |  17 ++
>   src/mesa/meson.build                               |   2 +
>   src/mesa/state_tracker/st_cb_flush.c               |   8 +-
>   src/mesa/state_tracker/st_cb_flush.h               |   4 +-
>   src/mesa/state_tracker/st_cb_semaphoreobjects.c    | 129 ++++++++++++
>   src/mesa/state_tracker/st_cb_semaphoreobjects.h    |  25 +++
>   src/mesa/state_tracker/st_cb_syncobj.c             |  26 +--
>   src/mesa/state_tracker/st_context.c                |   2 +
>   src/mesa/state_tracker/st_extensions.c             |   4 +-
>   src/mesa/state_tracker/st_manager.c                |   8 +-
>   181 files changed, 1718 insertions(+), 962 deletions(-)
>   create mode 100644 src/mesa/state_tracker/st_cb_semaphoreobjects.c
>   create mode 100644 src/mesa/state_tracker/st_cb_semaphoreobjects.h
> 


More information about the mesa-dev mailing list