Commit Graph

2185 Commits

Author SHA1 Message Date
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 13af141e84 common: Add truncated wide export strcmp.
Needed for GetShaderStackSize().

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 859066cd9b vkd3d-shader: Add ray-tracing pipeline support to DXIL.
Also updates relevant submodules.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-05 10:05:07 +01:00
Hans-Kristian Arntzen d8d1e82024 vkd3d-shader: Refactor DXIL resource remapping.
Prepare for local root signatures.

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 86da5d9bad common: Add string utilities for dealing with entry point conventions.
Used across both vkd3d-shader and vkd3d, so makes sense to move this to
common code.

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
Henri Verbeet c42f4d11e2 vkd3d-shader: Decorate "precise" arithmetic instructions with SpvDecorationNoContraction.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2021-01-12 15:22:11 +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
Philip Rebohle 946bcd7922 vkd3d: Do not store counter address in descriptor.
Unnecessary because the UAV counter buffer is a host memory
allocation anyway in case of host-only descriptor heaps, so
we will not read from uncached memory.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-10 18:14:16 +01:00
Hans-Kristian Arntzen 22a907e11a vkd3d: Add descriptor QA logging.
When reading GPU hang dumps, we can figure out what happened to
descriptor types along the way.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-09 14:51:53 +01:00
Philip Rebohle 1d9f28b25f vkd3d: Add fast path for mutable descriptor copies.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-09 14:31:22 +01:00
Philip Rebohle 7d40d8a22e vkd3d: Rework descriptor copies to copy ranges.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-09 14:31:22 +01:00
Hans-Kristian Arntzen a888d81422 vkd3d: Fix embarassing enum bug.
Caused crash when using a driver that did not support
mutable_descriptor_type.
Was using the wrong enum bitfields ... Sigh, type safe enums would be nice.
Regression caused during refactor in review most likely.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 20:55:56 +01:00
Hans-Kristian Arntzen 051ba691be vkd3d: Clarify comment about not using MEMORY_READ/WRITE.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 20:45:02 +01:00
Philip Rebohle c057e881dc vkd3d: Do not interrupt render pass for occlusion queries.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-07 15:18:12 +01:00
Hans-Kristian Arntzen aa21d2d03d vkd3d: Add support for VK_VALVE_mutable_descriptor_type.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-07 15:17:08 +01:00
Hans-Kristian Arntzen 8fb88855e5 vkd3d: Hash buffers and views based on format, not vk_format.
The creation infos use the format, which potentially contains other
information as well.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-05 15:09:39 +01:00
Hans-Kristian Arntzen e6961afca6 vkd3d-shader: Emit typed format for UAVs which use atomics.
Mesa will assert if not, and the format must be known here.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-04 16:08:26 +01:00
Philip Rebohle c4fbe47106 vkd3d: Do not interrupt render pass for timestamp queries.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:54:35 +01:00
Philip Rebohle e13d69ad27 vkd3d: Batch query pool reset commands if possible.
By resetting query pools in advance, we can reduce the number of
stalls between draw calls in passes with occlusion queries, which
is currently causing serious performance issues in some games.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle 648e41716b vkd3d: Add additional command buffer to batch intialization commands.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle d0fc57413e vkd3d: Merge adjacent query ranges on insertion.
Since we'll be inserting lots of single queries, we want to
avoid having to resize the range array since that is an O(n)
operation at worst.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Philip Rebohle 81e6449f67 vkd3d: Add code to track query ranges used within a command list.
Useful to batch vkCmdResetQueryPool calls.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-12-03 16:21:43 +01:00
Hans-Kristian Arntzen ee4508ba97 vkd3d: Fix sign vs unsigned compare warning.
UINT16 promotes to int rather than UINT here.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-03 15:05:13 +01:00
Hans-Kristian Arntzen f67f55827e vkd3d: Parse patch version of PACKAGE_NAME as well.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-03 15:05:13 +01:00
Hans-Kristian Arntzen b85a345d48 vkd3d: Fix const-ness warning on MSVC.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen 5f8659f4bb vkd3d: Use reader-writer spinlock in view map.
The common case is that we find an entry, so taking a writer lock should
be the rare case. We need to optimize for the case where the application
hammers the view map with e.g. buffers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-12-02 13:12:56 +01:00
Hans-Kristian Arntzen e0382cc451 vkd3d: Add extra typeless copy usage flags after clearing them.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 16:27:39 +01:00
Hans-Kristian Arntzen f46756ed85 vkd3d: Report if RTV/DSV resource does not set render target usage.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 16:27:39 +01:00
Hans-Kristian Arntzen c38fd9bfc3 vkd3d: Bind WHOLE_SIZE when using null SSBO descriptor.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-27 13:13:39 +01:00
Philip Rebohle 2ec68af1d5 vkd3d: Add fallback path for predication using indirect draws.
Official AMD drivers do not support VK_EXT_conditional_rendering,
so we'll use indirect draws instead to emulate the feature.

