dxvkinterop
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
https://github.com/mpv-player/mpv/labels/meta%3Afeature-request
Expected behavior of the wanted feature
using Vulkan for rendering and DXGI for presentation, just like dxinterop
ref:
https://evergine.com/directx-vulkan-interop
https://github.com/malstraem/vulkan-interop-directx
Windows Vulkan WSI is shit
Neither Intel nor NVIDIA's Vulkan drivers expose any WCG/HDR surface format when not connected to any monitor (Cross Adapter Scan-Out), so winvk can't output WCG/HDR video in this case (target-colorspace-hint=yes), but everything works fine with d3d11
Additionally, Intel's Vulkan driver does not expose surfaces with
format = FORMAT_A2B10G10R10_UNORM_PACK32
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
in any case. Consequently, it is not possible to output WCG/HDR video when using winvk
The above problem is supposed to be a driver problem, but I've consulted with NVIDIA and Intel, and NVIDIA will not fix the problem, while Intel confirms the problem but does not indicate any fixes will be made
Therefore, this issue is both a bug report and a feature request.
Summarize the problems and potential new features that this feature could solve for MPV Windows Vulkan:
- CASO
- WCG/HDR Output
- GPU-PV(Hyper-V VM): Driver does not support
VK_KHR_swapchain - Performance
- DRR
- Output frame rate will not locked to minimum when DRR enabled
- A jittering solution with lower performance requirements than interpolation
- Increased battery-powered device life
- Multiple monitors
- Solve vsync problem when playing on multiple monitors with different refresh rates
On Windows SV3 DWM has been updated to allow per-monitor vsync timing
- Solve vsync problem when playing on multiple monitors with different refresh rates
- Runtime switching rendering backend
- Users may dynamically switch rendering backends for some reason, e.g. on NVIDIA:
d3d11 is good at all kinds of high frame rate/resolution video, but HDR peak detection performance is worse than vulkan
vulkan can use native hwdec to play hevc rext video, and can also get much better peak detection performance than d3d11
- Users may dynamically switch rendering backends for some reason, e.g. on NVIDIA:
- Potential Performance Improvements
- Windows Auto HDR
- Flip-mode Presentation
- Multi-Plane Overlay
Alternative behavior of the wanted feature
gpu-context=d3d11
Log file
vulkaninfo
monitor connected to dGPU:
GPU id : 0 (NVIDIA GeForce RTX 3060 Laptop GPU):
Surface type = VK_KHR_win32_surface
Formats: count = 7
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[4]:
format = FORMAT_R16G16B16A16_SFLOAT
colorSpace = COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT
SurfaceFormat[5]:
format = FORMAT_A2B10G10R10_UNORM_PACK32
colorSpace = COLOR_SPACE_HDR10_ST2084_EXT
SurfaceFormat[6]:
format = FORMAT_A2B10G10R10_UNORM_PACK32
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
GPU id : 1 (Intel(R) UHD Graphics):
Surface type = VK_KHR_win32_surface
Formats: count = 4
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
monitor connected to iGPU:
GPU id : 0 (Intel(R) UHD Graphics):
Surface type = VK_KHR_win32_surface
Formats: count = 6
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[4]:
format = FORMAT_R16G16B16A16_SFLOAT
colorSpace = COLOR_SPACE_HDR10_ST2084_EXT
SurfaceFormat[5]:
format = FORMAT_A2R10G10B10_UNORM_PACK32
colorSpace = COLOR_SPACE_HDR10_ST2084_EXT
GPU id : 1 (NVIDIA GeForce RTX 3060 Laptop GPU):
Surface type = VK_KHR_win32_surface
Formats: count = 5
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[4]:
format = FORMAT_A2B10G10R10_UNORM_PACK32
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies the Windows Vulkan path as winvk and the existing dxinterop/gpu-context=d3d11 alternative, but names no source files or tests. Start by locating those rendering entry points and narrowing the request to a specific interop goal; done would require an agreed scope and implementation supporting Vulkan rendering with DXGI presentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100