Philip Rebohle
9d890c75ac
[d3d11] Don't template methods that restore shader bindings
...
This was only needed because Bind* methods were also templated.
2025-02-23 12:06:51 +01:00
Philip Rebohle
771f14c466
[d3d11] Refactor BindUnorderedAccessView
...
We won't do lazy bindings for UAVs, but at least bring this function
in line with the rest of the binding functions.
2025-02-23 12:06:51 +01:00
Philip Rebohle
b0d881046f
[d3d11] Lazy-bind samplers
2025-02-23 12:06:51 +01:00
Philip Rebohle
f2ab76c8db
[d3d11] Lazy-bind shader resources
2025-02-23 12:06:51 +01:00
Philip Rebohle
4fdbfffdcc
[d3d11] Lazy-bind constant buffers
2025-02-23 12:06:51 +01:00
Philip Rebohle
41ec7b6a02
[d3d11] Track shader stages with dirty bindings as well as used bindings
2025-02-23 12:06:51 +01:00
Philip Rebohle
a135e01f89
[dxvk] Unroll merged indirect draws as necessary
2025-02-20 13:30:31 +01:00
Philip Rebohle
a2c9c0f740
[d3d11] Use resource cookies for draw buffer tracking
...
Avoids keeping draw buffers alive when the app stops using indirect
draws. Unlikely to have caused issues in practice, but draw buffers
are not part of the API state to begin with.
2025-02-19 19:34:52 +01:00
Philip Rebohle
07f7ccdc96
[dxvk,d3d11] Fix draw buffer tracking for DrawAuto
...
Not like anybody uses this feature, but we need to both check for
hazards and make sure the SO counter actually gets tracked. Use
the existing draw buffer mechanism for this.
2025-02-19 19:34:52 +01:00
Philip Rebohle
813ae020b6
[d3d11] Flush more around non-multisampled render passes
2025-02-11 16:14:53 +01:00
Philip Rebohle
3aeedb9c98
[d3d11] Forward DiscardResource calls to backend for images
2025-02-10 16:13:31 +01:00
Philip Rebohle
45da7d6678
[d3d11] Fix rectangle check in ClearView
...
It is legal to pass a potentially invalid pointer if NumRects is 0.
Fixes validation errors in TopSpin 2k25.
2024-12-09 17:43:53 +01:00
Philip Rebohle
1d2d05dde0
[d3d11] Clean up some texture map mode checks
2024-11-08 11:19:21 +01:00
Philip Rebohle
ae9024492b
[d3d11] Devirtualize context method forwarding
2024-10-23 16:56:22 +02:00
Philip Rebohle
df60a061a4
[d3d11] Throttle resource uploads via UpdateSubresource
...
Otherwise, some games (e.g. Frostpunk, New World) end up allocating over
a gigabyte of staging memory.
2024-10-08 17:46:18 +02:00
Philip Rebohle
ad1f70beea
[dxvk] Support format conversion in copyImageToBuffer
2024-10-08 17:46:18 +02:00
Philip Rebohle
f67c8dd1da
[dxvk] Support format conversion in copyBufferToImage
2024-10-08 17:46:18 +02:00
Philip Rebohle
c614e537a9
[dxvk] Remove alignment parameter from staging buffers
...
Just align all suballocations to 256 bytes as usual.
2024-10-08 17:46:18 +02:00
Philip Rebohle
813524c146
[d3d11] Remove texel buffer path for ClearUAV
...
Instead, recreate the image with the given view format as
necessary. Most of the time we will not actually need this.
2024-10-06 08:47:42 +02:00
Philip Rebohle
b4e69dce76
[dxvk] Remove DxvkImageViewCreateInfo
2024-09-28 01:50:23 +02:00
Philip Rebohle
8195bea63e
[dxvk] Remove DxvkBufferViewCreateInfo
...
Use the new key struct directly to avoid unnecessary struct conversion.
2024-09-28 01:21:07 +02:00
Philip Rebohle
1cefe90ce7
[d3d11] Don't use data buffer for small buffer updates
...
Embed an array instead and lower the size threshold.
2024-09-28 01:05:40 +02:00
Philip Rebohle
01a7457a6f
[dxvk] Remove createImageView function
...
Use the image's method instead, like we already do for buffers.
2024-09-28 00:03:56 +02:00
Philip Rebohle
25076d9220
[dxvk] Rework image view creation
2024-09-26 17:37:50 +02:00
Philip Rebohle
9a51849920
[d3d11] Use allocation cache for dynamic buffers
2024-09-26 17:37:50 +02:00
Philip Rebohle
088ba404a6
[dxvk] Rework buffer view creation
2024-09-26 17:37:50 +02:00
Philip Rebohle
ddb59ae394
[dxvk] Add usage property to buffer views
...
And pass it to the Vulkan driver depending on maintenance5 support.
2024-09-18 15:55:57 +02:00
Philip Rebohle
1c30bc92bb
[d3d11] Validate viewport parameters
...
And skip invalid calls. Fixes Senran Kagura Peach Ball.
2024-08-23 14:39:56 +02:00
Philip Rebohle
5ded7d67f0
[d3d11] Implement UpdateSubresource bug if native command lists are disabled
2024-02-22 16:07:24 +01:00
Dean Beeler
d4c5fc74e7
d3d11: Fix crash when srv is submitted to ClearUnorderedAccessViewUint
...
* The Settlers submits (possibly incorrectly) an SRV to ClearUnorderedAccessViewUint. The static_cast in the function does not translate correctly and crashes.
Native D3D11 behavior is to ignore the bad parameter entirely. It does not clear the SRV nor does it fault or even error with the DEBUG validator.
2024-01-23 16:01:12 +01:00
Philip Rebohle
92dc61f161
[d3d11] Fix up UAV clears for A8_UNORM
2023-08-24 13:12:07 +02:00
Philip Rebohle
5ece97f769
[dxvk] Add line rasterization mode to rasterization state
2023-07-20 23:43:03 +02:00
Joshua Ashton
6f87ccdafc
[d3d11] Use FORCE_UNORM depth bias representation for UNORM formats
2023-06-20 13:31:48 +01:00
Philip Rebohle
cc78276897
[d3d11] Only log QueryInterface errors once
2023-03-01 13:25:56 +01:00
Philip Rebohle
591e2df701
[d3d11] Consider flushing after each CS chunk
...
This way we will never end up with overly long command lists.
2023-01-17 15:01:06 +01:00
Philip Rebohle
2a3d7ee7dc
[d3d11] Use new flush heuristic
2023-01-17 15:01:06 +01:00
Philip Rebohle
d35bf455d9
[dxvk] Rename bindResourceBuffer to bindUniformBuffer
2023-01-15 15:36:05 +01:00
Philip Rebohle
6f194b0e7b
[d3d11] Bind UAV counter buffers as views
2023-01-15 15:36:05 +01:00
Philip Rebohle
92de3f3f5f
[d3d11] Add missing context locks
2023-01-14 18:40:41 +01:00
Philip Rebohle
c55c09368b
[d3d11] Only store low 8 bits of stencil reference
...
Seems to match behaviour of the D3D11 runtime, in that OMGetDepthStencilState
will not retain the high bits.
Found by CME. Should fix #1784 .
2022-12-11 19:51:57 +01:00
Joshua Ashton
699d56e35d
[d3d11] Handle nullptr RasterizerState in ApplyRasterizerSampleCount
...
This broke as of a637134c56aea39ef031d9141224548df384269b is causing a crash in the BGFX d3d11 samples.
2022-09-16 11:40:36 +02:00
Joshua Ashton
3a6f8fa413
[d3d11] Assign ForcedSampleCount to correct value in ApplyRasterizerSampleCount
...
ForcedSampleCount was never being respected as it would always be replaced with 1 as it was being assigned to the wrong variable.
This was also probably causing a bunch of redundant CS work as it was changing state that was dirty checked.
2022-09-16 11:40:36 +02:00
Philip Rebohle
0a222aaaf0
[d3d11] Implement CopyTiles and UpdateTiles
2022-08-26 05:53:03 +02:00
Philip Rebohle
ca41bb4ea4
[d3d11] Implement CopyTileMappings
2022-08-26 05:53:03 +02:00
Philip Rebohle
ff2ff37696
[d3d11] Implement UpdateTileMappings
2022-08-26 05:53:03 +02:00
Philip Rebohle
5130638ebe
[d3d11] Implement ResizeTilePool
2022-08-26 05:53:03 +02:00
Philip Rebohle
f97660e210
[d3d11] Implement TiledResourceBarrier
2022-08-26 05:53:03 +02:00
Philip Rebohle
86bdda70b4
[d3d11] Move D3D10Multithread instance to immediate context
...
Deferred contexts do not support this.
2022-08-24 12:15:35 +02:00
Philip Rebohle
658d824ddd
[d3d11] Silence log spam for invalid image operations
2022-08-18 14:48:29 +02:00
Philip Rebohle
d3ab905621
[d3d11] Request high-priority shader compiles as necessary
...
This can reduce stutter in case shaders are needed immediately while
background threads are still busy compiling a different set of shaders.
2022-08-11 12:39:28 +02:00