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

6011 Commits

Author SHA1 Message Date
Philip Rebohle
c9ec2eeab2 [dxvk] Ensure image is in correct layout for invalidation
Otherwise, layout tracking might track a dead image and get confused.
2024-10-04 12:58:55 +02:00
Philip Rebohle
2af3fde5f2 [d3d9] Remove additional swap chain context 2024-10-04 12:58:55 +02:00
Philip Rebohle
172d3450d1 [d3d11] Rename EmitCsChunkExternal for consistency 2024-10-04 12:58:55 +02:00
Philip Rebohle
c678e8c803 [d3d11] Remove additional swap chain context
Do everything on the main context instead. Also only
present once regardless of sync interval.
2024-10-04 12:58:55 +02:00
Philip Rebohle
129efdaba6 [d3d11] Do not use separate context to initialize back buffers 2024-10-04 12:58:55 +02:00
Philip Rebohle
89ebabd8fd [dxgi] Enable frame rate limit for SyncInterval > 1 in windowed mode 2024-10-04 12:58:55 +02:00
Philip Rebohle
bf9dfc77ce [dxvk] Add context method for WSI synchronization
Mostly convenience, but we do want to get rid of Begin/EndRecording
at some point.
2024-10-04 12:58:55 +02:00
Philip Rebohle
63b200f08d [dxvk] Reimplement HUD rendering to use Vulkan directly
And change how rendering works in general so that we emit fewer
draw calls.
2024-10-04 12:58:55 +02:00
Philip Rebohle
b35c0bce4f [dxvk] Always enable multiDrawIndirect and shaderDrawParameters features 2024-10-04 12:58:55 +02:00
Philip Rebohle
46f10c8fd5 [dxvk] Add command list parameter to dispatch-related functions 2024-10-04 12:58:55 +02:00
Philip Rebohle
7d31a7f16f [dxvk] Add command list parameter to some query-related functions
And reintroduce cmdResetQueryPool.
2024-10-04 12:58:55 +02:00
Philip Rebohle
4ce200bcae [dxvk] Add command list parameter to cmdBindDescriptorSet(s) 2024-10-04 12:58:55 +02:00
Philip Rebohle
aa162365ce [dxvk] Add command list parameter to cmdPushConstants
We want to be able to invoke compute shaders during init commands.
2024-10-04 12:58:55 +02:00
Philip Rebohle
207e15eb24 [dxvk] Refactor swap chain blitter to use plain Vulkan
Temporarily disable the HUD until that is refactored too.
2024-10-04 12:58:55 +02:00
Philip Rebohle
1c06431e18 [dxvk] Add method to use a context's command list directly
Also provide the descriptor pool for convenience.
2024-10-04 12:58:55 +02:00
Philip Rebohle
09284988ff [hud] Show memory used percentage relative to budget 2024-10-03 23:47:56 +02:00
Philip Rebohle
0c49e30882 [dxvk] Add memory budget to memory stats 2024-10-03 23:47:56 +02:00
Philip Rebohle
513312885e [dxvk] Use actual memory budget if provided by the implementation
For now, this is only used for the heuristic on when to aggressively
free empty chunks and replaces the 80% heap size heuristic.

