Philip Rebohle
f536daaacb
vkd3d: Introduce new memory allocation functions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 15:19:11 +01:00
Philip Rebohle
417b3b746e
vkd3d: Introduce vkd3d_allocate_cookie.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 14:04:16 +01:00
Joshua Ashton
00c8d1df9d
vkd3d: Refactor vkd3d_physical_device_info_init
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-15 11:25:21 +01:00
Joshua Ashton
c0d4ead8ca
vkd3d: Implement TIER_1 variable rate shading
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-12 13:39:05 +01:00
Joshua Ashton
fccbd3b5e2
vkd3d: Eliminate wchar_size, use UTF-16 string literals
...
Achieves this with C standard stuff alone, and no compiler hacks.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-09 11:26:28 +01:00
Joshua Ashton
38d2de9f4c
vkd3d: Fix warning in query logging
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-08 16:36:15 +01:00
Hans-Kristian Arntzen
c558c8f423
vkd3d: Implement Get*StackSize().
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
13b737214b
vkd3d: Remove owned root signatures.
...
Apparently the docs are lying and RTPSO does not hold references to the
root signatures after all.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
bfe9a39c3b
vkd3d: Implement the basics of RTPSO.
...
Implement enough that the test case compiles correctly.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
1784351dcf
vkd3d-shader: Move root parameter structs to vkd3d-shader.
...
Need it here since local root signatures need to know
the physical layout of the record buffer up front.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
fdcf583cbc
vkd3d: Rename COUNTER buffer to AUX_BUFFER.
...
We will use the same pointer buffer to handle acceleration structures,
so unify this buffer under a new name. Simplifies some of the binding
code since SRV path and UAV path looks more similar now.
Only difference is that UAV path uses BDA -> uint32_t,
and SRV uses BDA -> RTAccelerationStructure.
RT requires BDA, so the fallback descriptor set (storage texel buffer) is never used for RT.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
f3becc21a4
vkd3d: Implement local root signatures.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
9b856ed124
vkd3d: Add entry points for VK_KHR_ray_tracing_pipeline.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen
4957d561dc
vkd3d: Add dummy entry to app overrides.
...
Empty array declaration is not legal C.
Fixes compilation error on MSVC.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Joshua Ashton
51bf939743
vkd3d: Implement DXGI_FORMAT_B4G4R4A4_UNORM
...
Uses VK_EXT_4444_formats.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-04 12:04:10 +01:00
Philip Rebohle
00872471eb
vkd3d: Set WriteBufferImmediateSupportFlags properly.
...
We do not support bundles, but advertizing WriteBufferImmediate
support for bundles is required for Feature Level 12_2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-01 11:09:56 +01:00
Philip Rebohle
2560c76861
vkd3d: Disable accelerationStructureCaptureReplay feature.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-28 18:55:52 +01:00
Philip Rebohle
b4bc92714a
vkd3d: Always align scratch buffer for query data to 8 bytes.
...
Fixes a validation error. With VK_QUERY_RESULT_64_BIT we need
to use 8-byte alignment, but ssbo_alignment may be less.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-26 21:04:11 +01:00
Hans-Kristian Arntzen
2bc9dc7909
vkd3d: Add FL override for 12.2 (DX12 Ultimate).
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Hans-Kristian Arntzen
9893b7f52c
vkd3d: Enable SM 6.3.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Hans-Kristian Arntzen
31fa512512
vkd3d: Add checks for RayTracing tier.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Hans-Kristian Arntzen
c8f8b24674
vkd3d: Enable ray tracing extensions.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Hans-Kristian Arntzen
e89c286075
vkd3d: Report OPTIONS7 features.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-26 15:00:15 +01:00
Georg Lehmann
c76f37d41c
vkd3d: Introduce VKD3D_FILTER_DEVICE_NAME.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-01-25 15:29:34 +01:00
Hans-Kristian Arntzen
326d1cde60
vkd3d-shader: Remove DXIL being optional.
...
We always build with DXIL, not using autotools anymore.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-25 14:03:37 +01:00
Philip Rebohle
c6095e740d
vkd3d: Do not create query pool for inline query types.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
7b524590ab
vkd3d: Introduce d3d12_query_heap_type_is_inline.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
098ad5c071
vkd3d: Remove disable_query_optimization workaround.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
7ea11ededb
vkd3d: Use virtual queries for transform feedback queries as well.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
c9525cf5ca
vkd3d: Allocate new virtual query for active queries as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
b995780de1
vkd3d: Reimplement binary occlusion query resolve.
...
No longer requires BDA support since it's easier now to work
around buffer alignment issues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
5c550b5cda
vkd3d: Rewrite binary occlusion query resolve shader.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
32f7ba6630
vkd3d: Use virtual queries for inline query types.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
4a558ce501
vkd3d: Compute query stride from heap type rather than query type.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
abc204cea4
vkd3d: Create buffer for query heap as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
39c7f8f32d
vkd3d: Introduce pending query list.
...
This will store the list of queries to resolve.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
6e3a7d37cc
vkd3d: Store more information in active query list.
...
Allows us to map D3D12 queries to virtual queries and vice versa.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
59acbfeb41
vkd3d: Add query resolve pipelines to meta ops.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
cc8fb3ae1c
vkd3d: Add query resolve shader.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Philip Rebohle
16f5cff061
vkd3d: Implement virtual query allocation.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-19 14:11:46 +01:00
Hans-Kristian Arntzen
a531ee5fd4
vkd3d: Remove force_bindless_texel_buffer workaround.
...
Obsolete now that we fully split typed and untyped buffer descriptors.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Hans-Kristian Arntzen
97e0d8e751
vkd3d: Move bindless SSBO out of MUTABLE set and fill both descriptors.
...
We will need separate descriptor sets to be able to handle typed vs
untyped buffer workarounds.
Also writes multiple descriptors for buffers views to make sure MUTABLE
and SSBO sets are filled (or TEXEL_BUFFER + SSBO for non-mutable).
Applications often get this wrong and use raw buffer in shader where
typed view was written and vice versa.
To mitigate this, just write a typed and untyped view together.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Philip Rebohle
6bddcb4352
vkd3d: Store both byte range and element range in offset buffer.
...
The first range will store the byte offset, the second one will
be the typed buffer range. Typed descriptors should write both.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Hans-Kristian Arntzen
dbbde3c6f1
vkd3d: Remove VKD3D_DESCRIPTOR_FLAG_DEFINED.
...
This is redundant now since this information is carried by set_info_mask.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Hans-Kristian Arntzen
1bddaa0fff
vkd3d: Allow a heap binding to cover multiple descriptors.
...
This begins the refactor toward letting us to use both texel buffer and
SSBO descriptors for typed buffers, which is a better workaround than
force_bindless_texel_buffers.
In this new approach, we store a mask in metadata instead of
set/binding.
When copying a descriptor, we will iterate over the masks and look up
binding directly from device->bindless_state.set_info[].
The mask is represented in terms of info index rather than set index to
avoid needless lookups. Add some new helpers to make this process
easier.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-01-14 15:34:20 +01:00
Philip Rebohle
f25df5b453
vkd3d: Reset inline queries in BeginQuery.
...
We currently never reset occlusion queries. For some reason,
validation layers do not report this.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-14 13:38:21 +01:00
Philip Rebohle
037efbdcda
vkd3d: Add mapping for PACK16 formats.
...
Dirt 5 fails with an error message otherwise.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-01-08 18:37:26 +01:00
Philip Rebohle
a3d21494f7
vkd3d: Enable query workaround for AC:Valhalla.
...
Fixes #458 .
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-12 13:01:52 +01:00
Philip Rebohle
b8c96d9b30
vkd3d: Add workaround to disable occlusion query optimization.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-12 13:01:52 +01:00
Hans-Kristian Arntzen
9cbd1b2a0d
vkd3d: Add Cyberpunk2077.exe to workaround detection.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-11 11:22:45 +01:00