1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-27 13:54:16 +01:00

6667 Commits

Author SHA1 Message Date
Philip Rebohle
43f360d20c [d3d11] Move immediate constant buffers to non-mapped VRAM
This has the advantage that icbs can be defragmented and don't
take up space in HVV chunks that would potentially go unused.
2025-02-26 20:52:25 +01:00
Philip Rebohle
6f59124e9a [dxbc] Retrieve icb data directly from shader module 2025-02-26 20:52:25 +01:00
Philip Rebohle
d6d13edb7a [dxbc] Use smallest aligned vector type for buffer-backed ubo 2025-02-26 20:52:25 +01:00
Philip Rebohle
31192b6d3f [dxbc] Rework embedded immediate constant buffers
Considerably reduces the size of immediate constant buffer arrays when
not all vector components are used. Also adds bound-checking.
2025-02-26 20:52:25 +01:00
WinterSnowfall
31a4679960 [dxvk] Don't skip CPU devices when a device filter is set 2025-02-25 21:39:22 +01:00
Philip Rebohle
13bd234cea [dxvk] Actually fix multidraw workaround
Otherwise we'll end up using the feature anyway.
2025-02-25 14:18:05 +01:00
Philip Rebohle
dafb71b18e [d3d11] Add debug labels for submissions 2025-02-25 00:17:35 +01:00
Philip Rebohle
a0c8bbaf10 [dxvk] Add method to retrieve resource debug names 2025-02-25 00:17:31 +01:00
Philip Rebohle
9c395fd60d [dxvk] Disable VK_EXT_multi_draw on qcom drivers 2025-02-24 22:16:37 +01:00
Philip Rebohle
866228a37d [dxvk] Fix memory type selection for non-device local property flags
Fixes potential memory allocation issues on unified memory setups
that have unique memory types for different resources.
2025-02-24 22:16:37 +01:00
Philip Rebohle
60bf1f9ec4 [dxvk] Enable tiler mode on proprietary drivers as well
Not like it really hurts anyone.
2025-02-24 16:32:32 +01:00
Philip Rebohle
95e12decf1 [dxbc] Remove spammy debug logging 2025-02-24 15:40:52 +01:00
Philip Rebohle
e3f047a96a [d3d11] Remove d3d11.dcSingleUseMode option 2025-02-24 15:34:30 +01:00
Philip Rebohle
7208d06548 [dxvk] Clean up indirect draw unrolling
Also don't report explicit multidraw as merged draws, to be more
consistent with reporting in games that also use IndirectCount.
2025-02-23 18:58:19 +01:00
Philip Rebohle
fc3cf3e822 [d3d11] Properly initialize minUav counter
And also use it when resetting UAV bindings. Fixes a small oversight
that didn't affect correctness.
2025-02-23 13:34:11 +01:00
Philip Rebohle
c69dbc4490 [dxvk] Move draw and dispatch stat counters back to the context
Otherwise we'll count the HUD by accident. Only keep the barrier counter
since there are so many different places where we issue pipeline barriers,
and they are interesting anyway.
2025-02-23 13:24:28 +01:00
Philip Rebohle
a0ea29a2fa [hud] Display number of merged draws, if any 2025-02-23 13:24:28 +01:00
Philip Rebohle
9b37ba679a [dxvk] Add stat counter for merged draws 2025-02-23 13:24:28 +01:00
Philip Rebohle
016f05a770 [dxvk] Implement draw batching via VK_EXT_multi_draw 2025-02-23 13:24:28 +01:00
Philip Rebohle
7e503fa053 [dxvk] Enable VK_EXT_multi_draw if supported 2025-02-23 13:24:28 +01:00
Philip Rebohle
7815b6942d [d3d11] Implement direct draw batching
Not super useful without backend support though.
2025-02-23 13:24:28 +01:00
Philip Rebohle
fc3d3ae331 [dxvk,d3d11] Refactor CS command data allocation
Allows us to allocate a (potentially growing) array of
arbitrary data structures for a CS command.
2025-02-23 13:24:28 +01:00
Philip Rebohle
20dc389ab7 [d3d11] Skip unnecessary iterations when binding graphics UAVs
Some games will unconditionally use a high index for UAVStartSlot.
2025-02-23 12:06:51 +01:00
Philip Rebohle
9f9d51d52c [d3d11] Lazy-bind pixel shader UAVs
Moderately cursed because PS UAVs are also available to other graphics
stages.
2025-02-23 12:06:51 +01:00
Philip Rebohle
9389456d20 [d3d11] Lazy-bind compute shader UAVs
And factor UAV counter updates out of binding.
2025-02-23 12:06:51 +01:00
Philip Rebohle
69171873fa [d3d11] Add compile-time debug flag for lazy binding 2025-02-23 12:06:51 +01:00
Philip Rebohle
c0983a32be [d3d11] Reset dirty bindings on command submission 2025-02-23 12:06:51 +01:00
Philip Rebohle
3e6dfcfb15 [d3d11] Reset dirty tracking when re-applying context state 2025-02-23 12:06:51 +01:00
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
a61c114519 [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-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
be61341178 [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-23 12:06:51 +01:00
Philip Rebohle
6080e6d24d [d3d11] Store used binding mask inside shader objects 2025-02-23 12:06:51 +01:00
Philip Rebohle
75599780f2 [dxbc] Gather binding info during shader compilation 2025-02-23 12:06:51 +01:00
Philip Rebohle
5f16faaae0 [util] Generalize bit mask iterator 2025-02-23 12:06:51 +01:00
Robin Kertels
94b48c1633 [d3d9] Slightly clean up sampler slot handling 2025-02-21 13:25:23 +01:00
Robin Kertels
f7d56886c5 [d3d9] Fix sampler slot correction not respecting dmap texture 2025-02-21 13:25:23 +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