Commit Graph

2839 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen 2f6a91e772 vkd3d: De-virtualize query for descriptor size.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-21 16:35:36 +01:00
Hans-Kristian Arntzen 1cc8afcc8e vkd3d: Fix potential crashes when VK_KHR_dynamic_rendering is added.
Checking for pNext here is too brittle and causes crashes when dynamic
rendering path is added.
Also need to chain in existing pNexts.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-17 11:27:25 +01:00
Hans-Kristian Arntzen 5d345f47cc vkd3d: Rewrite the pipeline library implementation.
This became basically a rewrite in the end, and it got too awkward to
split these commits in any meaningful way.

The goals here were primarily to:

- Support serializing SPIR-V and load SPIR-V.
  To do this robustly requires a lot more validation and checks to make
  sure end up compiling the same SPIR-V that we load from cache.
  This is critical for performance when games have primed their pipeline
  libraries and expect that loading a PSO should be fast. Without this,
  we will hit vkd3d-shader for every PSO, causing very long load times.
- Implement the required validation for mismatched PSO descriptions.
- Rewrite the binary layout of the pipeline library for flexibility
  concerns and performance.
  If the pipeline library is mmap-ed from disk - which appears to be
  the intended use - we only need to scan through the TOC to fully parse
  the library contents.
  From a flexibility concern, a blob needs to support inlined data,
  but a library can use referential links. We introduce separate
  hashmaps which store deduplicated SPIR-V and pipeline cache blobs,
  which significantly drop memory and storage requirements.
  For future improvements, it should be fairly easy to add information
  which lets us avoid SPIR-V or pipeline cache data altogether if
  relevant changes to Vulkan/drivers are made.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-17 11:00:03 +01:00
Hans-Kristian Arntzen 33f17cc74d vkd3d: Add VK_EXT_pipeline_creation_feedback.
Useful when used together with pipeline library logging. Confirms that
we can load pipeline caches as expected.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-04 14:31:34 +01:00
Hans-Kristian Arntzen 47337d5e0b vkd3d: Add VKD3D_CONFIG flags for various pipeline library logging.
Additionally, add option to ignore cached SPIR-V.
Will be useful for debugging, and also required for VKD3D_SHADER_OVERRIDE.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-04 14:31:34 +01:00
Hans-Kristian Arntzen f03940ef4b vkd3d: Add global_pipeline_cache option.
Avoids saving out pipeline cache blobs which are likely going to be
cached by on-disk cache anyways.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-04 14:31:34 +01:00
Hans-Kristian Arntzen e5e662ce22 vkd3d: Record root signature compatibility hashes.
For pipeline libraries and DXR to some extent later, we'll need an easy
way to compare root signature objects.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-04 14:31:34 +01:00
Hans-Kristian Arntzen 1d39c25a59 vkd3d: Properly invalidate pipeline when binding NULL DSV.
We did not test the scenario where we first render with depth enabled,
and then bind a NULL DSV with the same pipeline.
Also fix issues if we bind NULL RTVs with same pipeline bound.

Fixes crash in Guardians of the Galaxy.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-04 13:10:16 +01:00
Hans-Kristian Arntzen 5e526d506b vkd3d: Remove warning for setting NULL index buffer.
This is benign and easily gets spammed a TON.
We will warn if an indexed draw is actually made like this.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-03 18:16:36 +01:00
Hans-Kristian Arntzen 81a215d0bf vkd3d: Implement COLOR -> STENCIL copy if stencil export is supported.
Fallback is a bit more involved. Cleans up the FIXME to not report
benign issues.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-03 15:43:41 +01:00
Hans-Kristian Arntzen 29d956c6c4 vkd3d: Fix memory leak of D3D12 device singleton.
Fairly trivial, caught by ASAN.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-02 13:56:36 +01:00
Hans-Kristian Arntzen 49d0eb37e3 vkd3d: Properly align d3d12_command_list allocations.
UBSAN found a bug here since we store RTV descriptors inline, the
compiler can assume the pointer is 64 byte aligned.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-02-02 13:56:36 +01:00
Philip Rebohle 8f81aaa710 vkd3d: Fix reporting of WriteBufferImmediateSupportFlags.
Oversight from when we added bundles.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2022-02-01 16:21:43 +01:00
Hans-Kristian Arntzen 833f56154c cache: Store shader interface key in pipeline library as well.
If we're going to create different SPIR-V files from what the
VkPipelineCache represents, it's meaningless to load it.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen 86f8f41490 vkd3d: Compute a global shader interface key for a D3D12 device.
This key represents the variations of SPIR-V which would be generated
from otherwise identical inputs like DXBC blobs and root signatures.

