Philip Rebohle
35ead85929
[d3d11] Manually free all view objects in view destructor
2024-10-15 11:48:51 +02:00
Philip Rebohle
d00669cb52
[dxvk] Rename DxvkGpu{Event,Query} to Dxvk{Event,Query}
...
The old name only ever existed because DXVK had two separate implementations
of these prior to version 1.1. Let's name them back so that more sensible
names are available for internal use.
2024-10-13 12:08:35 +02:00
Philip Rebohle
a30fdc466b
[d3d11] Remove initializer context
...
This moves all initialization commands to the CS thread and the regular
context in such a way that resource initialization is processed before
any context commands can use the resource.
2024-10-08 17:46:18 +02:00
Philip Rebohle
df60a061a4
[d3d11] Throttle resource uploads via UpdateSubresource
...
Otherwise, some games (e.g. Frostpunk, New World) end up allocating over
a gigabyte of staging memory.
2024-10-08 17:46:18 +02:00
Philip Rebohle
ec18dd7846
[d3d11] Throttle resource uploads through staging buffer
2024-10-08 17:46:18 +02:00
Philip Rebohle
ad1f70beea
[dxvk] Support format conversion in copyImageToBuffer
2024-10-08 17:46:18 +02:00
Philip Rebohle
f67c8dd1da
[dxvk] Support format conversion in copyBufferToImage
2024-10-08 17:46:18 +02:00
Philip Rebohle
725a04b954
[dxvk,d3d11] Refactor uploadImage to consume a staging buffer
...
And also handle format differences.
2024-10-08 17:46:18 +02:00
Philip Rebohle
c92ee8ee07
[dxvk,d3d11] Refactor uploadBuffer to consume a staging buffer
2024-10-08 17:46:18 +02:00
Philip Rebohle
c27cae2f10
[d3d11] Improve per-context staging buffer handling
...
In D3D11, the staging buffer is only used for UpdateSubresource, which
isn't always used much. Reducing the size and freeing the buffer after
every submission avoids situations where system memory chunks are kept
alive by a single unused 4MB allocation.
2024-10-08 17:46:18 +02:00
Philip Rebohle
c614e537a9
[dxvk] Remove alignment parameter from staging buffers
...
Just align all suballocations to 256 bytes as usual.
2024-10-08 17:46:18 +02:00
Philip Rebohle
813524c146
[d3d11] Remove texel buffer path for ClearUAV
...
Instead, recreate the image with the given view format as
necessary. Most of the time we will not actually need this.
2024-10-06 08:47:42 +02:00
Philip Rebohle
329d9a0bb2
[dxvk] Add support for drawing a software cursor
2024-10-04 19:10:14 +02:00
Philip Rebohle
a278d6bf1d
[d3d11] Implement sequential swap effects
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
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
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
1443e22626
[d3d11] Fix derp with anisotropy option
...
Fixes #4313 .
2024-10-02 11:02:06 +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
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
438a08f87c
[d3d11] Add functions to emit externally generated CS chunks
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
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
Philip Rebohle
b4e69dce76
[dxvk] Remove DxvkImageViewCreateInfo
2024-09-28 01:50:23 +02:00
Philip Rebohle
8195bea63e
[dxvk] Remove DxvkBufferViewCreateInfo
...
Use the new key struct directly to avoid unnecessary struct conversion.
2024-09-28 01:21:07 +02:00
Philip Rebohle
b0d0959329
[dxvk] Remove DxvkDataBuffer
...
Unused.
2024-09-28 01:06:57 +02:00
Philip Rebohle
1cefe90ce7
[d3d11] Don't use data buffer for small buffer updates
...
Embed an array instead and lower the size threshold.
2024-09-28 01:05:40 +02:00
Philip Rebohle
01a7457a6f
[dxvk] Remove createImageView function
...
Use the image's method instead, like we already do for buffers.
2024-09-28 00:03:56 +02:00
Philip Rebohle
5e5c283149
[d3d11] Always use fast MAP_WRITE_DISCARD path on deferred contexts
...
... but keep the SingleUse option as-is anyway because games do not release
their command lists after submission and end up wasting massive amounts of
memory.
2024-09-26 17:37:50 +02:00
Philip Rebohle
39f50999a3
[d3d11] Cache raw mapped pointer rather than allocation object
...
Reduces ref counting overhead again and matches previous behaviour.
We should probably do something about the possible case of deferred context
execution with MAP_WRITE_DISCARD followed by MAP_WRITE_NO_OVERWRITE on the
immediate context, but we haven't seen a game rely on this yet.
2024-09-26 17:37:50 +02:00
Philip Rebohle
25076d9220
[dxvk] Rework image view creation
2024-09-26 17:37:50 +02:00
Philip Rebohle
713b76bea5
[dxvk] Rework image creation
...
Uses DxvkResourceAllocation to manage image backing storage,
which will allow invalidating images in the future.
2024-09-26 17:37:50 +02:00
Philip Rebohle
9a51849920
[d3d11] Use allocation cache for dynamic buffers
2024-09-26 17:37:50 +02:00
Philip Rebohle
088ba404a6
[dxvk] Rework buffer view creation
2024-09-26 17:37:50 +02:00
Philip Rebohle
1fd3c8040d
[dxvk] Remove DxvkBufferAllocation
2024-09-26 17:37:50 +02:00
Philip Rebohle
8e45a60542
[d3d11] Use DxvkBufferAllocation where appropriate
2024-09-26 17:37:50 +02:00
Philip Rebohle
15365f2d82
[d3d11] Synchronize shared texture initialization
2024-09-26 08:21:43 +02:00
Philip Rebohle
c8410e578e
[d3d11] Enable device address usage for non-mappable buffers
...
NVAPI queries the GPU address of certain resources in a way that could
break otherwise.
2024-09-18 15:55:57 +02:00
Philip Rebohle
ddb59ae394
[dxvk] Add usage property to buffer views
...
And pass it to the Vulkan driver depending on maintenance5 support.
2024-09-18 15:55:57 +02:00
llyyr
1a1c3a4202
[d3d9,d3d11] recreate swapchain on VK_SUBOPTIMAL_KHR
...
The vulkan wayland wsi returns suboptimal when the window is
fullscreened and not directly scanned out, and there are modifiers
available that would allow the window to be directly scanned out.
Recreate the swapchain if we receive suboptimal result.
This allows us recreate the swapchain to use a modifier that allows
direct scan-out under winewayland on wayland compositors.
2024-09-11 16:38:26 +02:00
Philip Rebohle
427e706a40
[util,d3d11] Be more robust against use-after-free
...
Sims 4 binds an SRV after destroying it, so we need to ensure our internal
view pointers are null or we'll create a problem otherwise.
2024-09-02 22:03:26 +02:00
Philip Rebohle
04d558cf2e
[util] Make frame rate limiter enablement heuristic more robust
...
Allow for more buffering to happen in order to not enable the limiter
too eagerly.
2024-09-02 17:50:47 +02:00
Robin Kertels
e4fd9ff16b
[d3d11] Always keep barrier control options set by app profile
2024-08-26 23:15:32 +02:00
Philip Rebohle
1c30bc92bb
[d3d11] Validate viewport parameters
...
And skip invalid calls. Fixes Senran Kagura Peach Ball.
2024-08-23 14:39:56 +02:00
Philip Rebohle
60e04503a6
[d3d11] Enable longMad/longDot behaviour by default
...
And remove the respective config options.
2024-08-14 22:15:50 +02:00
Philip Rebohle
4ee907a6df
[dxbc,d3d11] Add option to explicitly emit long dot products
2024-08-11 18:30:59 +02:00