Philip Rebohle
5490c64398
[d3d11] Skip unnecessary iterations when binding graphics UAVs
...
Some games will unconditionally use a high index for UAVStartSlot.
2025-02-20 18:51:53 +01:00
Philip Rebohle
d48cc1be4d
[d3d11] Lazy-bind pixel shader UAVs
...
Moderately cursed because PS UAVs are also available to other graphics
stages.
2025-02-20 18:51:53 +01:00
Philip Rebohle
c2da20c15f
[d3d11] Lazy-bind compute shader UAVs
...
And factor UAV counter updates out of binding.
2025-02-20 18:28:39 +01:00
Philip Rebohle
aa25e42070
[d3d11] Add compile-time debug flag for lazy binding
2025-02-20 18:28:39 +01:00
Philip Rebohle
0a101cdb50
[d3d11] Reset dirty bindings on command submission
2025-02-20 18:28:39 +01:00
Philip Rebohle
f0db8720fa
[d3d11] Reset dirty tracking when re-applying context state
2025-02-20 18:28:39 +01:00
Philip Rebohle
fe6226229e
[d3d11] Don't template methods that restore shader bindings
...
This was only needed because Bind* methods were also templated.
2025-02-20 18:28:39 +01:00
Philip Rebohle
6fb6252e18
[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-20 18:28:39 +01:00
Philip Rebohle
ffe721c49e
[d3d11] Lazy-bind samplers
2025-02-20 18:28:39 +01:00
Philip Rebohle
5409af074a
[d3d11] Lazy-bind shader resources
2025-02-20 18:28:39 +01:00
Philip Rebohle
b337a27e97
[d3d11] Lazy-bind constant buffers
2025-02-20 18:28:39 +01:00
Philip Rebohle
459b784033
[d3d11] Change AllowFlush behaviour
...
No functional change, just makes it less annoying to use in methods that
can be called from both immediate and deferred contexts-
2025-02-20 18:28:39 +01:00
Philip Rebohle
9a0dacbae5
[d3d11] Track shader stages with dirty bindings as well as used bindings
2025-02-20 18:28:39 +01:00
Philip Rebohle
3a60592699
[d3d11] Rework DXBC shader stage to Vulkan shader stage mapping
...
We're going to have to do this at runtime, so this needs to be fast.
2025-02-20 18:28:39 +01:00
Philip Rebohle
a319f3b018
[d3d11] Store used binding mask inside shader objects
2025-02-20 18:28:39 +01:00
Philip Rebohle
0e6ff26300
[dxbc] Gather binding info during shader compilation
2025-02-20 18:28:39 +01:00
Philip Rebohle
2654ec890e
[util] Generalize bit mask iterator
2025-02-20 13:30:47 +01:00
Philip Rebohle
0691a7fc46
[dxvk] De-duplicate drawIndirectCount implementations
...
No functional change, just some code cleanup.
2025-02-20 13:30:31 +01:00
Philip Rebohle
a135e01f89
[dxvk] Unroll merged indirect draws as necessary
2025-02-20 13:30:31 +01:00
Philip Rebohle
1d8fb818fc
[dxvk] Check whether pipeline has potentially hazardous stores
2025-02-20 13:30:31 +01:00
Philip Rebohle
6f7a468174
[dxvk] Fix global render pass barrier
...
Only need to deal with common write-after-read scenarios, we can
ignore writes since those will add extra barriers anyway. Also
move this work out of the somewhat hot pipeline bind function.
2025-02-20 13:30:31 +01:00
Philip Rebohle
dd1ca4ce59
[dxvk] Track order-invariant access ops in barrier tracker
...
This elides barriers between draws or dispatches if we can prove
order-invariance through atomic operations.
2025-02-20 13:30:31 +01:00
Philip Rebohle
c475960754
[dxvk] Pass store op around for barrier tracking
2025-02-20 13:30:31 +01:00
Philip Rebohle
e01a6eec3e
[dxbc] Track bindings with order-invariant atomic stores
2025-02-20 13:30:31 +01:00
Philip Rebohle
d94e3633dc
[dxvk] Introduce concept of order-invariant atomic stores
2025-02-20 13:30:31 +01:00
Philip Rebohle
8c7da07085
[util] Fix enum declaration
2025-02-20 13:30:31 +01:00
WinterSnowfall
22052106d8
[d3d9] Relax logging level on validateGammaRamp
2025-02-20 00:01:10 +01:00
WinterSnowfall
3716d48c89
[d3d8/9] Use numeric_limits globally
2025-02-20 00:01:10 +01:00
WinterSnowfall
317607e192
[d3d8/9] Prevent device child ref underruns on release
2025-02-20 00:01:10 +01:00
Philip Rebohle
19361c962c
[dxvk] Add debug region for barrier control
2025-02-19 19:34:52 +01:00
Philip Rebohle
636669e1a5
[dxvk] Improve handling of nested debug regions
2025-02-19 19:34:52 +01:00
Philip Rebohle
b03d457ffb
[dxvk,d3d11] Improve explicit UAV overlap behaviour
...
If the app explicitly enables UAV overlap, don't synchronize
back-to-back read-modify-write operations to the same UAV either.
2025-02-19 19:34:52 +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
d37a13847a
[dxvk] Rename and repurpose ignoreGraphicsBarriers option
...
Less nuclear approach that hopefully works just as well in practice.
2025-02-19 19:34:52 +01:00
Philip Rebohle
18e5c12b6d
[dxvk] Fix resource hazard checks
...
Turns out we've had broken write-after-read checks for a while.
2025-02-19 19:34:52 +01:00
Philip Rebohle
48d145fff6
[dxvk] Change debug color for pipelines with side effects
2025-02-19 19:34:52 +01:00
Philip Rebohle
04d2609a91
[dxvk] Clean up shader resource hazard checking
2025-02-19 19:34:52 +01:00
Philip Rebohle
3bbae86ec9
[dxvk] Rework compute barrier tracking
2025-02-19 19:34:52 +01:00
Philip Rebohle
53b076be61
[dxvk] Rework graphics barrier tracking
...
Avoids having to insert redundant barriers when the app does UAV rendering.
2025-02-19 19:34:52 +01:00
Philip Rebohle
009f8ee356
[dxvk] Emit barriers when updating shader resources
2025-02-19 19:34:52 +01:00
Philip Rebohle
be9391ded5
[dxvk] Track transform feedback buffer access
2025-02-19 19:34:52 +01:00
Philip Rebohle
96337f11d4
[dxvk] Track vertex buffer access
2025-02-19 19:34:52 +01:00
Philip Rebohle
24b58e5858
[dxvk] Track index buffer access
2025-02-19 19:34:52 +01:00
Philip Rebohle
21eb682b39
[dxvk] Track indirect draw buffer access
2025-02-19 19:34:52 +01:00
Philip Rebohle
a7c1e7a2a0
[dxvk] Add resource flag to track graphics pipeline side effects
2025-02-19 19:34:52 +01:00
Philip Rebohle
978d7cb65b
[dxvk] Add more convenience methods to track buffer barriers
2025-02-19 19:34:52 +01:00
Philip Rebohle
23067c48c7
[dxvk] Clean up CS chunk allocation
...
This also makes it more robust w.r.t. alignment.
2025-02-18 15:37:11 +01:00
Philip Rebohle
4c8ee300b5
[util] Add more optimal popcnt implementation
2025-02-18 15:28:41 +01:00
Robin Kertels
4282829f38
[d3d9] Route operations on unmappable memory through allocator
...
Fixes an extremely race condition that can happen when freeing a chunk.
2025-02-17 19:23:15 +01:00