Typically, changing VKD3D_CONFIG flags or enabled extensions will affect
this key. This ensures that we will not attempt to use a cached SPIR-V
file unless we can trust that the SPIR-V interface will match.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen a3f1a0e3cd vkd3d-shader: Add mechanism to get vkd3d-shader implementation revision.
Not immediately useful, might be nuked later in development.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen e90b573896 vkd3d-shader: Use flag for vkd3d_shader_meta bools.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen 8196b85408 vkd3d-shader: Make vkd3d_shader_hash public.
Prepare for meta struct to be serialized to a cache.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen a2c1527acd vkd3d-shader: Reuse hashmap.h hasher for shader hash.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen 6e697a54b6 vkd3d: Add d3d12_cached_pipeline_state.
Wraps the D3D12 struct with a pipeline library handle.
This is needed if the blob contains references to external data,
which then needs to be resolved.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen 41c977d616 cache: Move cache implementation over to read-writer locks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-25 14:07:07 +01:00
Hans-Kristian Arntzen 1409ebab1f vkd3d: Consider sparse buffers to alias any other buffer.
Technically cannot alias committed buffers, but 🤷 ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-20 15:14:27 +01:00
Hans-Kristian Arntzen 7d0743345a vkd3d: Remove useless buffer barrier tracking.
This copy is to a scratch buffer, which needs no tracking.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-20 15:14:27 +01:00
Philip Rebohle 1af62abfe7 vkd3d: Enable quirk for further UE4 shaders.
Fixes artifacts in The Ascent.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2022-01-19 16:49:42 +01:00
Hans-Kristian Arntzen 5c492e9e6c vkd3d: Handle overlapped transfer writes.
D3D12 expects drivers to implicitly synchronize transfer operations,
since there is no TRANSFER barrier ala UAV barriers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-19 14:44:33 +01:00
Hans-Kristian Arntzen 68ce4b4116 vkd3d: MSVC build fix.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-19 14:21:09 +01:00
Hans-Kristian Arntzen 6cba8b9945 vkd3d: Workaround broken barriers in DEATHLOOP.
In DEATHLOOP, there is a render pass which renders out a simple image,
which is then directly followed by a compute dispatch, reading that
image. The image is still in RENDER_TARGET state, and color buffers are
*not* flushed properly on at least RADV, manifesting as a very
distracting glitch pattern. This is a game bug, but for the time being,
we have to workaround it, *sigh*.

For a simple workaround, we can detect patterns where we see these
events in succession:

- Color RT is started
- StateBefore == RENDER_TARGET is not observed
- Dispatch()

In particular, when entering the options menu, highly distracting
glitches are observed in the background.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:20:03 +01:00
Robin Kertels 35be1329ed vkd3d: Don't do layout transition in aliasing barrier.
HZD issues an aliasing barrier for an alias of a resource that it
still needs.
Because D3D12 requires you to call DiscardResource or a full resource
clear/copy, we can just rely on those to do the actual image layout
transition and treat the aliasing barrier as a pure sync + flush.

This behavior is also observed in a test case where D3D12 drivers
do not seem to discard / fast-clear anything in an aliasing barrier.

Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:16:52 +01:00
Samuel Pitoiset f6a4e0fb71 vkd3d: Use VK_KHR_copy_commands2
Mesa RADV translates these legacy entrypoints to the 2 variants. Using
them directly will cost a bit less CPU cycles.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-01-12 12:06:06 +01:00
Samuel Pitoiset f6fe3e0183 vkd3d: Require VK_KHR_copy_commands2
This extension is trivial to implement for vendors and should be
widely supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-01-12 12:06:06 +01:00
Samuel Pitoiset 870dda927d vkd3d: Use VK_KHR_bind_memory2
Mesa RADV translates these legacy entrypoints to the 2 variants. Using
them directly will cost a bit less CPU cycles.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-01-12 12:06:06 +01:00
Samuel Pitoiset b42a7193fc vkd3d: Require VK_KHR_bind_memory2
This extension is trivial to implement for vendors and should be
widely supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-01-12 12:06:06 +01:00
Philip Rebohle 5923c53111 vkd3d: Only use VK_IMAGE_CREATE_EXTENDED_USAGE_BIT if necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2022-01-11 15:14:30 +01:00
Philip Rebohle 1354ecabb4 vkd3d: Consider query pool when merging query ranges.
Otherwise, we accidentally merge ranges from different pools if
the indices happen to align.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2022-01-06 14:27:36 +01:00
Hans-Kristian Arntzen c0a3fa8adc vkd3d: Attempt to create linear image without EXTENDED_USAGE.
NVIDIA drivers apparently cannot support EXTENDED_USAGE linear
images for whatever reason, so attempt to create these images without
the creation flag.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-03 12:47:09 +01:00
Hans-Kristian Arntzen 459cae5673 vkd3d: Fix redundant return from void.
Fix MSVC warning.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:48:48 +01:00
Hans-Kristian Arntzen 7502b4c4c8 vkd3d: Fix MSVC build.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:48:48 +01:00
Hans-Kristian Arntzen fffd6e935c vkd3d: Add R64_UINT to format compatibility list when needed.
For 64-bit image atomics, we should at the very least add 64-bit format
to compatibility list to avoid potential problems.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:40:32 +01:00
Hans-Kristian Arntzen 72f26c5699 vkd3d: Remove misleading FIXME.
We can bind texel buffers at scalar alignment now.
The warning is misleading for placed resources, since 64k never aligns
with a float3.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:40:21 +01:00
Arkadiusz Hiler 93d105adae vkd3d: Retry to create Vk device without NVX extensions.
The creation with those extensions may fail in few cases:
 * older 32 bit drivers
 * missing or inaccessible /dev/nvidia-uvm

