1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

6734 Commits

Author SHA1 Message Date
Philip Rebohle
fe58b393d4 [util] Add helper for 2D and 3D morton codes 2025-03-02 14:01:09 +01:00
Philip Rebohle
c21f4e0190 [util] Add 48-bit integer type 2025-03-02 14:01:09 +01:00
Philip Rebohle
416f9c5a4a [d3d11] Embed UpdateBuffer data in CS chunk
Tiny optimization that gets rid of a copy and also lets us use chunk
memory more efficiently.
2025-03-02 13:29:48 +01:00
Philip Rebohle
5b68884fd9 [d3d11] Fix confusing debug color for GPU synchronization
Purple was already used for various other things.
2025-03-01 16:37:39 +01:00
Robin Kertels
8f84085370 [dxvk] Add CS thread load to the HUD 2025-03-01 14:23:22 +01:00
Philip Rebohle
b35e69b467 [d3d11] Skip empty draws
Watch Dogs 2 likes to do this with graphics UAVs bound, which
introduces quite a bit of unnecessary GPU synchronization.
2025-03-01 11:30:38 +01:00
Philip Rebohle
11dc0e7ce8 [util] Enable compute UAV barriers for Watch Dogs 2 2025-02-28 23:57:26 +01:00
Philip Rebohle
6b5d595b3e [d3d11] Add option to force compute shader UAV synchronization 2025-02-28 23:57:26 +01:00
Philip Rebohle
396a4e0235 [dxbc] Add option to implicitly synchronize UAV accesses 2025-02-28 23:57:26 +01:00
Philip Rebohle
c04410ca00 [dxbc] Increase maximum size of embedded icbs to 256 bytes
Gives drivers more info, while still avoiding duplication of large ICBs
when compiling the same shader into a large number of pipelines.
2025-02-28 12:07:49 +01:00
Philip Rebohle
fcbdff3b72 [d3d9] Set correct input topology for SWVP emulation
Otherwise we'll run the input patch pass, even if it doesn't do anything.
2025-02-26 20:58:47 +01:00
Philip Rebohle
0359a3521d [dxvk] Patch geometry shader if input topology does not match pipeline 2025-02-26 20:53:43 +01:00
Philip Rebohle
b41253e18d [dxvk] Add pass to patch GS input topology if necessary 2025-02-26 20:53:43 +01:00
Philip Rebohle
96a260e94e [dxbc] Write back GS input topology to shader info 2025-02-26 20:53:43 +01:00
Philip Rebohle
2cb9d40f88 [dxvk] Add input topology field to shader info 2025-02-26 20:53:43 +01:00
Philip Rebohle
2cd305e606 [dxvk] Enable uniformBufferStandardLayout feature
Core and required in Vulkan 1.2, but keep it optional anyway for now
since we're not really doing anything critical with it.
2025-02-26 20:52:25 +01:00
Philip Rebohle
ec5bd04378 [dxvk] Remove uniform data from shaders
No longer used
2025-02-26 20:52:25 +01:00
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