Philip Rebohle
6757b5a249
[d3d11] Use sfence before finishing or submitting command list
2025-02-25 00:00:02 +01:00
Philip Rebohle
9f9d51d52c
[d3d11] Lazy-bind pixel shader UAVs
...
Moderately cursed because PS UAVs are also available to other graphics
stages.
2025-02-23 12:06:51 +01:00
Philip Rebohle
9389456d20
[d3d11] Lazy-bind compute shader UAVs
...
And factor UAV counter updates out of binding.
2025-02-23 12:06:51 +01:00
Philip Rebohle
69171873fa
[d3d11] Add compile-time debug flag for lazy binding
2025-02-23 12:06:51 +01:00
Philip Rebohle
c0983a32be
[d3d11] Reset dirty bindings on command submission
2025-02-23 12:06:51 +01:00
Philip Rebohle
3e6dfcfb15
[d3d11] Reset dirty tracking when re-applying context state
2025-02-23 12:06:51 +01:00
Philip Rebohle
a2c9c0f740
[d3d11] Use resource cookies for draw buffer tracking
...
Avoids keeping draw buffers alive when the app stops using indirect
draws. Unlikely to have caused issues in practice, but draw buffers
are not part of the API state to begin with.
2025-02-19 19:34:52 +01:00
Philip Rebohle
813ae020b6
[d3d11] Flush more around non-multisampled render passes
2025-02-11 16:14:53 +01:00
Philip Rebohle
80fb7e2294
[d3d9,d3d11] Adjust flush heuristic on tiling GPUs
...
Probably needs work, just disable most of the heuristic for the time being.
2025-02-10 16:13:31 +01:00
Philip Rebohle
59e53c1863
[d3d11] Add queue parameter to CS chunk injection
2025-01-25 18:02:20 +01:00
Philip Rebohle
539da5abdf
[dxvk] Refactor CS chunk queues
...
Introduces two queues and allows us to dispatch chunks to the ordered
queue without disrupting the sequence number.
2025-01-25 18:02:20 +01:00
Philip Rebohle
21f69eceaa
[d3d11] Implement latency tracking
2025-01-25 18:02:20 +01:00
Philip Rebohle
4fb6403b8f
[d3d11] Store map mode as raw integer
...
Fixes some annoying error with clang, hopefully.
2024-11-16 16:58:17 +01:00
Philip Rebohle
bdd4956dd3
[d3d11] Properly validate map parameters for images
2024-11-08 11:19:21 +01:00
Philip Rebohle
da406133f1
[d3d11] Add D3D11_COMMON_TEXTURE_MAP_MODE_DYNAMIC
2024-11-08 11:19:21 +01:00
Philip Rebohle
ae67c026aa
[d3d11] Implement image MAP_WRITE_DISCARD on immediate context
2024-11-08 11:19:21 +01:00
Philip Rebohle
1832332d6d
[d3d11] Add GetMapPtr method to D3D11CommonTexture
...
Fixes a bug in Read/WriteSubresource where discards result in the wrong
pointer being passed to the app.
2024-11-08 11:19:21 +01:00
Philip Rebohle
d4f25c81be
[d3d11] Remove d3d11.maxImplicitDiscardSize option
2024-10-31 12:13:27 +01:00
Philip Rebohle
f9bb8f0ad5
[d3d11] Consider discards when throttling immediate context
2024-10-31 12:13:26 +01:00
Philip Rebohle
a91afc3a2f
[d3d11] Do not touch row/depth pitch on failed map
...
Fixes a wine test.
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
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
6540ab4f3e
[dxvk] Use DxvkPagedResource for CPU synchronization
2024-10-18 12:42:33 +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
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
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
172d3450d1
[d3d11] Rename EmitCsChunkExternal for consistency
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
438a08f87c
[d3d11] Add functions to emit externally generated CS chunks
2024-09-30 10:29:27 +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
9a51849920
[d3d11] Use allocation cache for dynamic buffers
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
Robin Kertels
e4fd9ff16b
[d3d11] Always keep barrier control options set by app profile
2024-08-26 23:15:32 +02:00
Danylo Piliaiev
58d8ea2d31
[d3d11,d3d9,util] Add a config option for reproducible VK output
...
It ensures that for the same D3D commands the output VK commands
don't change between runs.
Useful for comparative benchmarking, can negatively affect performance.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
2024-05-23 15:20:28 +02:00
Philip Rebohle
3d5becaf6a
[d3d11] Implement Acquire/ReleaseWrappedResource
2023-03-18 00:50:42 +01:00
Philip Rebohle
3f9d2269f6
[d3d11] Synchronize queue submissions for 11on12 devices as necessary
...
When the app explicitly calls Flush, Signal or Wait, we need to wait
for the submission to actually take place so that subsequent D3D12
submissions execute in the correct order.
2023-03-18 00:50:42 +01:00
Philip Rebohle
da32453b42
[dxvk] Add submission feedback to command submissions
2023-03-16 20:59:43 +01:00
Philip Rebohle
d7a4ddb5d0
[d3d11] Implement more accurate resource tracking on deferred contexts
...
Allows us to track chunks that access any given tracked resource more
accurately and flush as needed, e.g. if a staging buffer is written at
the start of a long command list.
2023-01-17 15:01:06 +01:00
Philip Rebohle
cf5adb8b12
[d3d11] Improve flushing around deferred context submissions
2023-01-17 15:01:06 +01:00
Philip Rebohle
591e2df701
[d3d11] Consider flushing after each CS chunk
...
This way we will never end up with overly long command lists.
2023-01-17 15:01:06 +01:00
Philip Rebohle
2a3d7ee7dc
[d3d11] Use new flush heuristic
2023-01-17 15:01:06 +01:00
Philip Rebohle
f952418958
[d3d11] Determine pending commands based on sequence number
...
We get this for free and this allows us to query how many CS chunks
have been emitted since the last flush.
2023-01-17 15:01:06 +01:00
Joshua Ashton
000a647c56
[d3d11] Store D3D11DeviceContextState as private ref
...
Avoids a circular dependency
2022-09-16 12:49:10 +02:00
Philip Rebohle
fdcbdeb28f
[d3d11] Implement dirty trackig for default-mapped images
...
Avoids GPU synchronization when using WriteToSubresource,
and also reduces bandwidth.
2022-09-05 05:52:55 +02:00
Philip Rebohle
ca833082b5
[d3d11] Fix broken image readback for mapped default images
2022-09-05 04:31:13 +02:00
Philip Rebohle
559fa50f54
[d3d11] Introduce d3d11.enableContextLock option
2022-08-24 12:27:02 +02:00