There's also a mysterious crash that some Debian users experience with
64bit titles and a correct /dev/nvidia-uvm.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
2021-12-02 12:44:37 +01:00
Hans-Kristian Arntzen d2fd3de7c1 vkd3d: Handle somewhat common VkResult.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 20:02:14 +01:00
Hans-Kristian Arntzen d9636d5c67 vkd3d: Fix check for vkBindImageMemory.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 20:02:14 +01:00
Hans-Kristian Arntzen 9a59ded1c4 vkd3d: Simplify MinLod setup.
Only bother if we actually need to clamp LOD.
Simplifies some clamping logic as well.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 16:51:18 +01:00
Philip Rebohle a99914b6ea vkd3d: Fix clear color swizzle for various UAV formats.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle 4000397570 vkd3d: Remove legacy format compatibility info.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle 0de25ac3cd vkd3d: Do not use vkd3d_find_uint_format in ClearUAV.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle ab111dcdbe vkd3d: Don't use vkd3d_get_typeless_format to determine shader copy usage.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle 99d949f5fb vkd3d: Fix enablement of MUTABLE_FORMAT_BIT and EXTENDED_USAGE_BIT.
We previously did not take into account the new relaxed format compatibility
rules that we allow with CastingFullyTypedFormatSupported being supported.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle 9624102dcb vkd3d: Rework format compatibility lists.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Philip Rebohle 42b8fc3338 vkd3d: Introduce new format compatibility table.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +01:00
Georg Lehmann 4240ab7559 vkd3d: Allow B8G8R8A8 UAVs.
This is now allowed according to
https://microsoft.github.io/DirectX-Specs/d3d/RelaxedCasting.html

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-11-24 15:15:14 +01:00
Hans-Kristian Arntzen 7391e38602 vkd3d: Fix some type errors after idl update.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-22 16:25:13 +01:00
Philip Rebohle 9185edb42a vkd3d: Implement ID3D12GraphicsCommandList6.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-19 14:57:51 +01:00
Philip Rebohle b03c1fcb5f vkd3d: Implement ID3D12Device9.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-19 14:57:51 +01:00
Philip Rebohle 3b6a4ab988 vkd3d: Implement ID3D12Device8 and ID3D12Resource2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-19 14:57:51 +01:00
Philip Rebohle d61f562a3e vkd3d: Implement ID3D12Device7.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-19 14:57:51 +01:00
Joshua Ashton 046524f2a1 vkd3d: Implement MinLODClamp using VK_EXT_image_view_min_lod
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-17 20:51:20 +01:00
Robin Kertels 19a1dce393 vkd3d: Set GetCopyableFootprints total_bytes late.
Halo Infinite uses &desc->Width for total_bytes.
We can't set total_bytes early because code after this relies on desc->Width.

Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2021-11-16 11:53:18 +01:00
Hans-Kristian Arntzen 3fefc540c8 vkd3d: Handle 64KB_UNDEFINED_SWIZZLE.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-12 10:32:13 +01:00
Hans-Kristian Arntzen 3937e1a298 vkd3d: Handle illegal rendering to NULL DSV.
Guardians of the Galaxy hits this case. Fallback is to disable depth
attachment entirely in a fallback pipeline.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 15:56:45 +01:00
Hans-Kristian Arntzen 45ae742526 vkd3d: Pretend that SSBO alignment on NV is 4 bytes.
The 16-byte requirement is kind of a lie. The real requirement is tied
to how vectorized load-store instructions are emitted in the shader
itself since I guess it allows compiler to assume something about
alignment of the base pointer.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen b53a4a98a6 vkd3d: Enable per component robustness on AMD.
Tested and verified to work as expected, not so much on NV.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen 3210832ad9 vkd3d: Enable VK_EXT_scalar_block_layout.
dxil-spirv can take advantage of this now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen 58aab78a5b vkd3d-shader: Add PER_COMPONENT_ROBUSTNESS shader extension.
Signals that we can use vectorized vec3 byte address buffers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen e605d19ef7 vkd3d-shader: Add shader extension for scalar block layout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen 35d2f1e87f vkd3d: Correctly check for SM 6.6 required features.
Remove the experimental flag and unconditionally enable SM 6.6 if
available.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen 2b11c70129 vkd3d: Hook up WaveSize implementation.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen 6966cd2f33 vkd3d-shader: Reflect CS WaveSize.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen 7cc435c0bc vkd3d: Enable feature bits for 64-bit atomics.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen de64ebd1d1 vkd3d: Expose Int64 feature.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen 23ad0247e3 vkd3d: Enable 64-bit atomics extensions.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen 6255eaec32 vkd3d: Stub out the more recent FEATURE_DATA structs.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
David Gow 2a8b5471ca vkd3d: Handle D3D12_APPEND_ALIGNED_ELEMENT for <4 byte wide elements
In d3d12, input element alignment needs to be the _minimum_ of 4 and the size of
the type. See the D3D11 spec, section 4.4.6, which behaves similarly:
https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#4.4.6%20Element%20Alignment

This is correctly taken into account when generating, e.g., the
vertex_buffer_stride_align_mask used for validation, but is not taken
into account when D3D12_APPEND_ALIGNED_ELEMENT is used to automatically
place input elements. Currently, vkd3d always assumes the alignment is
4.

This means that, for example, bytes or shorts should be packed tightly
together when D3D12_APPEND_ALIGNED_ELEMENT is used, but are instead
padded to 4 bytes.

