Philip Rebohle
67c5ab87f9
[d3d11] Add missing fragment shader stage to mapped image buffers
...
Relevant when uploading depth-stencil images.
2024-10-30 23:37:54 +01:00
Philip Rebohle
8ee7031742
[d3d11] Simplify InitHostVisibleBuffer
2024-10-30 23:37:54 +01:00
Philip Rebohle
223691b7aa
[d3d11] Use device fence wait in ThrottleAllocation
2024-10-30 23:37:54 +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
80fbaed291
Revert "[d3d11] Use existing MD5 hash to look up shader objects"
...
This reverts commit 800f71c4f53bb13276571b09fecf8c878eb7b9bd.
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
4af31a9d64
[dxvk] Remove context type concept
...
We only have a single context per device now.
2024-10-24 12:30:54 +02:00
Philip Rebohle
f3fa2535e8
[d3d11] Validate shader creation parameters
2024-10-23 16:56:32 +02:00
Philip Rebohle
800f71c4f5
[d3d11] Use existing MD5 hash to look up shader objects
...
Skips the expensive SHA-1 pass.
2024-10-23 16:56:32 +02:00
Philip Rebohle
ae9024492b
[d3d11] Devirtualize context method forwarding
2024-10-23 16:56:22 +02:00
Philip Rebohle
d10df6353b
[d3d11] Devirtualize resource and view creation method forwarding
2024-10-23 16:56:22 +02:00
Philip Rebohle
4c0cbbef6a
[dxvk] Factor DxvkResource code into DxvkPagedResource
...
And remove the now obsolete code.
2024-10-18 12:42:33 +02:00
Philip Rebohle
6540ab4f3e
[dxvk] Use DxvkPagedResource for CPU synchronization
2024-10-18 12:42:33 +02:00
Philip Rebohle
d72346f2cb
[dxvk] Rename various storage-related functions
2024-10-18 12:42:33 +02:00
Philip Rebohle
f8b9efd11e
[dxvk] Fix misaligned image uploads on transfer queue
2024-10-16 11:38:42 +02:00
Philip Rebohle
af4ec3c63d
[dxvk] Normalize render target layouts when binding framebuffer
...
No reason to use ATTACHMENT_OPTIMAL when the default layout is GENERAL.
2024-10-16 11:32:55 +02:00
Philip Rebohle
b2598906ca
[d3d11] Prefer GENERAL layout for read-only textures
2024-10-16 11:32:55 +02:00
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