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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Georg Lehmann
a7922a7c85
vkd3d: Introduce vkd3d_internal_get_vk_format.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-06-24 12:55:17 +02:00
Hans-Kristian Arntzen
1ea31701c5
vkd3d: Move F1 2020 workaround over to quirks system.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-17 16:42:14 +02:00
Hans-Kristian Arntzen
28c8a595fa
vkd3d: Pass down shader quirks for Necromunda.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-17 16:42:14 +02:00
Philip Rebohle
b97a012787
vkd3d: Enable tiled resources tier 3.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-06-14 15:53:33 +02:00
Hans-Kristian Arntzen
42fb018d85
vkd3d: Fix leak of command pools on device destruction.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-11 15:17:45 +02:00
Hans-Kristian Arntzen
76a8914d6b
vkd3d: Add validation error workaround.
...
Our internal copy shaders are fine, but we get benign errors about
sample count being wrong since we alias descriptors.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-06-10 14:19:04 +02:00
rochaudhari
1699743c37
vkd3d: Enable binary import and image view handle extensions
...
Signed-off-by: Roshan Chaudhari <rochaudhari@nvidia.com>
Reviewed-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2021-06-10 11:26:34 +02:00
Hans-Kristian Arntzen
3c7f188863
vkd3d: Nuke code paths for !nullDescriptor.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-05-27 10:39:22 +02:00
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