Philip Rebohle
177e70949c
[d3d11] Apply apitrace mode to image upload buffers
2022-02-22 01:30:43 +01:00
Philip Rebohle
8e11630370
[d3d11] Set zero stride when binding null vertex buffer
2022-02-19 13:20:36 +01:00
Philip Rebohle
17a1b0ad44
[d3d11] Consider empty CS chunks when tracking resources
...
Avoids deadlocks if we track multiple resources and flush in between.
2022-02-18 14:21:53 +01:00
Philip Rebohle
18a960a1e1
[d3d11] Use initBuffer method
2022-02-17 20:58:31 +01:00
Philip Rebohle
6d0e5dfd21
[d3d11] Use initImage to clear uninitialized image resources
2022-02-17 20:58:31 +01:00
Philip Rebohle
34fd16b8f2
[d3d11] Add implicit flush after tracking sequence numbers
...
Flushing early when using a tracked resource may reduce stalls.
2022-02-16 20:49:00 +01:00
Philip Rebohle
2dfdc5ac3b
[d3d11] Enable stall tracking for timestamp queries
...
Because games are dumb and don't understand that the GPU doesn't
work synchronously with the render thread.
2022-02-16 19:59:11 +01:00
Philip Rebohle
d45f5a8d79
[d3d11] Handle subresource field in copy/move operations
...
Derp.
2022-02-15 13:00:10 +01:00
Philip Rebohle
e1b3bc45ce
[d3d11] Add d3d11.maxImplicitDiscardSize option
2022-02-14 04:17:56 +01:00
Philip Rebohle
2f80f8847e
[d3d11] Use new waitForResource method
2022-02-14 03:15:47 +01:00
Philip Rebohle
80c5b61e26
[d3d11] Use DxvkStagingBuffer in D3D11DeviceContext
2022-02-13 02:08:19 +01:00
Philip Rebohle
26381fd5df
[d3d11] Only use updateBuffer for very small buffer updates
...
Otherwise we may end up with significant copy overhead on the CS thread.
2022-02-13 02:08:19 +01:00
Philip Rebohle
d96c5a1076
[dxvk] Store DXVK device inside DxvkCsThread object
2022-02-13 02:07:48 +01:00
Philip Rebohle
b6121c84aa
[d3d11] Avoid GPU synchronization on mapping images when possible
2022-02-11 18:17:35 +01:00
Philip Rebohle
3f16de157b
[d3d11] Avoid GPU synchronization on mapping buffers when possible
2022-02-11 18:17:35 +01:00
Philip Rebohle
c82b504e52
[d3d11] Further simplify D3D11DeferredContextMapEntry
...
And no longer create a strong reference to the given resource.
2022-02-11 18:17:35 +01:00
Philip Rebohle
2dcdd20517
[d3d11] Change D3D11ResourceRef constructor to be more useful
2022-02-11 18:17:35 +01:00
Philip Rebohle
0364a79eb0
[d3d11] Optimize Unmap on immediate contexts
2022-02-11 18:17:35 +01:00
Philip Rebohle
5a6711ed1d
[d3d11] Synchronize only to given sequence number in WaitForResources
...
Avoids costly thread synchronization when mapping staging resources
for reading, as well as some other scenarios.
2022-02-11 18:17:35 +01:00
Philip Rebohle
afe1840c74
[d3d11] Track resources when dispatching Cubin shaders as well
2022-02-11 18:17:35 +01:00
Philip Rebohle
bb16734a43
[d3d11] Implement sequence number tracking on deferred contexts
2022-02-11 18:17:35 +01:00
Philip Rebohle
2eeb7295c8
[d3d11] Increment sequence number when submitting command lists
...
This does not do any tracking on deferred contexts just yet.
2022-02-11 18:17:35 +01:00
Philip Rebohle
d33dac569c
[d3d11] Track last staging resource usage with a sequence number
2022-02-11 18:17:35 +01:00
Philip Rebohle
55a6b80919
[d3d11] Add method to query D3D11 resource dimension from texture
2022-02-11 18:17:35 +01:00
Philip Rebohle
d870b6ff38
[d3d11] Store ID3D11Resource interface in D3D11CommonTexture
...
Going full circle here, but it's actually useful now.
2022-02-11 18:17:35 +01:00
Philip Rebohle
9c32beccdc
[d3d11] Store buffer map mode in D3D11Buffer
...
Matches what we do for textures, and makes it so that we don't
have to dereference the resource pointer to figure this out.
2022-02-11 18:17:35 +01:00
Philip Rebohle
2db56fa160
[d3d11] Add D3D11ResourceRef
...
Implements private ref counting for arbitrary resource types.
2022-02-11 18:17:35 +01:00
Philip Rebohle
391c9e13ca
[d3d11] Add ResourceAddRef/ReleasePrivate with known resource type
2022-02-11 18:17:35 +01:00
Philip Rebohle
37f3d9208b
[dxvk] Introduce sequence numbers for CS submissions
2022-02-11 18:17:34 +01:00
Philip Rebohle
6c862b63a2
[d3d11] Optimize UpdateSubresource for small buffer updates
...
Some games use UpdateSubresource to upload constant buffers in
between draws, so this path should be as fast as possible.
Also fixes a potential issue when using D3D11_COPY_NO_OVERWRITE
on deferred contexts, since the Map requirements don't hold here.
2022-02-07 16:14:02 +01:00
Philip Rebohle
b746e1352b
[d3d11] Implement suballocation from staging buffer for small updates
2022-02-07 16:14:01 +01:00
Philip Rebohle
7cf78a2c75
[d3d11] Fix confusing code in deferred context Map
...
This did work, but we shouldn't use an object that was already moved.
2022-02-07 16:14:01 +01:00
Philip Rebohle
e4dbd1e337
[d3d11] Remove unused parameters from deferred context Map functions
2022-02-07 16:13:58 +01:00
Krzysztof Bogacki
b5d7b42e65
[d3d11] Add D3D11On12CreateDevice stub
2022-02-07 03:21:43 +01:00
Robin Kertels
5b39f0307e
[d3d11] Add FL12+ enum names
2022-01-27 19:42:14 +01:00
Joshua Ashton
ecd7b67069
[d3d11] Lock context before EmitCs for annotations
2021-12-21 03:09:08 +01:00
Philip Rebohle
1abd205216
[d3d11] Compute image data layout for unmapped textures
...
We sometimes need this information when uploading image data. Fixes #2380 .
2021-11-29 16:55:35 +01:00
Joshua Ashton
409a6f5c3f
[d3d11] Use atomics for NVX handles
...
Primarily to make DXVK native happy, but also much cleaner.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-22 03:15:03 +02:00
Philip Rebohle
b36fa75d1d
[dxvk] Disable CUDA interop extensions on 32-bit builds
2021-10-01 15:32:40 +02:00
Philip Rebohle
7193962381
[d3d11] Enable VK_KHR_buffer_device_address if necessary
...
Just enabling the extension doesn't necessarily do anything.
2021-10-01 14:12:17 +02:00
Robin Kertels
2735988fa2
[d3d11] Only use cube arrays for regular cubemap views when enabled
2021-09-26 23:17:16 +02:00
Adam Moss
86148ec070
[d3d11,dxvk] Implement DXVK pieces required for DX11 DLSS support
...
Notably, fairly generic functions to create/launch/destroy Cuda kernels,
and methods to fetch GPU virtual addresses and handles for DX11 resources.
Note: Requires some corresponding dxvk-nvapi changes for DLSS to
be initialized successfully.
2021-09-24 15:10:07 +02:00
Philip Rebohle
dd7ffbc803
[d3d11] Also validate draw buffer for DispatchIndirect
...
Oversight.
2021-09-12 16:18:25 +02:00
Philip Rebohle
de7fb51e64
[d3d11] Validate indirect draw buffer size
...
Otherwise, if the draw parameter offset is out of bounds, we
may hang the GPU.
Fixes #2286 .
2021-09-12 01:23:04 +02:00
Philip Rebohle
67391a7bb0
[d3d11] Introduce d3d11.ignoreGraphicsBarriers option
2021-09-09 14:28:25 +02:00
Georg Lehmann
b13260c689
[d3d11] Use BitMask helper
2021-08-16 08:49:46 -07:00
Philip Rebohle
56395c9bc8
[d3d11] Re-implement frame latency events using Win32 semaphore
...
Matches native DXGI behaviour more accurately, and fixes a hang in
Shin Megami Tensei 3.
2021-08-05 22:57:58 +02:00
Philip Rebohle
4c222ec557
[d3d11] Use callback fence to signal Flush1 event
2021-08-05 22:57:58 +02:00
Philip Rebohle
11bbc07ea1
[dxvk] Support destination pitch in packImageData
2021-07-19 16:54:56 +02:00
Philip Rebohle
e23792ef91
[d3d11] Fix handling sRGB UAV images
2021-07-07 16:00:12 +02:00