Hans-Kristian Arntzen
4afd4d355b
vkd3d: Handle more DXR cases.
...
Found in Ghostrunner, still not working ...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
e0374d735d
vkd3d-shader: Add shader replacement support for DXR as well.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
5abc4b9af2
vkd3d: Add all relevant RT stages to push constant layout.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
9d3603c336
vkd3d: Fix root descriptor RTAS.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
9fa668867e
vkd3d: Hold private reference to collection objects.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
bd16d1a88d
vkd3d: Support RTPSO object collections.
...
This is quite complicated, but we can use VK_KHR_pipeline_library
to implement this functionality.
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
89679cbff1
tests: Test local definition exports.
...
Attempts to create a hit group out of shaders found in collection objects.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen
b306d605f3
tests: Add basic RT collection test.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Joshua Ashton
bc1b18dc02
vkd3d: Add some missing flags in debug_vk helpers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-22 14:29:45 +01:00
Joshua Ashton
d97683a8a4
d3d12: Rename d3d12_get_physical_device to d3d12_find_physical_device
...
A more accurate description of what's going on here.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-22 14:29:45 +01:00
Joshua Ashton
9f778bc871
d3d12: Use vkGetPhysicalDeviceProperties2
...
This is core in Vulkan 1.1.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-22 14:29:45 +01:00
Joshua Ashton
2fa97aa0fb
vkd3d: Move API versions to public header
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-22 14:29:45 +01:00
Hans-Kristian Arntzen
b7dfa99e57
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-19 13:42:47 +01:00
Hans-Kristian Arntzen
cf39639f5b
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-18 20:58:58 +01:00
Joshua Ashton
b71bc5ef6b
tests: Don't crash if WRITE_WATCH is broken
...
This can happen under Wine.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-18 16:56:36 +01:00
Joshua Ashton
4b6a1ef40d
tests: Add a WRITE_WATCH test
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-18 16:10:05 +01:00
Joshua Ashton
258173a0a7
vkd3d: Fix return value when WRITE_WATCH is forbidden
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-18 16:10:05 +01:00
Joshua Ashton
aa12817ccf
vkd3d: Implement D3D12_HEAP_TYPE_WRITE_WATCH
...
Needed for D3D12 APITrace
Closes : #373
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-18 14:41:46 +01:00
Hans-Kristian Arntzen
52a9c85bf2
vkd3d: Implement ClearState.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-18 10:50:21 +01:00
Joshua Ashton
4e31f5d54d
vkd3d: Align d3d12_rtv_desc to D3D12_DESC_ALIGNMENT
...
Otherwise we can do an alligned_malloc with a non-aligned size as the descriptor size is 48 for a d3d12_rtv_desc otherwise.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-16 21:45:28 +01:00
Joshua Ashton
5b5293ec93
vkd3d: Fix out of range in UpdateTileMappings
...
Previously this incremented and indexed before the loop checked this.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-16 21:45:13 +01:00
Joshua Ashton
43e7316591
tests: Default VKD3D_TEST_DEBUG to 1
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-16 21:43:01 +01:00
Philip Rebohle
dadace33b1
vkd3d: Fix potential hang in d3d12_command_queue_Release.
...
This can happen if the fence thread starts with a delay and
the queue gets destroyed shortly after being created.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-16 21:42:39 +01:00
Hans-Kristian Arntzen
34a09967d5
vkd3d: Prefer compute queues for TRANSFER.
...
TRANSFER + CONCURRENT is generally death for compression.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-16 21:41:37 +01:00
Hans-Kristian Arntzen
95fe4b61a6
vkd3d: Do not drop pending signals when signaling fence on CPU.
...
There isn't much of a reason why we should have to do this. The original
implementation was more of a hack if anything.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-16 21:41:37 +01:00
Hans-Kristian Arntzen
e7672c3233
vkd3d: Refactor where max pending timeline value is computed.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-16 21:41:37 +01:00
Hans-Kristian Arntzen
dbdbf94083
vkd3d: Ensure that virtual timeline values are updated in-order.
...
Increment physical value one by one, find the exact timeline value we're
supposed to signal and perform the update.
Select lowest physical timeline value correctly.
Array can be reordered now, so lowest value isn't necessarily first.
Fixes some super weird hangs in Control DXR.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-16 21:41:37 +01:00
Philip Rebohle
eab288bb4e
vkd3d: Simplify fence worker implementation.
...
Avoids potential busy-waiting on the driver with WAIT_ANY_BIT.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-16 12:43:24 +01:00
Philip Rebohle
93a80d5eaa
vkd3d: Create one fence worker per command queue.
...
Rather than one per device. This solves issues with D3D12 fences
being signalled too late because the fence worker is waiting on
a different set of semaphores while the fence is being enqueued.
Greatly increases performance in Horizon Zero Dawn and Death
Stranding with multi-queue mode enabled.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-16 12:43:24 +01:00
Philip Rebohle
34bca90a9c
vkd3d: Implement internal reference counting for d3d12_fence.
...
This will be necessary once we introduce fence workers per
command queue, since we cannot reliably store pointers to
queues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-16 12:43:24 +01:00
Hans-Kristian Arntzen
102ea2211b
vkd3d: Ignore IASetVertexBuffers for NULL pViews.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-15 14:55:53 +00:00
Hans-Kristian Arntzen
5b2cc545e8
vkd3d: Convert RTAS geometry flags.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-15 14:55:03 +00:00
Hans-Kristian Arntzen
c425343f41
vkd3d: Remove FIXME spam for pResourceAfter = NULL cases.
2021-03-15 14:10:27 +01:00
Philip Rebohle
0e4ef88d18
vkd3d: Don't broadcast semaphore waits when zeroing memory.
...
Instead, let queues wait on demand.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
7185e9776d
vkd3d: Introduce vkd3d_queue_add_wait.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
724257c0d8
vkd3d: Add multi_queue config flag.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
859aa3fd5a
vkd3d: Use VK_SHARING_MODE_CONCURRENT if multi-queue is enabled.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
1e3c91579e
vkd3d: Create one vkd3d queue per Vulkan device queue.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
3cd93781ff
vkd3d: Create multiple queues per queue family if possible.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
6967b1e92b
vkd3d: Wait for queue idle before destroying vkd3d queue.
...
Fixes a potential issue where we may destroy objects that
are still in use by the GPU.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
b0309f6f90
vkd3d: Introduce d3d12_device_allocate_vkd3d_queue.
...
Replaces d3d12_device_get_vkd3d_queue when mapping D3D12
command queues to Vulkan device queues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
7359686609
vkd3d: Introduce d3d12_device_get_vkd3d_queue_family.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle
4c0a0b0467
vkd3d: Introduce vkd3d_queue_family_info.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Hans-Kristian Arntzen
b4f48bf2d6
meta: Update README with new VKD3D_CONFIG flags.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-13 06:26:27 +00:00
Hans-Kristian Arntzen
b44bfa7066
vkd3d: Remove obsolete comment.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-13 06:26:27 +00:00
Hans-Kristian Arntzen
43370c6426
vkd3d: Only enable DXR if requested.
...
The implemnentation is not complete enough to safely enable it, since
some games will try to create RTPSOs by default, leading to crashes.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
58615cd5dc
vkd3d: Allow devices with recursion of 1 to be accepted.
...
We can fail RTPSOs later if they for whatever reason use recursion.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
d9be9b57f2
vkd3d: Actually use RGBA16 formats for RT VBO.
...
It's really supposed to load 4 components and ignore. RGB16 is not
mandatory, so just use the "expected" formats after all.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
2b6658da67
vkd3d: Enable RT tier 1.0 if possible.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen
3adc385167
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00