Commit Graph

601 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen 7bf93b844d vkd3d: Require VK_EXT_robustness2.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-05-27 10:39:22 +02:00
Hans-Kristian Arntzen a256a9266e vkd3d: Rewrite descriptor QA.
Adds support for GPU-assisted validation of descriptor usage in the
CBV_SRV_UAV heap.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-05-26 17:26:01 +02:00
Hans-Kristian Arntzen 5e67d30883 vkd3d: Add config option for descriptor QA.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-05-26 17:26:01 +02:00
Georg Lehmann a411256c7f vkd3d: Enable and require shaderDrawParameters.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-04-29 06:48:37 +01:00
Joshua Ashton 3e4a8b1504 vkd3d: Remove type/next from vkd3d device/instance structures
There's really no reason to overcomplicate adding optional extensions this way.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-20 18:25:41 +02:00
Joshua Ashton bd988f2b74 vkd3d: Remove vkd3d_optional_device_extensions_info
Roll this into vkd3d_device_create_info, no need for this to be a pNext thing.

Additionally, fix some memory leaks on device creation failure.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-20 18:25:41 +02:00
Joshua Ashton 59148c1932 vkd3d: Remove vkd3d_optional_instance_extensions_info
Roll this into vkd3d_instance_create_info, no need for this to be a pNext thing.

Additionally, fix some memory leaks on instance creation failure.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-20 18:25:41 +02:00
Philip Rebohle f06f94bfb4 vkd3d: Enable multi_queue by default.
And replace option with a single_queue flag to do the opposite.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-04-19 16:40:49 +02:00
Philip Rebohle 4f9ca6c3df vkd3d: Create bundles and bundle allocators as necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-04-14 16:24:55 +02:00
Philip Rebohle 1990270bbb vkd3d: Implement CreateCommandList on top of CreateCommandList1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-04-14 16:24:55 +02:00
Joshua Ashton 2860b0a548 vkd3d: Enable force_tgsm_barriers for F1 2020
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Closes: #611
2021-04-12 16:29:57 +02:00
Joshua Ashton 043fd304f8 vkd3d-shader: Add force_tgsm_barriers config flag
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-12 16:29:57 +02:00
Joshua Ashton 5978f5958e vkd3d: Expose TIER_2 Variable Rate Shading
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-04-12 13:22:01 +02:00
Hans-Kristian Arntzen 7dc2a5cad7 vkd3d: Enable VK_KHR_sampler_mirror_clamp_to_edge.
CP77 requires it now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-04-07 21:57:50 +02:00
Philip Rebohle 2f1b23ece6 vkd3d: Enable conservative rasterization tier 3.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-25 18:00:59 +01:00
Philip Rebohle 8a61128152 vkd3d: Enable VK_EXT_conservative_rasterization if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-25 18:00:59 +01:00
Philip Rebohle fdf4df18a4 vkd3d: Add Feature Level 12_2 detection.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-25 18:00:59 +01:00
Hans-Kristian Arntzen 2f60a3bf66 vkd3d: Fix broken debug_vk_memory_{property,heap}_flags.
C is fun, yo. Returned data from dead stack variable, also triggered
overflow in some cases.

Uncalled in release mode, but can crash debug builds.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-25 17:58:18 +01:00
Joshua Ashton 65b13f6cd6 vkd3d: Use VK_KHR_create_renderpass2
We need this before implementing TIER_2 variable rate shading.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-24 15:20:10 +01:00
Hans-Kristian Arntzen 5197edb03b vkd3d: Enable 16-bit storage features.
Don't need extension, since VK_KHR_16bit_storage is core in Vulkan 1.1.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen bd16d1a88d vkd3d: Support RTPSO object collections.
This is quite complicated, but we can use VK_KHR_pipeline_library
to implement this functionality.
2021-03-23 18:35:35 +01:00
Hans-Kristian Arntzen 34a09967d5 vkd3d: Prefer compute queues for TRANSFER.
TRANSFER + CONCURRENT is generally death for compression.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-16 21:41:37 +01:00
Philip Rebohle 93a80d5eaa vkd3d: Create one fence worker per command queue.
Rather than one per device. This solves issues with D3D12 fences
being signalled too late because the fence worker is waiting on
a different set of semaphores while the fence is being enqueued.