Fixing this makes units appear in Age of Empires IV (see vkd3d-proton
issue #880 for examples.)

Signed-off-by: David Gow <david@ingeniumdigital.com>
2021-11-01 13:30:04 +01:00
Robin Kertels 430c77d3b3 vkd3d: Don't add xfb struct to rasterization state when NumEntries is 0.
Wine VKD3D version of my original commit.

Co-authored-by: Conor McCarthy <cmccarthy@codeweavers.com>

Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2021-10-29 18:06:31 +02:00
Hans-Kristian Arntzen 85c75a042f vkd3d: Enable VK_NV_compute_shader_derivatives.
Supported on more implementations too :)

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-27 17:00:33 +02:00
Georg Lehmann eb48213bfa vkd3d: Follow the new shaderStorageImage{Read, Write}WithoutFormat rules.
The Vulkan spec update 1.2.195 restricted these features to a very limited
format subset, and somehow this is supposed to not be an API break?
Anyway, let's follow the new rules.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann fd690e3831 vkd3d: Enable typed uav loads based on KHR_format_feature_flags2.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann 07d53a82cc vkd3d: Init shader extensions later.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann 4c37b4c341 vkd3d: Use vkGetPhysicalDeviceFormatProperties2.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann c8d633cb51 vkd3d: Enable VK_KHR_format_feature_flags2.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Hans-Kristian Arntzen 8ff91b23d6 vkd3d-shader: Hook up global descriptor heap for DXIL.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen aadccb66cf vkd3d: Add more root signature flags to the list of flags we recognize.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen 8977eaef88 vkd3d: Initialize global heap bindings for SM 6.6.
Refactor code which emits SRV/UAV bindings to common code.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen cbef48f90a vkd3d: Refactor out how binding counts are parsed.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen 6548e4fd00 vkd3d: Add VKD3D_CONFIG for experimentally enabling SM 6.6.
To be used for bringup and removed when we complete the support.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen a0a29bae43 vkd3d: Use correct formats for image -> buffer copies.
Need to use placed format explicitly if we're copying planar resources.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-20 15:48:12 +02:00
ifedorov 0abe8a21dd Fixed row length calculation in CopyTextureRegion()
Signed-off-by: Ivan Fedorov <ifedorov@nvidia.com>
2021-10-20 14:28:35 +02:00
Philip Rebohle 890ba87a7c vkd3d-shader: Merge i/o variables using the same location.
Fixes a number of issues observed in tessellation shaders,
and potentially geometry shaders, when inputs and/or outputs
are array variables.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-10-18 17:25:18 +02:00
Hans-Kristian Arntzen 740e23ea8a vkd3d: Add VKD3D_CONFIG to force non-invariant position.
It's common enough that new games break on RDNA2 because of this that we
should enable this by default. This matches DXVK behavior.

