Commit Graph

3769 Commits

Author SHA1 Message Date
Georg Lehmann 2c76840ff8 meta: Update COPYING year.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2022-01-25 11:11:51 +01:00
Georg Lehmann 182ebd7e00 meta: Update AUTHORS.
git log --pretty="%aN" | sort | uniq > AUTHORS

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2022-01-25 11:11:51 +01:00
Georg Lehmann c69b73ffcf meta: Create a .mailmap file.
Replaces some of the github account name authors with their real name from
the Signed-off-by.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2022-01-25 11:11:51 +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
Hans-Kristian Arntzen 2b0a161a0d tests: Sanitize test_hull_shader_vertex_input_patch_constant_phase.
Was using w = 0.0, causing weird issues.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-19 17:10:19 +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 338157eb04 tests: Add test for overlapped buffer copies.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-19 14:44:33 +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 0f46a8a7d5 dxil-spirv: Update submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-14 16:09:16 +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
Hans-Kristian Arntzen e5efa8594e tests: Remove RADV bugs which have been fixed.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:18:56 +01:00
Hans-Kristian Arntzen 39c1f9d07a tests: Add test for invalid (?) alias barrier behavior.
Verifies that aliasing barriers on their own do not trigger image layout
transitions.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:16:52 +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
Hans-Kristian Arntzen db943f2341 tests: Add DXIL test for FP32 -> FP16 conversions.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:04:49 +01:00
Hans-Kristian Arntzen 9162e82fb3 tests: Add DXBC test for f32tof16 behavior.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-12 12:04:49 +01:00
Hans-Kristian Arntzen d13424bf22 dxil-spirv: Update submodule.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-01-11 15:21: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
Joshua Ashton bd2be76132 build: Update arch-mingw-github-action to v6 for test builds 2022-01-10 11:49:34 +00:00
Joshua Ashton d94fdd1ca9 build: Update arch-mingw-github-action to v6 2022-01-10 11:46:01 +00: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 18b31a73ec tests: Add additional test cases to minLOD test.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-12-02 22:40:44 +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 9c3549360d tests: Add more TODO for map_texture_validation.
NV really doesn't like linear images, huh ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 20:02:14 +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 2c80431003 tests: Remove TODO for MinLod test.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 16:51:18 +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 f5a6d49e87 tests: Add test for clearing BGRA8 UAVs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-26 16:51:01 +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
Hans-Kristian Arntzen 6a7eee33b5 tests: Remove obsolete format feature check.
BGRA8 UAV is allowed now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 16:32:05 +01:00
Hans-Kristian Arntzen 8305ddec92 tests: Add test for various clear patterns with fully typed cast.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 15:56:43 +01:00
Hans-Kristian Arntzen 3c9b8cb040 tests: Add detailed meta-test for CastFullyTypedFormat.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-26 15:56:43 +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