This also handles 64-bit predicates in combination with the
Vulkan extension, which was not possible previously.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-27 12:43:39 +01:00
Philip Rebohle 82d9ba1ebf vkd3d: Add meta shader to generate predicated draw/dispatch commands.
The idea is to use indirect draws and dispatches to implement
predication. For predicated indirect draws, we'll use indirect
count.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-27 12:43:39 +01:00
Joshua Ashton e27a153a22 vkd3d-shader: Fix saturates of fp64 types
Closes: #419

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-27 11:11:59 +01:00
Hans-Kristian Arntzen 1ce5ea8073 vkd3d: Fix segfault when freeing pipeline library.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-25 10:26:36 +01:00
Philip Rebohle 2c9bacd760 vkd3d: Perform binary occlusion query fixup on scratch buffer.
Potentially avoids some unnecessary host memory access. Use BDA for
the compute shader so that we can ignore alignment restrictions on
some GPU architectures.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Philip Rebohle 78076a9a84 vkd3d: Introduce d3d12_resource_get_va.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Philip Rebohle afb85c79cd vkd3d: Add code to create, destroy and recycle scratch buffers.
Command lists may need to allocate temporary device memory for
certain operations. In order to avoid frequent alloc/free calls,
we'll recycle these scratch buffers until a certain threshold.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-24 16:45:55 +01:00
Hans-Kristian Arntzen 19193bf932 vkd3d: Sanitize VBO strides and VBO offsets.
Realign VBO strides and offsets if we have to, for sake of
robustness. Violating these rules is against D3D12 spec, but it does not
cause crashes on native drivers. On RDNA we can hit hangs with unaligned
vertex attributes. It appears that native drivers apply some kind of
fixup here to avoid the crash, even if the result is not what we expect.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 15:07:29 +01:00
Hans-Kristian Arntzen 10b503c893 vkd3d: Fallback to NULL VA when binding non-existent VBO.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-24 15:07:29 +01:00
Philip Rebohle 9d57489225 vkd3d-shader: Correctly handle infinity in f32tof16.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-23 15:46:55 +01:00
Philip Rebohle 8cbecfb9f6 vkd3d: Fix offset for predicate buffer.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-20 11:23:06 +01:00
Philip Rebohle fb6f078ba9 vkd3d: Fix up binary occlusion query results.
In D3D12, these return 1 rather than an actual sample count.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-19 22:08:42 +01:00
Philip Rebohle 89aea3304c vkd3d: Always add STORAGE_BUFFER_BIT to readback buffers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-19 22:08:42 +01:00
Philip Rebohle fdd0dbafe4 vkd3d: Add meta compute shader to resolve binary occlusion queries.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-19 22:08:42 +01:00
Philip Rebohle 6886bb7f11 vkd3d: Handle empty viewports.
Assassin's Creed Valhalla relies on this.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-19 14:31:39 +01:00
Philip Rebohle ecc504922e vkd3d: Consider mip level for 3D UAV slice check.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-19 14:20:28 +01:00
Hans-Kristian Arntzen ffc1fa646c vkd3d: Mask out attachments which cannot safely be written to.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-19 14:13:59 +01:00
Hans-Kristian Arntzen 0dc0d75967 vkd3d: Use VK_IMAGE_LAYOUT_UNDEFINED for unused attachments.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-19 14:13:59 +01:00
Georg Lehmann 11bdc76aa0 vkd3d: Use static init for device map.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-11-18 18:29:48 +00:00
Hans-Kristian Arntzen d0328e8760 vkd3d: Fix uninitialized variable in initial WSI transition.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 16:40:17 +01:00
Hans-Kristian Arntzen 9617a0f598 vkd3d: Disable RAW_VA root CBVs on NVIDIA.
BDA cannot map to their hardware, and we observe a large performance
loss in games which use root CBVs. For this reason, fall back to push
descriptors here.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 15:49:31 +01:00
Hans-Kristian Arntzen 52ee2edc3d vkd3d: Separate root VA use for CBV and SRV/UAV.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 15:49:31 +01:00
Philip Rebohle 215989f6d5 vkd3d: Rework query pool initialization.
Ensures that queries are always available and initialized
in the correct order on the GPU timeline.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:45:28 +01:00
Philip Rebohle bb9d0f2741 vkd3d: Rework initial transitions to allow for different types.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 15:45:28 +01:00
Hans-Kristian Arntzen 27f91b99b0 vkd3d-shader: Add debug log callback to DXIL.
Allows us to capture dxil compiler messages in log.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 14:37:58 +01:00
Joshua Ashton a950191008 vkd3d: Implement singleton devices.
Matches D3D12 behaviour.

Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-18 12:39:14 +01:00
Hans-Kristian Arntzen f54ac3b9c5 vkd3d: Add app detection for buggy game: ds.exe.
Game renders the map with wrong descriptor type, which means we must
implement everything as texel buffers to make this work.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Hans-Kristian Arntzen 6f8ae20015 vkd3d: Add VKD3D_CONFIG option to disable bindless SSBO.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Philip Rebohle bab9b0af92 vkd3d: Support offset buffers for raw/structured texel buffers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-18 12:27:19 +01:00
Hans-Kristian Arntzen 3e15a3f06a vkd3d: Remove manual tracking of host barriers.
Just emit host barrier on submit unconditionally.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-17 16:34:03 +01:00