Cameron Gutman
a58d3cfe39
Fix D3D11 copy path
2026-01-10 19:11:25 -06:00
Cameron Gutman
b41c4022ea
Ensure there are enough hwframes for Pacer
2026-01-10 18:13:49 -06:00
Cameron Gutman
788675ad59
Handle window size and display changes in D3D11Renderer
2026-01-10 17:48:28 -06:00
Cameron Gutman
be9f465008
Remove manual hwframes creation in D3D11VARenderer
...
This way we aren't always allocating the worst-case possible number of frames
2026-01-10 16:36:35 -06:00
Cameron Gutman
8b6ad55c9b
Enable DXGI_CREATE_FACTORY_DEBUG for debug builds
2026-01-10 16:01:03 -06:00
Cameron Gutman
92b68a40d1
Use a D3D11Fence to force sync between video and 3D engines when binding output textures
2026-01-10 14:52:27 -06:00
Cameron Gutman
cda65ab58d
Use a D3D11Fence to wait to start the next frame until the previous frame is finished
2026-01-07 19:04:15 -06:00
Cameron Gutman
c3ce0918b3
Optimize blending in DXVA2 and D3D11VA renderers
2025-12-28 13:53:13 -06:00
Cameron Gutman
41ad3c0938
Add environment variable override helper function
...
This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
2025-12-27 15:33:39 -06:00
Cameron Gutman
d501a627f0
Test all renderers before use
...
Every renderer except SDL had opted-in for testing due to various
quirks discovered over the years, so just do away with this option
and test all renderers.
2025-12-22 23:58:26 -06:00
Cameron Gutman
58f9b2a83b
Use opaque black in ClearRenderTargetView()
...
Intel's old Gen9 performance guide says it's a little faster.
2025-12-01 22:39:28 -06:00
Cameron Gutman
f0821d9543
Use D3D11_COPY_DISCARD when updating our video texture
...
This ensures the driver knows it doesn't have to synchronize with the previous texture data.
2025-11-24 18:49:19 -06:00
Cameron Gutman
4164a222ae
Consolidate D3D11 constant buffers now that all shaders need a CSC constant buffer
2025-11-24 18:47:14 -06:00
Cameron Gutman
245cd7f1a8
Don't trim the alignment padding with CopySubresourceRegion()
...
The shader already handles trimming for the bound output texture case.
2025-11-24 01:44:51 -06:00
Cameron Gutman
7116efd8de
Switch D3D11VA to the shared functions for CSC matrix generation and chroma co-siting
2025-11-05 22:26:27 -06:00
ns6089
af37002a60
Select correct color matrix for 10-bit SDR
2025-11-05 00:13:25 -06:00
ns6089
fd314db27e
Use correct chroma co-siting offsets in D3D11
...
Introduced in f67272b153
2025-11-04 23:50:27 -06:00
Cameron Gutman
f67272b153
Handle chroma co-siting in the D3D11 shaders
2025-11-01 22:42:51 -05:00
Cameron Gutman
50223dbdb8
Fix accuracy issues in YUV to RGB conversion of 10-bit content in D3D11VA
...
See #1667 for details.
2025-11-01 18:45:02 -05:00
Cameron Gutman
351aaa6759
Add an enum type for each renderer
2025-02-18 18:58:04 -06:00
Cameron Gutman
92ee4a3046
Don't use the bind path for UMA GPUs
...
It turns out to be very marginally slower on RDNA2 iGPUs.
2024-09-12 21:32:36 -05:00
Cameron Gutman
6ec0c79899
Revert "Remove FL 11.0 restriction for D3D11VA"
...
Even with a fix for the Intel IVB rendering issue, there are still problems on
other older cards that make it not really worth it to enable D3D11VA.
The big benefit of D3D11VA is independent flip in windowed mode using
overlays and that isn't supported on those old cards anyway.
This reverts commit 7074463d0f .
2024-09-12 21:29:40 -05:00
Cameron Gutman
25132a1f7b
Enable decoder texture binding for all FL11.1 iGPUs
...
Since those GPUs don't benefit from the fence hack, restrict that to Intel only.
2024-08-31 00:36:25 -05:00
Cameron Gutman
7074463d0f
Remove FL 11.0 restriction for D3D11VA
2024-08-30 23:03:36 -05:00
Cameron Gutman
99311403fa
Move dummy fence into renderVideo()
...
The workaround only seems to work with a new fence each time.
2024-08-30 22:42:53 -05:00
Cameron Gutman
8b50eea485
Wait on a dummy fence before using textures shared with the decoder
2024-08-30 22:22:30 -05:00
Cameron Gutman
f756be87ff
Fix YUV444 hardware decoding on Windows systems without an Intel GPU present
2024-08-30 16:31:58 -05:00
Cameron Gutman
8e2aa87c4f
Avoid using D3D11VA on very old Intel GPUs
...
Fixes #1348
Fixes #1381
2024-08-16 00:32:46 -05:00
Cameron Gutman
665352ec95
Remove support for Intel's vendor-specific HEVC RExt profiles
...
These aren't supported upstream (and probably never will be) and recent
Intel drivers for Tiger Lake and later support the Microsoft standard
HEVC RExt profiles now.
2024-08-13 00:50:32 -05:00
Cameron Gutman
ab791cf4c8
Add support for the official DXVA HEVC Rext GUIDs defined in the Win11 24H2 SDK
2024-08-02 21:22:43 -05:00
Cameron Gutman
9227ebfec9
Fix compiler warnings introduced by ComPtr refactoring
2024-08-02 21:15:18 -05:00
Cameron Gutman
f138827cdf
Add handling for AV1 High profile in D3D11VA/DXVA2
...
This doesn't seem to be supported by FFmpeg or any actual hardware yet
2024-07-30 23:21:49 -05:00
Cameron Gutman
e25919e0f9
Use for each loop to destroy objects in arrays
...
Also fixes incorrect release of m_VideoPixelShaders objects
2024-07-30 22:58:59 -05:00
Cameron Gutman
9e811f54f1
Use ComPtr for lifetime management in D3D11VA
2024-07-30 22:29:38 -05:00
Cameron Gutman
0bb0d27d64
Implement YUV 4:4:4 decoding with D3D11VA on Intel GPUs
2024-07-30 21:12:11 -05:00
Cameron Gutman
778eb07c5f
Reject YUV444 rendering using D3D11VA until it properly supported
2024-07-26 01:19:26 -05:00
Cameron Gutman
335ed0e8e6
Only sample directly from the video decoder output texture on Intel GPUs
...
This technique seems to actually make performance worse on some AMD GPUs (RX 480)
and causes rendering errors on others (HD 5570). These might be AMD-specific bugs
but let's not risk a behavior change for AMD/NVIDIA where nobody was having perf
issues with the old copy method anyway.
2024-06-29 14:44:08 -05:00
Cameron Gutman
0abb9fd7c2
Revert "Avoid using D3D11VA on older AMD TeraScale GPUs"
...
This reverts commit 93408386ae .
2024-06-29 14:12:03 -05:00
Cameron Gutman
1a1ce05959
Revert "Use a Texture2DArray in HLSL to match the SRVs"
...
This reverts commit d389f9a6e9 .
2024-06-29 14:07:41 -05:00
Cameron Gutman
93408386ae
Avoid using D3D11VA on older AMD TeraScale GPUs
2024-06-28 20:24:47 -05:00
Cameron Gutman
415b512c75
Require FL 11.0 for the D3D11VA renderer
...
We would probably be okay with 10.0 (SM4), but let's not risk
encountering GPU driver bugs like we do on old AMD cards.
2024-06-28 19:56:00 -05:00
Cameron Gutman
d389f9a6e9
Use a Texture2DArray in HLSL to match the SRVs
2024-06-27 19:46:27 -05:00
Cameron Gutman
94943d2865
Clamp chroma texcoords to avoid sampling alignment padding
...
This resolves #885 without the massive perf hit on lower end Intel GPUs.
2024-06-22 16:19:26 -05:00
Cameron Gutman
c3bd7edc4e
Revert "Use a separate texture for rendering to avoid blending in the alignment padding"
...
This kills performance on some Intel iGPUs (particularly Atom chips like N100),
so let's remove the copy and solve this issue a different way instead.
This reverts commit a6fccf93d1 .
2024-06-22 12:35:00 -05:00
Cameron Gutman
b6bb96223d
Revert "Remove manual hwframe ctx setup for D3D11VA"
...
We need this back to avoid the copy that's tanking performance on Intel iGPUs.
This reverts commit 2cef09471b .
2024-06-22 12:34:10 -05:00
Cameron Gutman
f2535f1e6e
Avoid D3D9 fallback on lack of codec support unless a D3D11 FL11.0 GPU wasn't found
...
We'd rather not waste time (and risk crashes) loading the D3D9 driver if the GPU doesn't have the physical decoding hardware at all.
2024-03-26 23:59:18 -05:00
Cameron Gutman
e20d56041e
Fix rare race condition in overlay update code
2023-12-31 15:21:18 -06:00
Cameron Gutman
114074bfd8
Don't set HDR metadata on the DXGI swapchain
...
This is no longer recommended by Microsoft due inconsistencies with display support for HDR metadata.
2023-12-31 15:15:06 -06:00
Cameron Gutman
2cef09471b
Remove manual hwframe ctx setup for D3D11VA
...
It was apparently never necessary, since FFmpeg's default behavior of
avcodec_get_hw_frames_parameters() + av_hwframe_ctx_init() makes a
context that exactly matches the one we constructed manually.
2023-12-22 02:45:11 -06:00
Cameron Gutman
7551e90899
Adjust AV1 surface alignment to match FFmpeg behavior
2023-09-08 23:13:29 -05:00