SOTTR gets a special weird exception, just like DXVK. The shaders are
broken enough that the proper fix is actually precise, not invariant.
This will be addressed at some later point.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen be8d6ec7ad vkd3d: Make global quirks info struct a value.
Allows us to fiddle with it after the fact.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen 26bd08bbde vkd3d-shader: Add global quirks for vkd3d_shader_quirk_info.
Will be used for VKD3D_CONFIG overrides.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen 32c5abf496 vkd3d-shader: Add INVARIANT_POSITION quirk.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen 2152500014 vkd3d-shader: Refactor out quirk selection.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen 3b415dbc89 vkd3d: Don't spam error if ReleaseSemaphore fails.
This function fails if the counter overflows.
CP77 hits this case a lot and we should just warn the specific failure
instead of a random error.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 14:58:49 +02:00
Hans-Kristian Arntzen dda02faf89 vkd3d: Pad reserved resources to 64k alignment.
Fix GPU crashes when attempting to bind non-aligned reserved resource.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 14:58:34 +02:00
Hans-Kristian Arntzen 8beb7dde89 vkd3d: Handle NULL pointers in GetResourceTiling in more places.
DEATHLOOP uses all NULL at some point ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-15 15:12:41 +02:00
Philip Rebohle dd23492348 vkd3d: Reduce memset overhead for query map.
Potentially reduces the size of the query map, and makes each entry
versioned so that we no longer have to clear the entire map for multiple
dispatches even if it is sparsely populated.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-10-14 17:48:13 +02:00
Hans-Kristian Arntzen 0c60791bb1 vkd3d: Pass down PrimitiveCulling extension to vkd3d-shader.
DXR 1.1 only feature.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen f98702603d vkd3d-shader: Add SPIR-V extension for PrimitiveCulling.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen 6866b45637 vkd3d: Add CONFIG flag for enabling DXR 1.1.
We cannot support ExecuteIndirect with TraceRays() for time being.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen e6836c6255 vkd3d: Support RTPSO CONFIG1 flags.
DXR 1.1 and requires PrimitiveCullingFlags feature.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen 105882466b vkd3d: Validate that we cannot mix and match geom types in BLAS.
Runtime will error out and return 0 size.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen a3202444c8 vkd3d: Fix stack deduction for anyhit shaders.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 16:04:30 +02:00
Hans-Kristian Arntzen a36b987bf1 vkd3d: Add static pipeline variant flag to pipeline key.
If we need to fallback in both VRS and non-VRS scenarios, we need to key
on it. Fixes segfault in DIRT5 when toggling VRS.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 12:35:58 +02:00
Hans-Kristian Arntzen 3182882e21 d3d12: Do not export ordinals for most symbols.
The ordinals except for D3D12CreateDevice and GetDebugInterface are not
part of the ABI apparently.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-12 11:09:16 +01:00
Hans-Kristian Arntzen 99365bcaec vkd3d: Enable VK_NV_fragment_shader_barycentric.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-11 13:53:19 +01:00
Hans-Kristian Arntzen 08a7d7a165 vkd3d: Bind local root signature static set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen d83ce4392b vkd3d: Check root signature associations in hit groups as well.
If we don't find a clear association to an entry point,
we can also find it in the hit group.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen c672429c70 vkd3d: Fix demangling of RT entry points.
Digits are of course also valid identifiers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 235541ace5 vkd3d: Build local static sampler set/pipeline layouts and allocate set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen f605b88e90 vkd3d: Make some RS related functions non-static.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 90d52abe94 vkd3d: Parse local RS static samplers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 74f62784e4 vkd3d: Cleanup redundant parameter_count assignment.
parameter_count == NumParameters for local RS since
hoisting is explicitly ignored for those.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 393ef6261b vkd3d: Add local root signature objects to RTPSO.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 6802d9e5a3 vkd3d: Add helper to create augmented pipeline layout.
For local root signature static samplers, this is handy.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 67be905421 vkd3d: Bump max number of descriptor sets.
Need one potentially for local root signature static samplers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen b661c9b8ba vkd3d: Store set layout array in root signature.
With RTPSOs we might have to create static sampler sets for local root
signatures. In this case we will have to create a compatible pipeline
layout which is equal to global pipeline layout, except for an extra
set.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 11:51:47 +02:00
Hans-Kristian Arntzen 1e42acf492 vkd3d: Allow BUILD_MODE_UPDATE in PrebuildInfo check.
Metro Exodus Enhanced Edition hits this a lot.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-08 07:21:47 +01:00
Hans-Kristian Arntzen 0f2e448659 vkd3d: Handle CreatePipelineLibrary with NULL ppData.
Supposed to return S_FALSE.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-07 17:55:57 +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 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
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 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 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 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 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
Georg Lehmann cf4fb44629 vkd3d: Remove almost unused variable.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-09-21 11:22:34 +01:00
Georg Lehmann edeb0658b7 vkd3d: Fix memory leak on failure.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-09-21 11:22:34 +01:00
Georg Lehmann 0afa6732ad vkd3d: Cleanup weird assignment.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-09-21 11:22:34 +01:00
Georg Lehmann 1946e42367 vkd3d-shader: Fix use-after-free on failure.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-09-21 11:22:34 +01:00
David McCloskey a19619ccbf vkd3d: Fixing compile errors on Windows. 2021-09-18 21:40:30 +01:00
Hans-Kristian Arntzen 173b8ecef0 vkd3d: Add workaround for DEATHLOOP.
Game attempts to create a host visible resource with
ALLOW_RENDER_TARGET flag. We cannot make this work on NVIDIA, but the
game never seems to actually create an RTV, so as a workaround, nop out
the flag, which does make it work after all :3

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-17 14:21:09 +02:00
Hans-Kristian Arntzen fa4d2182b1 vkd3d: Copy all aspects in CopyResource.
Just like we're promoting layer count, also promote aspect mask.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-17 14:21:09 +02:00
Hans-Kristian Arntzen e687d489ab vkd3d: Validate blend state against output signature.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:57:28 +02:00
Hans-Kristian Arntzen a4b082a828 vkd3d-shader: Add helper to parse output signature.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:57:28 +02:00
Hans-Kristian Arntzen 1d51818d8f vkd3d: Fix compile error introduced by bad rebase.
Somehow the rebase got really screwed up :\

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:42:30 +02:00
Hans-Kristian Arntzen a8f623e60d vkd3d: Negate upload_hvv config.
Enable resizable BAR style allocations by default, and add option to
disable it.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen 12066a2b67 vkd3d: Add debug config to log resizable BAR allocations.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen 710fa98918 vkd3d: Setup resizable bar budget.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen cec741706d vkd3d: Refactor out memory topology queries.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen abdaeb136d vkd3d: Add a memory budget per memory type.
For resizable BAR, we don't want to endlessly promote UPLOAD heaps to
BAR since VRAM is precious. The aim is to set a fixed budget where we
can keep allocating until full, at which point we fall back to plain HOST.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen e0451bb541 vkd3d: Handle fallbacks properly in suballocator.
With BAR budgets, what will happen is that
- Small allocation is requested
- A new chunk is requested
- try_suballocate_memory will end up calling allocate_memory, which
  allocates a fallback memory type
- Subsequent small allocators will always end up allocating a new
  fallback memory block, never reusing existing blocks.
- System memory is rapidly exhausted once apps start hitting against
  budget.