Greatly increases performance in Horizon Zero Dawn and Death
Stranding with multi-queue mode enabled.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-16 12:43:24 +01:00
Philip Rebohle 724257c0d8 vkd3d: Add multi_queue config flag.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle 1e3c91579e vkd3d: Create one vkd3d queue per Vulkan device queue.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle 3cd93781ff vkd3d: Create multiple queues per queue family if possible.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Philip Rebohle 4c0a0b0467 vkd3d: Introduce vkd3d_queue_family_info.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-03-15 12:52:00 +01:00
Hans-Kristian Arntzen b44bfa7066 vkd3d: Remove obsolete comment.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-13 06:26:27 +00:00
Hans-Kristian Arntzen 43370c6426 vkd3d: Only enable DXR if requested.
The implemnentation is not complete enough to safely enable it, since
some games will try to create RTPSOs by default, leading to crashes.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen 58615cd5dc vkd3d: Allow devices with recursion of 1 to be accepted.
We can fail RTPSOs later if they for whatever reason use recursion.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen d9be9b57f2 vkd3d: Actually use RGBA16 formats for RT VBO.
It's really supposed to load 4 components and ignore. RGB16 is not
mandatory, so just use the "expected" formats after all.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen 2b6658da67 vkd3d: Enable RT tier 1.0 if possible.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-12 12:20:10 +01:00
Hans-Kristian Arntzen 13d132f1c4 vkd3d: Add support for hoisting CBV descriptors to push descriptors.
Bindless CBV is *pretty* bad on NVIDIA, so add a code path which can
promote descriptor table CBVs into push descriptors.

We can safely do this with Root Signature 1.1 STATIC or
the somewhat obscure STATIC_KEEPING_BUFFER_BOUNDS_CHECKS.

With VOLATILE, which basically all titles are using,
we can still force this behavior through a config flag,
but this is an incorrect speed hack. It works in most
titles however, since bindless CBV is exceptionally rare.

We only hoist descriptors when the root signature range has 1 descriptor
anyway, so we should avoid any reasonable bindless scenario.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen 3e876c2857 vkd3d: Log VKD3D_CONFIG with INFO.
Useful to make sure we actually passed it correctly ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-10 11:46:05 +01:00
Hans-Kristian Arntzen 686a3efc08 vkd3d: Verify VBO RTAS support when checking RT tier.
Format conventions for RT are ... special.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-03-04 16:30:29 +01:00
Joshua Ashton 3224688295 vkd3d: Enable VK_EXT_debug_utils conditionally
Enabling VK_EXT_debug_utils comes at some overhead in Wine due to the object tracking required. There is also likely a non-zero overhead in some native implementations also.

By enabling this conditionally, we can also avoid additional overhead from apps that set debug labels on both the Vulkan and front-end side.

The default condition is to enable it when building with Renderdoc integration or in debug builds.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-02 11:09:29 +01:00
Joshua Ashton 91fc472601 vkd3d: Add mechanism for conditional extensions
Add a way to enable an extension via config flags.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-02 11:09:29 +01:00
Joshua Ashton 4c6f5375a6 vkd3d: Refactor config_flags to be global rather than instance state
Makes it so we can access it in code where we have no concept of a device/instance.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-02 11:09:29 +01:00
Joshua Ashton 64a6bae1a0 vkd3d: Remove vkd3d_application_info structure
This thing has no right to exist.

We don't get this information in D3D12 and it's getting in the way of me refactoring config flags.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-02 11:09:29 +01:00
Joshua Ashton 4da76cb51b vkd3d: Simplify properties/features tracing
Simplifies this to make it easier to add new properties/features
so we don't have a bunch of pointers to things that are just a child
of the device info structure.

Fixes warnings when compiling without traces too.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-02 11:09:29 +01:00
Hans-Kristian Arntzen 3839f5e17c vkd3d: Ignore known useless validation warnings.
These only clutter up validation in testing.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-26 15:04:11 +01:00
Joshua Ashton 8c9527cdf7 vkd3d: Refactor SetName implementation
As per MSDN, SetName is just a wrapper around SetPrivateData and a specific GUID.

Some apps and tools will use this to retrieve their name back.

