Philip Rebohle
d61f562a3e
vkd3d: Implement ID3D12Device7.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2021-11-19 14:57:51 +01:00
Joshua Ashton
046524f2a1
vkd3d: Implement MinLODClamp using VK_EXT_image_view_min_lod
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-17 20:51:20 +01:00
Robin Kertels
19a1dce393
vkd3d: Set GetCopyableFootprints total_bytes late.
...
Halo Infinite uses &desc->Width for total_bytes.
We can't set total_bytes early because code after this relies on desc->Width.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2021-11-16 11:53:18 +01:00
Hans-Kristian Arntzen
45ae742526
vkd3d: Pretend that SSBO alignment on NV is 4 bytes.
...
The 16-byte requirement is kind of a lie. The real requirement is tied
to how vectorized load-store instructions are emitted in the shader
itself since I guess it allows compiler to assume something about
alignment of the base pointer.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen
b53a4a98a6
vkd3d: Enable per component robustness on AMD.
...
Tested and verified to work as expected, not so much on NV.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen
3210832ad9
vkd3d: Enable VK_EXT_scalar_block_layout.
...
dxil-spirv can take advantage of this now.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-09 14:47:10 +01:00
Hans-Kristian Arntzen
35d2f1e87f
vkd3d: Correctly check for SM 6.6 required features.
...
Remove the experimental flag and unconditionally enable SM 6.6 if
available.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
2b11c70129
vkd3d: Hook up WaveSize implementation.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
7cc435c0bc
vkd3d: Enable feature bits for 64-bit atomics.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
de64ebd1d1
vkd3d: Expose Int64 feature.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
23ad0247e3
vkd3d: Enable 64-bit atomics extensions.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
6255eaec32
vkd3d: Stub out the more recent FEATURE_DATA structs.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-11-01 14:20:38 +01:00
Hans-Kristian Arntzen
85c75a042f
vkd3d: Enable VK_NV_compute_shader_derivatives.
...
Supported on more implementations too :)
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-27 17:00:33 +02:00
Georg Lehmann
eb48213bfa
vkd3d: Follow the new shaderStorageImage{Read, Write}WithoutFormat rules.
...
The Vulkan spec update 1.2.195 restricted these features to a very limited
format subset, and somehow this is supposed to not be an API break?
Anyway, let's follow the new rules.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann
fd690e3831
vkd3d: Enable typed uav loads based on KHR_format_feature_flags2.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann
07d53a82cc
vkd3d: Init shader extensions later.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann
4c37b4c341
vkd3d: Use vkGetPhysicalDeviceFormatProperties2.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Georg Lehmann
c8d633cb51
vkd3d: Enable VK_KHR_format_feature_flags2.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-10-27 17:00:21 +02:00
Hans-Kristian Arntzen
6548e4fd00
vkd3d: Add VKD3D_CONFIG for experimentally enabling SM 6.6.
...
To be used for bringup and removed when we complete the support.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-26 15:32:36 +02:00
Hans-Kristian Arntzen
740e23ea8a
vkd3d: Add VKD3D_CONFIG to force non-invariant position.
...
It's common enough that new games break on RDNA2 because of this that we
should enable this by default. This matches DXVK behavior.
SOTTR gets a special weird exception, just like DXVK. The shaders are
broken enough that the proper fix is actually precise, not invariant.
This will be addressed at some later point.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen
be8d6ec7ad
vkd3d: Make global quirks info struct a value.
...
Allows us to fiddle with it after the fact.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-10-18 15:51:20 +02:00
Hans-Kristian Arntzen
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