The fix is to add flags which explicitly do not attempt to fallback
allocate. This makes it possible to handle fallbacks at the appropriate
level in try_suballocate_memory instead.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen cb94cfd10c vkd3d: Fix silly typo in global mask.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen 426cdc9218 vkd3d: Destroy GLOBAL_BUFFER for some early error out paths.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen 69d4f55219 vkd3d: Refactor VkDeviceMemory allocation to keep track of type/size.
We will need to consider some form of budgeting, so make sure that all
allocation and freeing is done in a central place.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 16:10:57 +02:00
Hans-Kristian Arntzen 8d49d3e9ae vkd3d: Add extra validation for mapping textures.
D3D12 validation layers complain if you try to map mipmapped 3D volumes
for ... some reason. The error is very explicit, so I assume it's
intentional :)

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Hans-Kristian Arntzen 9fd422a0fd vkd3d: Fix default layout check when using LINEAR tiled images.
Match behavior of d3d12_resource_pick_layout.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Hans-Kristian Arntzen 41295eff6c vkd3d: Consider CPU availibility when selecting memory types.
Need to consider that based on host visibility requirements, we need to
select either LINEAR or OPTIMAL image types, and those tiling modes can
have different memory requirements.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Hans-Kristian Arntzen 132638be67 vkd3d: Add more logging when linear image allocation fails.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Hans-Kristian Arntzen 50f2c35b44 vkd3d: Add stricter ROW_MAJOR texture validation.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Hans-Kristian Arntzen 961fef84de vkd3d: Allow map of texture as long as ppData is NULL.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-16 15:35:57 +02:00
Joshua Ashton 9c0fa91ca5 vkd3d: Add shader quirks for Psychonauts 2
Works around a game bug. It uses texture() inside divergent control flow.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-09-15 11:52:39 +02:00
Hans-Kristian Arntzen 3081887757 vkd3d: Add 12_2 to list of valid feature levels.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-14 21:18:29 +02:00
Hans-Kristian Arntzen 0e216b2b10 vkd3d: Narrow workaround for global pipeline cache.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-08 18:37:55 +02:00
Hans-Kristian Arntzen 11086a94e0 vkd3d: Add macros to parse/build NV driver versions.
The bit offsets are a bit different from Vulkan API.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-08 18:37:55 +02:00
Hans-Kristian Arntzen fcaeca8d27 vkd3d: Allow typeless depth-stencil formats without ALLOW_DEPTH_STENCIL.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-07 13:31:28 +02:00
Hans-Kristian Arntzen 403d1f9743 vkd3d: Workaround huge memory overhead for individual VkPipelineCaches.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-07 13:21:54 +02:00
Hans-Kristian Arntzen a3267ba8e5 vkd3d: Fix copies between footprint and DS aspects.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-06 17:00:51 +02:00
Hans-Kristian Arntzen fa1d82e141 vkd3d: Fix regressions when introducing null-copy elision.
Need to initialize the set mask so that copies happen properly
on default-initialized descriptors. Also, move the current_null_type to
metadata so that it's properly copied on descriptor copy.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-03 12:24:26 +02:00
Rodrigo Locatti b4cb5a37f8 vkd3d: Optimize repeated null descriptor updates
There are titles clearing the same descriptors constantly.
This leads to unnecessary updates that can become costly.

This commit introduces a new flag to track when D3D12 descriptors are
not null, and skips clearing them if they are already null.
Descriptors are assumed to be null by default.

This fixes a performance regression introduced by
9983a1720f

Signed-off-by: Rodrigo Locatti <rlocatti@nvidia.com>
2021-09-02 21:21:34 +02:00
Philip Rebohle 7fea3527ed vkd3d: Remove deferred clears.
Emitting render pass clears while we're in the process of starting
a render pass overrides dsv layout tracking info.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-09-02 17:11:35 +02:00
Hans-Kristian Arntzen ff74ad0ec5 vkd3d: Skip draw call if doing depth test on null DSV.
D3D12 validation layer errors out, so unless we can prove that specific
behavior is relied upon, we should be okay to just ignore.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 17:10:47 +02:00
Hans-Kristian Arntzen b54a1a6c2b vkd3d: Fix MSVC build.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 16:56:39 +02:00
Hans-Kristian Arntzen 00e4397467 vkd3d: Ignore depth/stencil test if DSVFormat does not have that aspect.
Fix some validation errors in F1 2021.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 16:25:27 +02:00
Hans-Kristian Arntzen bc9bd9c482 vkd3d: Fix member types in vkd3d_format.
No need to use size_t.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Hans-Kristian Arntzen 7b67de7d0e vkd3d: Generalize get_plane_footprints.
Get information directly from vkd3d_format and allow for subsampled
formats in the future.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Hans-Kristian Arntzen 3d5010555e vkd3d: Add d3d12_resource_desc_get_sub_resource_count.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Hans-Kristian Arntzen 5c2376faf5 vkd3d: Handle multiplanar formats in GetCopyableFootprints.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-02 12:21:22 +02:00
Hans-Kristian Arntzen b8881ff693 vkd3d-common: Log TID in Wine's format.
Allows us to stay sane when correlating logs.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-09-01 15:41:59 +02:00
Hans-Kristian Arntzen c1f848ed3b vkd3d: Only look at SourceRTAS when updating.
Be more robust against garbage inputs.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-28 12:16:42 +02:00
rochaudhari 0828aec4f6 vkd3d: Implement new interfaces required for DX12 DLSS support.
Adds ID3D12GraphicsCommandListExt and ID3D12DeviceExt interfaces.

Signed-off-by: Roshan Chaudhari <rochaudhari@nvidia.com>
2021-08-27 11:37:15 +02:00
Joshua Ashton e9f04e8e0e vkd3d: Support SAMPLE_DESC.Count of 0
Psychonauts 2 uses a SAMPLE_DESC.Count of 0 for some things, which
previously was forcing it down the MSAA alignment placement path.

Found from playing a native D3D12 apitrace back and seeing
the log spam.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-08-26 14:23:37 +02:00
Philip Rebohle 715eca1b95 vkd3d: Reimplement frame latency event as a semaphore.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-08-26 14:21:38 +02:00
Philip Rebohle fef30f5037 vkd3d: Support releasing semaphores from a D3D12 fence.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-08-26 14:21:38 +02:00
Joshua Ashton 68a035c605 vkd3d-shader: Fix vkd3d-compiler crash
Since we added validation here for FH4, this crashes now as vkd3d-compiler passes a NULL shader_interface_info.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-08-26 14:06:47 +02:00
Joshua Ashton 56e12d88ce vkd3d-shader: Fix multiple constant buffers with RAW_VA
Consider we have declarations of CB0 of size 36 and CB1 of size 153.
Previously we'd just return the struct of CB0 when accessing CB1 because it came first as we didn't consider the size.