Periodically updates the memory budget from the worker thread.
2024-10-03 23:47:56 +02:00
Robin Kertels
7d05a99640 [d3d9] Fix StretchRect fast-path resolve 2024-10-03 00:06:51 +02:00
Robin Kertels
4807af01ad [d3d9] Resolve whole image in StretchRect
Fixes a validation error in Sims 4.
2024-10-02 20:22:37 +02:00
Philip Rebohle
1443e22626 [d3d11] Fix derp with anisotropy option
Fixes #4313.
2024-10-02 11:02:06 +02:00
Philip Rebohle
90b036f550 [dxvk] Fix undefined behaviour move 2024-09-30 17:44:45 +02:00
WinterSnowfall
a5e3f29074 [dxvk] Fix HUD memory chunk colors on UMA 2024-09-30 14:28:44 +02:00
Philip Rebohle
e83446f5c9 [d3d11] Fix remaining synchronization issues with CUDA interop 2024-09-30 10:29:27 +02:00
Philip Rebohle
c26c21edb4 [d3d11] Lock buffers in place when used with CUDA interop 2024-09-30 10:29:27 +02:00
Philip Rebohle
11f8dc0818 [dxvk] Add functions to lock in and query GPU buffer addresses 2024-09-30 10:29:27 +02:00
Philip Rebohle
9f0bd8e17f [d3d11] Lock textures in place when used with CUDA interop
Prevents images from being relocated by the backend.
2024-09-30 10:29:27 +02:00
Philip Rebohle
c59d6bd12c [dxvk] Add flag to ensure stable image GPU addresses 2024-09-30 10:29:27 +02:00
Philip Rebohle
438a08f87c [d3d11] Add functions to emit externally generated CS chunks 2024-09-30 10:29:27 +02:00
Philip Rebohle
abd888a0bb [dxvk] Clean up check whether buffer can be relocated 2024-09-30 10:29:27 +02:00
Philip Rebohle
b164d6e2a7 [d3d9] Do not proactively enable meta copy usage flags
Same as the corresponding D3D11 change, let the backend deal with this
when necessary.
2024-09-30 10:29:27 +02:00
Philip Rebohle
5f3fa9e423 [d3d11] Do not proactively enable meta copy usage flags
Instead, let the backend deal with this and recreate the image as necessary.
2024-09-30 10:29:27 +02:00
Philip Rebohle
2fa773e791 [dxvk] Bump maximum sampler count to 4000
All sampler allocations go through the pool now, so we can do this.
2024-09-30 10:29:27 +02:00
Philip Rebohle
150c40280f [dxvk] Get rid of internal blit samplers 2024-09-30 10:29:27 +02:00
Philip Rebohle
67d1285b08 [dxvk] Refactor meta blits 2024-09-30 10:29:27 +02:00
Philip Rebohle
58dab7e8c6 [dxvk] Refactor mip generation 2024-09-30 10:29:27 +02:00
Philip Rebohle
8c67af680c [dxvk] Refactor meta resolves 2024-09-30 10:29:27 +02:00
Philip Rebohle
2c176f4950 [dxvk] Refactor meta image copies 2024-09-30 10:29:27 +02:00
Philip Rebohle
ae90e74a5a [dxvk] Introduce concept of transfer-only views 2024-09-30 10:29:27 +02:00
Philip Rebohle
fd439c3e54 [dxvk] Ensure image compatibility for packed depth-stencil copies 2024-09-30 10:29:27 +02:00
Philip Rebohle
56a07b5bd0 [dxvk] Add function to recreate image views with guaranteed compatibility 2024-09-30 10:29:27 +02:00
Philip Rebohle
bfbb7987b2 [dxvk] Add functions to recreate images with additional usage info
Useful when we don't know in advance which usage flags are required
and don't want to set them preemptively for performance reasons.
2024-09-30 10:29:27 +02:00
Philip Rebohle
53f14e2914 [dxvk] Add functions to move resources to a different allocation
Basically a batched copy to use when one or more resources are being
recreated for any reason.
2024-09-30 10:29:27 +02:00
Philip Rebohle
ae3a9f595e [dxvk] Allow larger chunks on small heaps
Effectively doubles the size of HVV chunks to 32 MiB on systems that
do not have ReBAR enabled. 16 MiB is too small for some use cases.
2024-09-29 22:07:30 +02:00
Philip Rebohle
e6f89062f5 [d3d9] Ensure that we stay below the maximum sampler count 2024-09-28 20:21:06 +02:00
Philip Rebohle
07dfeeb319 [d3d9] Move building sampler key to CS thread
All this bit twiddling is a bit slow. Introduces another structure
containing a minimal amount of sampler parameters taken from the
raw D3D9 state.
2024-09-28 20:21:06 +02:00
Philip Rebohle
543b5c7af8 [d3d9] Optimize sampler state decoding
This code is rather hot now, so make sure it's fast.
2024-09-28 20:21:06 +02:00
Philip Rebohle
c7dab6a442 [d3d9] Remove internal sampler pool
We have a sampler pool in the backend now, let's use it.
2024-09-28 20:21:06 +02:00
Philip Rebohle
707ddd63a1 [dxvk] Add stat counter for samplers 2024-09-28 20:21:06 +02:00
Philip Rebohle
4635397bb1 [dxvk] Implement sampler pool
Deduplicates redundant sampler objects and makes sampler creation
as well as lifetime tracking a bit more efficient.
2024-09-28 20:21:06 +02:00