In a pipeline, it is not possible to mix and match DXIL and DXBC.
D3D12 debug layer will complain, although vkd3d does not care about
this.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Resource index is found in idx[0] in SM 5.0, but idx[1] when using SM
5.1, and register space is encoded separately. An rb_tree keeps track of
the internal resource index idx[0] and can map that to space/binding as
required when emitting SPIR-V.
For this to work, we must also make UAV counters register space aware.
In earlier implementation, UAV counter mask was assumed to correlate 1:1
with register_index, which breaks on SM 5.1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
On Windows, it is not ideal to rely on Vulkan being available as a
linkable library as a full install of the Vulkan SDK must be present and
set up, be friendly and load Vulkan dynamically instead.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
When testing vkd3d on Windows, we were only able to use the native D3D12
path. Add an ifdef to configure this.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cannot disable VK_EXT_descriptor_indexing as we relied on internal
behavior in RADV related to global_bo_list. Implementing bindless
properly in vkd3d will solve this correctly.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Otherwise, we delcare certain input control points twice in shaders that
access them in a fork phase, which is not allowed as per Vulkan spec:
"Any two inputs listed as operands on the same OpEntryPoint must not
be assigned the same location, either explicitly or implicitly"
Fixes invalid SPIR-V and resulting RADV driver crashes in Metro Exodus.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Greatly reduce VA allocations we have to make and makes returned VA more
sensible, and better matches returned VAs we see on native drivers.
D3D12 usage flags for buffers seem generic enough that there is no
obvious benefit to place smaller VkBuffers on top of VkDeviceMemory.
Ideally, physical_buffer_address is used here, but this works as a good
fallback if that path is added later.
With this patch and previous VA optimization, I'm observing a 2.0-2.5%
FPS uplift on SOTTR when CPU bound.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The alignments are now checked in d3d12_resource_validate_desc().
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This would cause CoreValidation-Shader-InterfaceTypeMismatch validation
errors from Wine's test_shader_interstage_interface() d3d11 test. This
reverts parts of commits 1eb7eca411 and
04ec461fb4.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
ID3D12GraphicsCommandList2 and WriteBufferImmediate() are used by
Hitman 2, but implementing the function on top of an AMD extension has
no effect on game behaviour. It's commonly used to write debug info.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This method was missing in version 10.0.15063.0 of the SDK, but is
present in version 10.0.18362.0, without a UUID change. Presumably that
means this was simply an omission in the older header, rather than an
API change in the newer header.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Test large DepthOrArraySize for small resources, and test compressed
textures at the 64KB limit.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The right place for alignment validation is d3d12_resource_validate_desc().
The mod alignment test, which returns a size of ~0 on failure, is incorrect
on systems where Vulkan requires alignments of 0x20000 or more, and breaks
Hitman 2, which uses the returned value unchecked and allocates heaps of
0xffffffff bytes.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>