1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-04 16:24:29 +01:00
Commit Graph

6271 Commits

Author SHA1 Message Date
Philip Rebohle
bebabe8c38 [dxvk] Optimize resource tracking
This way we only count each resource once per submission, or twice
in case a read access is followed by a write.

This also fixes a potential tracking bug with shader-writeable resources.
2024-10-30 04:04:40 +01:00
Philip Rebohle
10fac66007 [dxvk] Don't override tracked write with a read
Fixes a regression in Control.
2024-10-30 03:39:45 +01:00
Jeff
201e1628b0 [d3d9] Add ID3D9VkInteropTexture to volumes 2024-10-30 02:17:35 +01:00
Philip Rebohle
e499f2e081 [d3d11] Fix potential crash when mapping a default image fails
This also marginally shortens common code paths.
2024-10-29 18:05:14 +01:00
Philip Rebohle
c2928ab3e2 [dxvk] Increment stat counters in command list rather than context
Might change some numbers, but it's closer to reality.
2024-10-28 23:03:46 +01:00
Philip Rebohle
7cd8a14673 [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 23:03:46 +01:00
Philip Rebohle
34b82a2b5b [dxvk] Add dedicated command buffers for initial layout transitions
This helps batch initial layout transitions for image uploads.
2024-10-28 23:03:46 +01:00
Philip Rebohle
d85cabe457 [dxvk] Refactor command buffer allocation 2024-10-28 23:03:46 +01:00
Philip Rebohle
b5e5d7a498 [dxvk] Use out-of-order transfer helper in clearImageViewCs
Covers image-related ClearUAV use cases.
2024-10-28 23:03:46 +01:00
Philip Rebohle
c795415c39 [dxvk] Use out-of-order transfer helper in clearBufferView
Covers some ClearUAV / ClearView use cases involving buffers.
2024-10-28 23:03:46 +01:00
Philip Rebohle
301f06bdfb [dxvk] Use out-of-order transfer helper in copyBufferToImage 2024-10-28 23:03:46 +01:00
Philip Rebohle
e69f09175f [dxvk] Use out-of-order transfer helper in updateBuffer 2024-10-28 23:03:46 +01:00
Philip Rebohle
28a1077c06 [dxvk] Use out-of-order transfer helper in copyBuffer 2024-10-28 23:03:46 +01:00
Philip Rebohle
8269b93f51 [dxvk] Use out-of-order transfer helper in clearBuffer 2024-10-28 23:03:46 +01:00
Philip Rebohle
c8ab88e8f5 [dxvk] Add helper for out-of-order resource transfers 2024-10-28 23:03:46 +01:00
Philip Rebohle
f0054e7e65 [dxvk] Add command list tracking to resource 2024-10-28 23:03:46 +01:00
Philip Rebohle
dd6d82e1ce [dxvk] Fix nonsensical layout check in ensureImageCompatibility
Derp, this fixes some unnecessary barriers.
2024-10-28 23:03:46 +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