So instead, just forward the name to Vulkan in the SetPrivateData call.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-25 21:51:43 +01:00
Hans-Kristian Arntzen 4fe5b9388d vkd3d: Do not disable robustness, ever.
There are pragmatic reasons for not following spec 100% here.
The only known case where UpdateAfterBind robustness is not exposed
seems to be somewhat bogus, and we cannot run D3D12 correctly without
robustness either way.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-25 17:53:48 +01:00
Hans-Kristian Arntzen 4365f9962f vkd3d: Allocate query pools based on type index instead of D3D12 type.
Postbuild info is a query in Vulkan, but not so in D3D12.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-25 16:14:16 +01:00
Hans-Kristian Arntzen 2afe25c0c8 vkd3d: Implement GetRaytracingAccelerationStructurePrebuildInfo.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-25 16:14:16 +01:00
Hans-Kristian Arntzen d773e67fff vkd3d: Add helper query to check if RT should be used.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-25 16:14:16 +01:00
Hans-Kristian Arntzen 15e36a0430 vkd3d: Use virtual VAs for descriptor heap GPU VAs.
Allows local root signatures to work correctly and is also a good
optimization since we no longer need to dereference memory (potentially
cold cache lines) to figure out heap offset in command buffer.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-23 12:28:19 +01:00
Hans-Kristian Arntzen 1af3f9c65f vkd3d: Use calloc for d3d12_device instead of manual memset.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-23 12:28:19 +01:00
Philip Rebohle 6a34d3d204 vkd3d: Remove _2 suffix from memory allocation functions.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle 53f6a9c78a vkd3d: Rename _2 suffix from resource creation functions.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle a2e14d7d1d vkd3d: Remove _2 suffix from d3d12_heap_2 and related functions.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle db2e0c7587 vkd3d: Remove vkd3d_gpu_va_allocator.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle 9792b02b26 vkd3d: Use vkd3d_memory_allocation for scratch buffers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Philip Rebohle db1b425d2a vkd3d: Use new resource and heap implementations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-18 14:17:22 +01:00
Hans-Kristian Arntzen 7051bf76f7 vkd3d: Fix validation errors with KHR_fragment_shading_rate.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-02-16 16:07:55 +00:00
Philip Rebohle 78713062fe vkd3d: Introduce unique_queue_mask.
Has one bit set for each vkd3d_queue_family that points to a
unique queue. This can be used to iterate over device queues
without having to check for duplicates manually.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-16 16:06:26 +01:00
Philip Rebohle 812c82f8ac vkd3d: Introduce VKD3D_QUEUE_FAMILY_INTERNAL_COMPUTE.
This needs a rework when we re-enable multi-queue support.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-16 16:06:26 +01:00
Philip Rebohle 229273fb3b vkd3d: Add memory allocator instance to device.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-02-15 17:04:52 +01:00
Joshua Ashton 00c8d1df9d vkd3d: Refactor vkd3d_physical_device_info_init
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-15 11:25:21 +01:00
Joshua Ashton c0d4ead8ca vkd3d: Implement TIER_1 variable rate shading
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-12 13:39:05 +01:00
Joshua Ashton fccbd3b5e2 vkd3d: Eliminate wchar_size, use UTF-16 string literals
Achieves this with C standard stuff alone, and no compiler hacks.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-09 11:26:28 +01:00
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
Philip Rebohle 6940716417 vkd3d: Enable VK_AMD_buffer_marker if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +02:00
Philip Rebohle d4bbd4b43e vkd3d: Add sampler state object to d3d12_device.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Hans-Kristian Arntzen 6260d18716 vkd3d: Implement OpenExistingHeapFromFileMapping.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen 0c1b49d681 vkd3d: Implement OpenExistingHeapFromAddress.
Refactors out some common code in d3d12_heap_init.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen 95b6596d75 vkd3d: Enable VK_EXT_external_memory_host.
Needed for OpenExistingHeapFromAddress and friends.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Philip Rebohle 9098221f0a vkd3d: Add sampler map to device.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Hans-Kristian Arntzen 00618cb2c1 vkd3d: Load VK_LAYER_KHRONOS_validation if we enable debug mode.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-30 17:36:53 +02:00
Philip Rebohle 3364758746 vkd3d: Remove volatile packed descriptor handling.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-30 11:56:24 +02:00
Hans-Kristian Arntzen 37e4ce7ce7 vkd3d: Make a profiled vtable for ID3D12Device.
There are two advantages of doing it like this:
- When profiling is not enabled, we get no overhead for device calls.
- Avoids cluttering up the main implementation.