Psychonauts 2 indexes into CB1 by constant values above 36.
There is no reason a compiler could not eliminate these reads as it is technically out of bounds for the underlying array type.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-08-26 14:05:52 +02:00
Hans-Kristian Arntzen f3fd2bf70b vkd3d: Use BAR memory type for descriptor heap helpers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-23 13:24:43 +02:00
Hans-Kristian Arntzen 7e165238e6 vkd3d: Allow all memory types if UPLOAD_HVV is used.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-23 13:24:43 +02:00
Joshua Ashton 1b957a1f74 vkd3d: Add config to use host-visible vram for UPLOAD heap
Adds the "upload_hvv" config flag, which will make D3D12_HEAP_TYPE_UPLOAD attempt to use host-visible VRAM for allocations.

This takes advantage of large or resizable BAR if available.

I see a perf delta of 83-84 -> 92-94 (~12%) when using this in Horizon Zero Dawn.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-08-23 13:24:43 +02:00
Hans-Kristian Arntzen 05e31bfba9 vkd3d: Ensure we do not fallback device allocations to BAR.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-23 13:24:43 +02:00
Robin Kertels 76f37c3cbf vkd3d: Only disable raster based on SO stream if SO is used.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2021-08-23 13:10:14 +02:00
Hans-Kristian Arntzen b2c99b035a vkd3d: Allow SM 6.2 on NV.
FloatControlProperties struct appears to be broken, and it does seem to
work just fine.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-30 15:19:35 +00:00
Hans-Kristian Arntzen 093a8c49f3 vkd3d: Expose shader model 6.5.
WaveMatch and WaveMultiPrefix are implemented and pass test.
Other features are gated behind feature bits.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-29 20:42:32 +02:00
David McCloskey a2a7d78c27 vkd3d: Fixing CopyTextureRegion going out of bounds when src_box is null.
Signed-off-by: David McCloskey <davmcclo@gmail.com>
2021-07-29 17:28:52 +02:00
Hans-Kristian Arntzen e1bb5f3b77 vkd3d: Handle NULL event handles in ID3D12Fence::SetEvent*().
We need to block here for whatever reason.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-29 17:21:20 +02:00
Hans-Kristian Arntzen 455f00fe26 vkd3d: Log failures when signaling external events.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-29 17:21:20 +02:00
Hans-Kristian Arntzen 435a087047 vkd3d: Rework how shader model versions are exposed.
From native testing, we can expose higher shader models if
cap bits features are not supported. E.g. Polaris exposes SM 6.5, even
when 16-bit and barycentrics are not supported.

With latest dxil-spirv updates we can support the required SM 6.4
features.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-28 15:28:19 +02:00
Hans-Kristian Arntzen 5b013d0b02 vkd3d: Validate shader meta against features.
We're supposed to validate and fail compilation if certain features are
not supported.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-28 15:28:19 +02:00
Hans-Kristian Arntzen 5df4a5c083 vkd3d-shader: Add 16-bit feature usage to meta.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-28 15:28:19 +02:00
Hans-Kristian Arntzen ab9e99cbfa vkd3d: Check for Int16 capability as well as extended subgroup types when exposing 16-bit ops.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-28 15:28:19 +02:00
Joshua Ashton 1d23bdbab7 vkd3d: Don't store pointer to QA info when not building with QA
This is entirely unnecessary and a waste of space as it will never be used.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-07-08 16:52:58 +02:00
Joshua Ashton a53a7f8d7c vkd3d-shader: Restrict descriptor-qa extras and logic to VKD3D_ENABLE_DESCRIPTOR_QA
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-07-08 16:52:58 +02:00
Joshua Ashton 309fc817e8 vkd3d: Fix RT local root signature interface flags
This was passing through flags of the root signature not the shader interface flags of it.

Need to get the shader interface flags of the root signature instead.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-07-08 16:52:58 +02:00
Hans-Kristian Arntzen 29a9ccd356 vkd3d: Basic implementation of ResolveSubresourceRegion.
Used by DIRT5.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-08 13:54:05 +02:00
Hans-Kristian Arntzen f3c3e53f7a vkd3d: Add resolve mode argument to resolve helper.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-08 13:54:05 +02:00
Hans-Kristian Arntzen 591d47a6c5 vkd3d: Refactor out ResolveSubresource.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-08 13:54:05 +02:00
Hans-Kristian Arntzen 732d1dd234 vkd3d-shader: Reflect patch vertex count for DXIL HS.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:58:45 +02:00
Hans-Kristian Arntzen 37e8f42f4a vkd3d: Move patch vertex count to meta struct.
Will make it easier to implement for DXIL.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:58:45 +02:00
Hans-Kristian Arntzen 3915090c12 vkd3d: Track depth-stencil image layouts over a command buffer.
Goal here is to avoid unnecessary image layout transitions when render
passes toggle depth-stencil PSO states. Since we cannot know which
states a resource is in, we have to be conservative, and assume that
shader reads *could* happen.

The best effort we can do is to detect when writes happen to a DSV
resource. In this scenario, we can deduce that the aspect cannot be
read, since DEPTH_WRITE | RESOURCE state is not allowed.

To make the tracking somewhat sane, we only promote to OPTIMAL if an
entire image's worth of subresources for a given aspect is transitioned.
The common case for depth-stencil images is 1 mip / 1 layer anyways.

Some other changes are required here:
- Instead of common_layout for the depth image, we need to consult the
  command list, which might promote the layout to optimal.
