Hans-Kristian Arntzen
c58edfabe1
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 16:03:16 +02:00
Hans-Kristian Arntzen
ab4e847e74
renderdoc: Add global capture support.
...
Useful for test suite since a test can be comprised of several smaller
submissions, and it's easier to debug if we have one trace.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:33:06 +02:00
Hans-Kristian Arntzen
385c3dc012
vkd3d: Add bug reference for split fallback types.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
d74cfe1883
tests: Add stress test for allocating RT/DS heaps.
...
Without a specific workaround, we will fail this test on NV.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
a2f350117f
tests: Add simple stress test for UPLOAD allocation.
...
Try to allocate a lot of memory at once. Useful for seeing if fallbacks
work as intended.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
26dc9e7da5
vkd3d: Allow CreateHeap to fail in certain fallback situations.
...
If we deduce that fallback heap allocation is impossible, we will accept
this, and defer allocation to CreatePlacedResource() instead where we make a committed resource.
This breaks aliasing, but in practice, this situation will only arise for render
targets, and it's not like we have a choice in the matter here on NV :\
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
7ee8eac818
vkd3d: Add allocation flag for DEDICATED.
...
When allocating dedicated memory, ignore heap_flag requirements we
deduce from memory info. Any memory type is allowed. This is important
on NV when allocating fallback render targets.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
cddb98acc6
vkd3d: Consider that we might attempt to free NULL memory.
...
For deferred heaps, we will accept NULL allocations.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
4075809a91
vkd3d: Make error message more precise when failing to allocate memory.
...
There are situations where we cannot fallback to system memory, so don't
log that we're going to do so.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
9065f312d5
vkd3d: Refactor out validation of CUSTOM heap types.
...
Don't attempt to enter memory allocation when we can invalidate a heap
allocation up front. Avoids some dumb edge cases later.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Hans-Kristian Arntzen
9415191111
vkd3d: Add LOG_MEMORY_BUDGET logging for non-budget as well.
...
Useful to be able to debug which allocations happen.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 15:32:54 +02:00
Joshua Ashton
c9ff20d4ac
vkd3d: Make a generic UE4 shader quirk collection
...
Many UE4 games have this broken bloom shader that samples a texture with implicit lod in divergent control flow.
Fixes Bus Simulator 21
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Joshua Ashton
7a66669e92
vkd3d: Add empty element to shader quirks
...
If we ever remove these, we need this for MSVC.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Joshua Ashton
d91d47d827
vkd3d: Use vkd3d_string_compare for shader quirks
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Joshua Ashton
70ee02bce0
vkd3d: Use vkd3d_string_compare for application overrides
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Joshua Ashton
4c959c8a77
vkd3d: Add vkd3d_string_compare helper
...
Compares a string with a given comparison mode.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Joshua Ashton
6dbb4f6dfe
vkd3d: Add vkd3d_string_ends_with helper
...
Checks if a string ends with another string.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-07 10:18:47 +01:00
Hans-Kristian Arntzen
0f802b151e
vkd3d-shader: Avoid undefined result for Ibfe/Ubfe/Bfi.
...
Width + offset must not overflow in SPIR-V. SM 5+ is well-defined here.
It's enough to just clamp the width against 32 - offset in all cases.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 15:45:02 +02:00
Hans-Kristian Arntzen
cd3d759b95
vkd3d: Enable VK_KHR_shader_integer_dot_product.
...
Accelerates SM 6.4 packed ops if present.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 15:38:59 +02:00
Hans-Kristian Arntzen
50d41d8f02
khronos: Update SPIR-V and Vulkan headers.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 15:38:59 +02:00
Hans-Kristian Arntzen
f58b23e8e7
tests: Verify that integer dot products do not saturate.
...
SPIR-V has a saturating and non-saturating variant, so to be sure ...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 15:38:59 +02:00
Hans-Kristian Arntzen
807232ceff
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 14:49:49 +02:00
Danylo Piliaiev
77c67e2bf5
vkd3d: Use 64bit atomics on all 64bit platforms
...
Previous check was not exhausting.
Closes : #830
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
2021-10-05 13:22:25 +02:00
Hans-Kristian Arntzen
4ff1166230
tests: Remove obsolete check for lack of wait-before-signal support.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-05 11:44:42 +02:00
Hans-Kristian Arntzen
d9cd18b1ca
vkd3d-shader: Handle vectorized FIRSTBIT_HI.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-01 16:23:52 +02:00
Hans-Kristian Arntzen
7b4423eee5
dxil-spirv: Update submodule.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-01 16:14:37 +02:00
Hans-Kristian Arntzen
4edd76d8bb
tests: Fix validation error in test_null_rtv.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-30 16:50:02 +02:00
Hans-Kristian Arntzen
4f7e4ee753
tests: Add test for rendering to unbound RTV.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-30 16:50:02 +02:00
Hans-Kristian Arntzen
af822939fb
vkd3d: Implement support for rendering to NULL/unbound RTV.
...
Need to use fallback pipeline system here.
Keep track of active masks for PSO and current render target.
The intersection of those sets are the attachments which should be
active in the render pass.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-30 16:50:02 +02:00
Hans-Kristian Arntzen
b0f3512b8b
tests: Add test for discarding UAVs in compute list.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-29 14:17:31 +02:00
Hans-Kristian Arntzen
173b565ccf
vkd3d: Optimize DiscardResource when all subresources are discarded.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-29 14:17:31 +02:00
Hans-Kristian Arntzen
0b11fad67c
vkd3d: Allow discarding UAV resources.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-29 14:17:31 +02:00
Hans-Kristian Arntzen
6f0677eb2e
vkd3d: Refactor out queue flags -> stages conversion.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-29 14:17:31 +02:00
Hans-Kristian Arntzen
0c2ddb89cd
vkd3d: Add CONFIG for forced CACHED memory.
...
Very useful for capturing. Speeds up a ton.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-27 14:48:26 +02:00
Hans-Kristian Arntzen
6863f1c6a8
vkd3d: Fix test suite regression on NV.
...
Fix failure in test_create_heap where a TIER_2 host visible heap was
attempted, but failed due to recent DEATHLOOP fixes.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-24 16:48:34 +02:00
Joshua Ashton
bde3ad8e01
vkd3d: Move ID3D12StateObject impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
cabc31fc4c
vkd3d: Move ID3D12Device impl_froms to header
...
Basic casts should not be function calls.
2021-09-23 12:12:13 +02:00
Joshua Ashton
bfaf72386f
vkd3d: Move ID3D12CommandSignature impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
b84c3ff163
vkd3d: Move ID3D12PipelineState impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
7c993ae1a6
vkd3d: Move ID3D12RootSignature impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
875fbe5f50
vkd3d: Move ID3D12QueryHeap impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
2334c136e3
vkd3d: Move ID3D12DescriptorHeap impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
8d5308c9a1
vkd3d: Move ID3D12Resource impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
27e66b5c4a
vkd3d: Move ID3D12Heap impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
26d8011b06
vkd3d: Move ID3D12Fence impl_froms to header
...
Basic casts should not be function calls.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
e597adb83a
vkd3d: Move d3d12_query_heap_type_get_data_size to header
...
This should be inlined.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Joshua Ashton
3b3bd37f93
vkd3d: Avoid tracking + ending render passes when calling ResolveQueryData with 0 queries
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-23 12:12:13 +02:00
Conor McCarthy
da8daa860b
tests: Add test for SampleDesc.Count == 0 in test_create_committed_resource().
...
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
2021-09-23 11:00:04 +01:00
Conor McCarthy
446c7423ce
vkd3d: Return E_INVALIDARG for texture creation if SampleDesc.Count == 0.
...
Windows returns E_INVALIDARG at least on AMD and Intel.
Psychonaughts 2 seems to use this as a de facto "do not create"
value, and reasonable vram usage depends on the call failing.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
2021-09-23 11:00:04 +01:00
Conor McCarthy
d366ba47ac
Revert "vkd3d: Support SAMPLE_DESC.Count of 0"
...
Windows returns E_INVALIDARG in this case.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
2021-09-23 11:00:04 +01:00