Disadvantage is that rolling inherited vtables like this is quite
disgusting, but this is C, what you gonna do ...

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Hans-Kristian Arntzen 9a1943d57b vkd3d: Init profiling when we create an instance.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-20 16:39:15 +02:00
Joshua Ashton b38a18dbd8 vkd3d: Move copy descriptors implementation into a new func
Calling this from CopyDescriptorsSimple on its own is a bad idea given its __stdcall and GCC doesn't like optimizing that.

Also marked it as inline given it can easily be optimized greatly contextually for CopyDescriptorsSimple

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-17 14:02:18 +02:00
Philip Rebohle 1af4c6c719 vkd3d: Enable VK_EXT_calibrated_timestamps if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Hans-Kristian Arntzen 96402f1164 vkd3d: Fix straggling warnings for MSVC.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-16 13:00:09 +02:00
Hans-Kristian Arntzen 926f2033a9 vkd3d: Enable VK_EXT_extended_dynamic_state.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 7bccab7427 debug: Re-introduce different debug channels.
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 14:18:15 +02:00
Joshua Ashton 08544fb938 vkd3d: Use CONST_VTBL instead of const for vtable decls
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Philip Rebohle d43f70bb1b vkd3d: Enable VK_EXT_robustness2 if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Joshua Ashton 287ceb207d vkd3d: Refactor platform-specific code
This commit moves the module handling code which was previously dumped in device.c and the code to retrieve the current executable path to its own file.

This also eliminates HAVE_DECL_PROGRAM_INVOCATION_NAME from config.h

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 11:07:50 +02:00
Joshua Ashton f3c85328f1 vkd3d: Remove PACKAGE_NAME usage for engine version
This isn't going to change. Drivers use this to do special things,
so changing it would probably cause a bunch of random problems anyway.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 21:45:35 +02:00
Hans-Kristian Arntzen cbdf6f88d2 vkd3d: Remove dependency on linking directly against libvulkan.
There is no reason to not load Vulkan dynamically, otherwise, we must
have loader dev packages installed, which is not ideal.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-15 15:47:18 +02:00
Hans-Kristian Arntzen 9534c1a345 vkd3d: Move to VK_EXT_debug_utils.
debug_marker/debug_report are both deprecated in favor of debug_utils and vkd3d was using marker in a
buggy way anways, as debug_marker requires debug_report to work, but it was
only conditionally enabled.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Hans-Kristian Arntzen 6a038003e2 vkd3d: Always enable instance debug extension.
Prepare for moving to VK_EXT_debug_utils.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Hans-Kristian Arntzen 726356ebb1 vkd3d: Always use PDF2/PDP2 without KHR extensions.
It is core in Vulkan 1.1.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Philip Rebohle 8ced3b53b9 vkd3d: Expose D3D12_RESOURCE_HEAP_TIER_1 based on hardware capabilities.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-08 15:09:21 +02:00
Philip Rebohle bbcaeee69d vkd3d: Determine compatible memory types for different resource types.
We'll need this to more accurately select the memory type for D3D12
heaps based on which resources are allowed to be placed in it.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-08 15:09:21 +02:00
Philip Rebohle e6857939e7 vkd3d: Do not enable VK_KHR_dedicated_allocation.
Core in 1.1.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-02 16:23:38 +02:00
Philip Rebohle 45109686be vkd3d: Do not enable VK_KHR_maintenance3.
Core in 1.1.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-02 16:23:38 +02:00
Philip Rebohle 317868ab2b vkd3d: Remove required extensions.
Both of these are core in 1.1.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-02 16:23:38 +02:00
Philip Rebohle 9852b1702d vkd3d: Require Vulkan 1.1 device.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-02 16:23:38 +02:00
Philip Rebohle 3880e61be2 vkd3d: Require Vulkan 1.1 instance.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-02 16:23:38 +02:00
Hans-Kristian Arntzen 7e229213f5 vkd3d: Enable SM 6.2 features.
Need float16_int8 and subgroup with extended types to implement new SM
6.2 features. For now, skip over SM 6.1 features until someone makes use
of them.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-05-27 14:33:24 +02:00
Philip Rebohle e99d92bef9 vkd3d: Expose Tiled Resources Tier 2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle 6cbf61ca92 vkd3d: Enable VK_EXT_sampler_filter_minmax if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle 00e956dfac vkd3d: Expose Tiled Resources Tier 1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle 7836c06204 vkd3d: Add dedicated queue for sparse binding if necessary.
This will serve as a fallback if at least one queue family
does not support sparse binding.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle 98462ea1ed vkd3d: Implement d3d12_device_GetResourceTiling.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle e59d6c4c32 vkd3d: Clean up queue creation and management.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-06 14:48:12 +02:00
Philip Rebohle 8edfa29542 vkd3d: Move vkd3d_queue_family into header.
And get rid of the somewhat redundant VKD3D_QUEUE_MAX_FAMILY_COUNT.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-06 14:48:12 +02:00
Philip Rebohle d386a473c2 vkd3d: Clean up vkd3d_select_queues.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-06 14:48:12 +02:00
Philip Rebohle 42b6ce82f0 vkd3d: Enable VK_EXT_custom_border_color if available.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-05 11:39:25 +02:00
Philip Rebohle c3170731bf vkd3d: Support CastingFullyTypedFormatSupported.
Look up the typeless format for any given image format, then
look up the corresponding compatibility list. This also fixes
a potential issue with implicit SRGB <-> UNORM compatibility.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 15:18:09 +02:00
Sveinar Søpler c2e79af6a1 vkd3d: Fix 32-bit compiler warnings
This fixes a couple of 32-bit compiler warnings.