- We make use of render pass compatibility rules which state that we can
  change attachment reference layouts as well as initial/finalLayout.
  To make this change, a pipeline will fill in a
  vkd3d_render_pass_compat struct.
- A command list has a dsv_plane_optimal_mask which keeps track
  of the plane aspects we have promoted to OPTIMAL, and we know cannot
  be read by shaders.
  The desired optimal mask is (existing optimal | PSO write).
  The initial existing optimal is inherited from the command list's
  tracker.
- RTV/DSV/views no longer keep track of VkImageLayout. This is
  unnecessary since we always deduce image layout based on context.

Overall, this shows a massive gain in HZD benchmark (RADV, 1440p ultimate, ~16% FPS on RX 6800).

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:45:46 +02:00
Hans-Kristian Arntzen 515ed7fbd1 vkd3d: Make sure memory is available before change image layout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:45:46 +02:00
Hans-Kristian Arntzen 8f05ac298c vkd3d: Add implementation for plane optimal tracker.
Idea is to keep track of scenarios where we know a resource's aspect is
known to be in a OPTIMAL state. Based on this, we can override the image
layout from the common_layout in order to avoid unnecessary full
barriers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:45:46 +02:00
Hans-Kristian Arntzen 1288d0f9b1 vkd3d: Remove obsolete all_aspect parameter.
For copies, we can always use the intended aspects, since we have
separate DS layouts now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:31:52 +02:00
Hans-Kristian Arntzen 68ce7bd324 vkd3d: Handle separate DS layout for destination copies.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:31:52 +02:00
Hans-Kristian Arntzen 81d472242b vkd3d: Clear single depth-stencil aspect correctly.
When clearing a DSV, we must get aliasing guarantees, so we must
transition away from UNDEFINED. This is only possible when using
separate_ds_layouts and for render pass clears we need to use
renderpass2 mechanisms to do this.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 15:31:52 +02:00
Hans-Kristian Arntzen 35c555c479 vkd3d: Use more correct fallback path for minLODClamp.
The clamp is absolute, not relative to baseMip. Also avoids validation
error and potential crash when LODClamp > numLevels.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-07 12:50:23 +02:00
Joshua Ashton 61ccdb9037 vkd3d: Make invalid RTV for attachment FIXME_ONCE
This spams constantly in Dirt 5.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-07-07 11:49:18 +02:00
Hans-Kristian Arntzen cf632186fd vkd3d: Add workaround for MinLODClamp.
Not correct, will need spec additions to handle it properly.
Fixes ground rendering in DIRT 5.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-06 16:45:19 +02:00
Hans-Kristian Arntzen 3090ae01c1 vkd3d: Support discarding single aspects as required.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-02 15:18:16 +02:00
Hans-Kristian Arntzen 398724cd6e vkd3d: Require VK_KHR_separate_depth_stencil_layouts.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-02 15:18:16 +02:00
Hans-Kristian Arntzen 419790ac77 vkd3d: Add wave size workaround for GravityMark.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-02 15:15:42 +02:00
Hans-Kristian Arntzen 92c4f861e7 vkd3d-shader: Report CS workgroup size metadata.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-02 15:15:42 +02:00
Hans-Kristian Arntzen 7a00e56792 vkd3d: Handle multiple planes in d3d12_resource_get_subresource_count.
Separate out an explicit per_plane query for the cases where we need it.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-02 14:16:18 +02:00
rochaudhari be2362268c vkd3d: Return format2 information for d3d12_device_CheckFeatureSupport
Currently only format1 information is being returned for D3D12_FORMAT_SUPPORT.

Signed-off-by: Roshan Chaudhari <rochaudhari@nvidia.com>
2021-07-02 14:07:39 +02:00
Hans-Kristian Arntzen 3ea20a91ad vkd3d: Handle zero viewports.
This can be used for rasterizer discard, just bind dummy viewport and
scissor.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-07-01 13:53:19 +02:00
Hans-Kristian Arntzen cb5283b6fb vkd3d: Allow dynamic vertex stride == 0 to go through.
Eliminates all late pipeline compiles in Scarlet Nexus DX12 (and several
other games).

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-29 16:00:33 +02:00
Hans-Kristian Arntzen c1860a1ead vkd3d: Add VKD3D_CONFIG flags for forcing EXCLUSIVE queue modes.
Helps in some cases, but we cannot do this by default :(

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-29 12:24:24 +02:00
Joshua Ashton 5e3ec4337b vkd3d: Fix top-most handling when restoring from fullscreen
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-06-25 17:28:35 +02:00
Hans-Kristian Arntzen ba7c2b7c5f swapchain: Log window rects for leaving and entering fullscreen.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-25 08:01:26 -07:00
Paul Gofman ca2ae195fb swapchain: Update original_window_rect in d3d12_swapchain_SetFullscreenState().
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-25 08:01:26 -07:00
Hans-Kristian Arntzen 84f4b893ee swapchain: Use VK_CALL macro.
There's a mix and match of vk_procs-> and CALL conventions. Harmonize
this.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-25 15:18:27 +02:00
Hans-Kristian Arntzen b5023bab32 swapchain: Synchronize before resetting blit command buffer.
Randomly appears in GravityMark, odd that validation didn't find this in
other cases.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-25 15:18:27 +02:00
Hans-Kristian Arntzen 7c80c92304 vkd3d: Use ALLOW_VARYING_SUBGROUP_SIZE flag as appropriate.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-25 15:08:53 +02:00