1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 00:48:44 +01:00
Commit Graph

6268 Commits

Author SHA1 Message Date
Philip Rebohle
45b0f13dd6 frog 2024-10-28 18:59:37 +01:00
Philip Rebohle
6bdc9f3b3d [dxvk] Increment stat counters in command list rather than context
Might change some numbers, but it's closer to reality.
2024-10-28 15:59:43 +01:00
Philip Rebohle
3ee825c2ef [dxvk] Initialize additional command buffers on demand
The vast majority of submissions will only use one or two command buffers
rather than all five, and only the main command buffer will almost always
actually be used. This also saves us a bunch of CPU-side tracking.
2024-10-28 15:59:43 +01:00
Philip Rebohle
3aa5693b97 [dxvk] Add dedicated command buffers for initial layout transitions
This helps batch initial layout transitions for image uploads.
2024-10-28 13:33:53 +01:00
Philip Rebohle
69d562e701 [dxvk] Refactor command buffer allocation 2024-10-28 13:33:53 +01:00
Philip Rebohle
8a79699ae3 [dxvk] Use out-of-order transfer helper in clearImageViewCs
Covers image-related ClearUAV use cases.
2024-10-28 13:33:53 +01:00
Philip Rebohle
a68b2653aa [dxvk] Use out-of-order transfer helper in clearBufferView
Covers some ClearUAV / ClearView use cases involving buffers.
2024-10-28 13:33:53 +01:00
Philip Rebohle
9941c3e8ca [dxvk] Use out-of-order transfer helper in copyBufferToImage 2024-10-28 13:33:53 +01:00
Philip Rebohle
c402c62fde [dxvk] Use out-of-order transfer helper in updateBuffer 2024-10-28 13:33:53 +01:00
Philip Rebohle
cf2c81f5ef [dxvk] Use out-of-order transfer helper in copyBuffer 2024-10-28 13:33:53 +01:00
Philip Rebohle
c02b5ed10b [dxvk] Use out-of-order transfer helper in clearBuffer 2024-10-28 13:33:53 +01:00
Philip Rebohle
76db753024 [dxvk] Add helper for out-of-order resource transfers 2024-10-28 13:33:53 +01:00
Philip Rebohle
06280a2ce5 [dxvk] Add command list tracking to resource 2024-10-28 13:33:53 +01:00
Philip Rebohle
9aed82c00a [dxvk] Fix nonsensical layout check in ensureImageCompatibility
Derp, this fixes some unnecessary barriers.
2024-10-28 13:33:35 +01:00
Philip Rebohle
0fd00087e9 [dxvk] Filter out BDA usage for buffer invalidation early exit 2024-10-28 00:03:26 +01:00
Ethan Lee
469025d234 native: Add SDL3 WSI
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2024-10-27 12:58:22 +01:00
Philip Rebohle
0259f55285 wsi: Pass window state to setWindowMode 2024-10-27 12:58:22 +01:00
WinterSnowfall
5ad84563dd [d3d9] Improve the naming of GetFormatBlockSize helper 2024-10-27 12:36:33 +01:00
WinterSnowfall
7ffe77f7c4 [d3d9] Validate pBox dimensions with LockBox 2024-10-27 12:36:33 +01:00
WinterSnowfall
a0d48cd2a2 [d3d9] Adjust pLockedRect/pLockedBox clearing and return behavior 2024-10-27 12:36:33 +01:00
WinterSnowfall
63d9affdcb [d3d9] Add volume texture creation and locking validations 2024-10-27 12:36:33 +01:00
WinterSnowfall
a323abe085 [d3d9] Validate alignment for block aligned formats 2024-10-27 12:36:33 +01:00
WinterSnowfall
678ccc721d [d3d9] Validate pRect dimensions with LockRect 2024-10-27 12:36:33 +01:00
Philip Rebohle
80fbaed291 Revert "[d3d11] Use existing MD5 hash to look up shader objects"
This reverts commit 800f71c4f5.

