vo_libmpv: introduce 'gpu-next' render backend #16818
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a new rendering backend for the libmpv render
API, named 'gpu-next'. It is designed as a successor to the legacy
'gpu' backend for API users.
The new backend is built entirely on top of libplacebo, offloading all
complex rendering tasks like scaling, colorspace conversion, OSD, and
tone-mapping to it. This aligns the render API with the core mpv
rendering architecture with the eventual aim of reducing code duplication.
A key design goal is the decoupling of graphics API specifics from the
core rendering logic. It introduces an API context interface
(libmpv_gpu_next.h) that separates the API-specific host duties (like
wrapping a user-provided framebuffer) from the shared, API-agnostic
video engine (video.c).
This initial implementation provides an OpenGL backend, which is selected
when the client specifies MPV_RENDER_API_TYPE_OPENGL. The architecture is
designed to easily accommodate other backends like Vulkan or D3D11 in
the future.
To use it, libmpv clients can pass the MPV_RENDER_PARAM_BACKEND
parameter with the value "gpu-next" during the call to
mpv_render_context_create.
Resolves:
#15107
#10810