Signed-off-by: Sveinar Søpler <cybermax@dexter.no>
2020-04-21 11:54:59 +02:00
Philip Rebohle 64bd4f6404 vkd3d: Add VKD3D_FEATURE_LEVEL override.
Unblocks some games that request Feature Level 12.0, such as
Anno 1800, Monster Hunter World, The Talos Principle. May
cause issues if games use unsupported features.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-17 15:36:51 +02:00
Philip Rebohle f9a2a68948 vkd3d: Improve d3d12_device_SetResidencyPriority stub.
Monster Hunter World requires this function to succeed.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 18:38:31 +02:00
Philip Rebohle 957aec4785 vkd3d: Restore old ClearUnorderedAccessView implementation.
The current code uses D3D12 abstractions to create pipelines but
issues raw Vulkan API calls to actually implement the functionality,
which means the code makes assumptions about the exact descriptor
set layout and push constant layout, which is generally a bad idea
now that we have multiple code paths for root constants etc.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 18:03:39 +02:00
Hans-Kristian Arntzen edc614ab2e vkd3d: Remove legacy fence/semaphore path.
Prepares for a rewrite of queue submission, the legacy path is never
run in practice and will likely break in subtle ways.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-16 15:31:04 +02:00
Philip Rebohle d6204bb993 vkd3d: Implement D3D12_FEATURE_QUERY_META_COMMAND feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 14:25:01 +02:00
Philip Rebohle 25f0af58f6 vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS6 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 14:25:01 +02:00
Philip Rebohle 61530857d6 vkd3d: Update ID3D12Device to ID3D12Device6.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 14:25:01 +02:00
Philip Rebohle 78b6d291cd vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS5 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 10:35:59 +02:00
Philip Rebohle 638dcb1afb vkd3d: Update ID3D12Device to ID3D12Device5.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 10:35:59 +02:00
Philip Rebohle 0871f02b7e vkd3d: Implement D3D12_FEATURE_CROSS_NODE feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 03b15571d8 vkd3d: Implement D3D12_FEATURE_SERIALIZATION feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 26538f4377 vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS4 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 9c119b907c vkd3d: Implement ID3D12Device4::GetResourceAllocationInfo1.
Also, support querying more than one resource at a time.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 0c03bbe9b5 vkd3d: Implement ID3D12Device4::CreateCommandList1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 23e2b62950 vkd3d: Implement ID3D12Device4::CreateReservedResource1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle a66e9a2ce4 vkd3d: Implement ID3D12Device4::CreateCommittedResource1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 5fbca43bc8 vkd3d: Implement ID3D12Device4::CreateHeap1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle aa2c21b2bd vkd3d: Update ID3D12Device to ID3D12Device4.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle da07275b16 vkd3d: Implement d3d12_device_CreatePipelineLibrary.
Needed by Claybook.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-08 14:23:28 +02:00
Philip Rebohle 50b5959e64 vkd3d: Implement better stub for GetCachedBlob.
We currently can't implement this in a meaningful way, but we
should return an empty blob in order to not crash applications.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-08 14:23:28 +02:00
Philip Rebohle 7f91484c28 vkd3d: Enable EXT_shader_stencil_export if available.
Allows us to expose PSSpecifiedStencilRefSupported.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-06 11:53:09 +02:00
Philip Rebohle 4c1cc5732c vkd3d: Enable VK_EXT_shader_viewport_index_layer if available.
And expose the following feature cap on capable GPUs:
VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-06 11:53:09 +02:00
Philip Rebohle 4e3ea62e79 vkd3d: Implement depth bounds test.
Used by Resident Evil 2 and 3 if available.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 16:04:39 +02:00
Philip Rebohle 1d8afd85d4 vkd3d: Signal fence in EnqueueMakeResident.
Resident Evil 2 needs this method. Since we don't really have a concept
of explicit memory residency in Vulkan, we're fine not doing anything else.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 11ca844bef vkd3d: Implement CreatePipelineState.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle f032702a74 vkd3d: Extend graphics pipeline description.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 5ba09a9ab4 vkd3d: Implement D3D12_FEATURE_EXISTING_HEAPS feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 0a5c618e9e vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS3 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 34180e4073 vkd3d: Implement D3D12_FEATURE_COMMAND_QUEUE_PRIORITY feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle ef937713e3 vkd3d: Implement D3D12_FEATURE_SHADER_CACHE feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 1ab7dd67a0 vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS2 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 8687969a2a vkd3d: Implement D3D12_FEATURE_ARCHITECTURE1 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 3dc9f7c585 vkd3d: Implement D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 90a22df2a4 vkd3d: Implement D3D12_FEATURE_D3D12_OPTIONS1 feature query.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 7c7db3c77c vkd3d: Optionally enable VK_EXT_subgroup_size_control.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 0273292224 vkd3d: Optionally enable VK_NV_shader_sm_builtins.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle ebcc18583c vkd3d: Optionally enable VK_AMD_shader_core_properties{_2}.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 70ac2f147e vkd3d: Upgrade ID3D12Device to ID3D12Device3.
Stubs for now, will implement new functionality as needed.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle 6b113bb629 vkd3d: Introduce d3d12_command_list_iface type alias.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle b6d5a407ce vkd3d: Define d3d12_device_iface type alias.
This way we don't have to change all function parameter types
every time we upgrade the interface version.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Philip Rebohle c41275478c vkd3d: Refactor pipeline state creation.
We need a more extensible struct to contain the pipeline
descriptions in order to be able to support new rendering
features.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-31 18:28:18 +02:00
Hans-Kristian Arntzen afdbf6edcd vkd3d: Enable VK_KHR_timeline_semaphore extension.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-31 12:51:05 +02:00
Philip Rebohle 8344e8224e vkd3d: Only add feature structs to pNext chain if extension is supported.
RenderDoc will sometimes report extensions as unsupported, but still
fill out and accept the respective feature structs. Since we assume
extensions to be supported if the feature is enabled, we sometimes
try to use functionality that RenderDoc disables and crash.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle 00d88454ee vkd3d: Factor out extension enumeration.
Besides cleaning up the code, this also allows us to
use information about the available extensions earlier.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle 34f9cae1c6 vkd3d: Disable unused BufferDeviceAddress features.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 11:07:53 +02:00
Philip Rebohle 643ace438e vkd3d: Store push descriptor properties in device info struct.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-30 10:47:47 +02:00
Philip Rebohle 920d029100 vkd3d: Don't require bindless UAV counters for RESOURCE_BINDING_TIER_3.
Nvidia does not support VK_KHR_buffer_device_address at the moment.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-28 10:39:14 +01:00
Philip Rebohle 8843739797 vkd3d: Require bindless UAV and UAV counters for BINDING_TIER_3.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:37:59 +01:00