Commit Graph

391 Commits

Author SHA1 Message Date
Joshua Ashton fccbd3b5e2 vkd3d: Eliminate wchar_size, use UTF-16 string literals
Achieves this with C standard stuff alone, and no compiler hacks.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-09 11:26:28 +01:00
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 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
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 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 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
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
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 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 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
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
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
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
Hans-Kristian Arntzen 0749f46d8e vkd3d: Re-enable wave ops.
dxil-spirv update fixed the issue for me.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-17 10:49:40 +01:00
Hans-Kristian Arntzen 74a654e273 vkd3d: Disable waveops for time being.
The fix which enabled waveops detection broke HZD, since we never tested
with that feature enabled.

Keep it disabled until we can figure out what is going on.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-11-13 12:58:22 +01:00
Philip Rebohle b536723f5a vkd3d: Fix shader model-related feature detection.
We need to know the supported shader model to detect support
for certain features like wave ops correctly.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-11-11 10:41:11 +01:00
Joshua Ashton 8dea487861 meta: Add missing newlines to end of files
Remove trailing whitespace also

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-11-05 17:16:57 +01:00
Philip Rebohle f29b397a9f vkd3d: Implement RTV/DSV descriptor copies.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-30 17:02:17 +01:00
Philip Rebohle 109c881ccb vkd3d: Unify RTV and DSV descriptor types.
The struct definitions were identical anyway, and unifying
these will prevent unnecessary code duplication.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-30 17:02:17 +01:00
Hans-Kristian Arntzen d8bd309ab2 vkd3d: Log vkd3d applicationVersion and build hash.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-28 17:03:54 +01:00
Krzysztof Bogacki 61b13cc278 build: Use separate version string and build hash
Version string is used in logging for information purposes, but pipelines blobs and libraries use uint64_t–based commit hash. Using fixed–size integer silences warnings about string length and makes storing build info a little more efficient.

The hash is obtained separately from version string and is shifted to the left by 4 bits if the working tree is dirty.

Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2020-10-28 10:40:28 +01:00
Hans-Kristian Arntzen 202a3257d7 vkd3d: Make use of StorageImageReadWithoutFormat if supported.
Death Stranding makes use of typed load from RGB10A2.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-12 14:55:24 +02:00
Hans-Kristian Arntzen c59a6abfbd meta: Introduce vkd3d_meta_create_sampler.
Will be used for immutable samplers for scalers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-06 13:15:31 +02:00
Joshua Ashton a991fddeeb build: Use `-fvisibility=hidden` and define exports manually
When building natively on Windows we use dllexport/dllimport for vkd3d/vkd3d_utils public exports.

When building natively on Linux we simply make those visibility default.

Nothing changes for standalone here.

Closes #152

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:44:10 +02:00
Hans-Kristian Arntzen 9d36ab59d6 vkd3d: Add support for a shader debug ring.
Will allow replaced shaders to emit debug messages to a buffer.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-29 15:00:36 +02:00
Philip Rebohle 3682e4d9f7 vkd3d: Rework UAV descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle 3177d80814 vkd3d: Rework SRV descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle c2439d67b8 vkd3d: Rework sampler descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle 5c066940a0 vkd3d: Rework CBV descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Hans-Kristian Arntzen 250357c998 debug: Integrate automatic RenderDoc capturing.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-22 12:44:18 +02:00
Philip Rebohle 3a39f38fc5 vkd3d: Advertize support for relevant shader cache features.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle 92b6e71ce4 vkd3d: Factor out pipeline state struct conversion.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle d4f4e34656 vkd3d: Remove pipeline cache from d3d12_device.
Unused now, instead we should implement D3D12 caching primitives
correctly and rely on the Vulkan driver otherwise.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Hans-Kristian Arntzen eb4ce56139 vkd3d: memset instance and device structs.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 09:34:26 +02:00