We can't do this without breaking fossilize DBs because we compile the
SHA1 hash into the shader binary.
2024-10-27 12:53:11 +01:00
Philip Rebohle
4709d429ed [dxbc] Fix EvalSnapped offset interpretation 2024-10-27 12:52:15 +01:00
Philip Rebohle
640758afcf [util] Enable mapped memory clearing for Vindictus 2024-10-27 02:43:58 +02:00
Philip Rebohle
ed83534970 [dxvk] Add option to clear mapped memory regions to zero 2024-10-27 02:43:58 +02:00
Philip Rebohle
e9574a4155 [dxvk] Add utility function to clear large regions of memory 2024-10-27 02:43:58 +02:00
Philip Rebohle
d535e2964f [dxvk] Remove obsolete comments 2024-10-25 19:22:58 +02:00
Philip Rebohle
3268bda4a2 [dxvk] Fix potential issues in invalidateImageWithUsage
Relevant for image recreation in D3D9, not so much for defrag
since we do everything late in the command list anyway.
2024-10-25 19:22:58 +02:00
Philip Rebohle
1a4ac219ed [dxvk] Properly flush everything before recording defrag commands 2024-10-25 19:22:58 +02:00
Philip Rebohle
7df58de815 [dxvk] Do not emit useless image barriers in relocateResources
Instead, fold barriers with no layout transition into a simple memory
barrier to bring this in line with the usual barrier logic.
2024-10-25 19:22:58 +02:00
Philip Rebohle
763780fb4c [dxvk] Remove obsolete fence code from command submissions
Unused since the timeline semaphore rework.
2024-10-25 11:31:01 +02:00
Philip Rebohle
662cfd49f5 [dxvk] Fix nonsensical pipeline stages when relocating resources 2024-10-24 15:19:43 +02:00
Philip Rebohle
640379e54b [dxvk] Remove obsolete DxvkDeviceOptions structure
This hasn't been used since 2.0.
2024-10-24 12:31:18 +02:00
Philip Rebohle
ec62551412 [dxvk] Add option to disable memory defragmentation 2024-10-24 12:31:18 +02:00
Philip Rebohle
9977313c32 [dxvk] Do not defragment chunks with immovable resources 2024-10-24 12:31:18 +02:00
Philip Rebohle
62f266098e [dxvk] Consider driver allocations when computing memory budget 2024-10-24 12:31:18 +02:00
Philip Rebohle
de400ae8a9 [dxvk] Increase memory task tick rate to 0.5s
Makes cleanup a bit quicker in some cases.
2024-10-24 12:31:18 +02:00
Philip Rebohle
7a09ab6c83 [dxvk] Limit amount of memory to relocate per submission
If the resources we're moving around are in slow memory, moving a full
chunk at once can already take several milliseconds. Try to avoid that.
2024-10-24 12:31:18 +02:00
Philip Rebohle
787671ef62 [dxvk] Limit number of allocations to move per submissions 2024-10-24 12:31:18 +02:00
Philip Rebohle
899f48bc43 [dxvk] Periodically defragment VRAM chunks 2024-10-24 12:31:18 +02:00
Philip Rebohle
c4cddebb89 [hud] Visualize inactive chunks 2024-10-24 12:31:18 +02:00
Philip Rebohle
2c8fe59924 [dxvk] Sort chunks by allocation time for statistics 2024-10-24 12:31:18 +02:00
Philip Rebohle
69437c2fea [dxvk] Include chunk status in statistics 2024-10-24 12:31:18 +02:00
Philip Rebohle
7a693ed41a [dxvk] Implement per-submission resource relocation 2024-10-24 12:31:18 +02:00
Philip Rebohle
9cbd45b8cf [dxvk] Add helper class for resource relocation 2024-10-24 12:31:18 +02:00
Philip Rebohle
0723250c12 [dxvk] Introduce flag to synchronize transfer queue
Also, get rid of superfluous binary semaphores since we have
a straight per-submission timeline anyway.
2024-10-24 12:31:18 +02:00
Philip Rebohle
13da763f9b [dxvk] Use small_vector in submission code 2024-10-24 12:31:18 +02:00
Philip Rebohle
800792a67d [dxvk] Add function to safely acquire a resource 2024-10-24 12:31:18 +02:00