1345 Commits

Author SHA1 Message Date
Giovanni Mascellani
11cf9e918a vkd3d: Use MESSAGE when exceeding Vulkan descriptor limits in d3d12_command_list_update_descriptor_table().
Instead of using ERR. The intention here is to notify the user that the
Vulkan implementation isn't quite capable of doing what the application
requested, but when libvkd3d is compiled with -DVKD3D_ABORT_ON_ERR, ERR
will abort the process.

This allows running the tests on older NVIDIA GPUs with
-DVKD3D_ABORT_ON_ERR.
2025-08-28 20:08:50 +02:00
Henri Verbeet
e3001fcaa4 vkd3d-common: Introduce VKD3D_SHADER_API_VERSION_CURRENT. 2025-08-28 20:04:02 +02:00
Andrey Gusev
d0098b0d59 vkd3d: Recognise VK_QUEUE_OPTICAL_FLOW_BIT_NV in debug_vk_queue_flags(). 2025-08-22 20:58:06 +02:00
Henri Verbeet
f732fb7889 Release 1.17. 2025-08-21 12:52:13 +02:00
Henri Verbeet
55fe8df979 vkd3d: Set the maximum viewport count in d3d12_pipeline_state_get_or_create_pipeline().
VK_DYNAMIC_STATE_VIEWPORT and VK_DYNAMIC_STATE_SCISSOR specify that
viewports and scissor rectangles are dynamic state, but not their
counts.

It took a while to notice this issue because the existing code seemed to
largely work as intended on hardware implementations, but tests using
the additional viewports would fail on llvmpipe.
2025-07-31 14:55:33 +02:00
Nikolay Sivov
a4f5225229 vkd3d: Return success from d3d12_device_EnumerateMetaCommands().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2025-07-28 16:24:04 +02:00
Evan Tang
9c040caa40 vkd3d: Get rid of the default fragment shader from d3d12_pipeline_state_init_graphics().
Vulkan does support rendering without a fragment shader, and this seems
to work fine on current drivers. This commit gets rid of the last
embedded shader binary in libvkd3d, and may have a slight performance
advantage on hardware/drivers able to take advantage of the absence of a
fragment shader.
2025-07-16 17:30:11 +02:00
Evan Tang
39db6731c0 vkd3d: Mask colour writes on graphics pipelines without fragment shaders.
Vulkan leaves the contents of colour attachments undefined in this case.
2025-07-16 16:54:55 +02:00
Giovanni Mascellani
1a5a2969be vkd3d/resource: Write null descriptors with their correct type when using mutable descriptor types.
This fixes crashes in test_null_srv() and test_null_uav() with
llvmpipe and NVIDIA GPUs.
2025-07-14 18:37:13 +02:00
Giovanni Mascellani
fb91bd7b8b vkd3d: Move vkd3d_vk_descriptor_set_index_from_vk_descriptor_type() to resource.c.
It's only used there.
2025-07-14 18:36:35 +02:00
Evan Tang
f4a4e2afec vkd3d: Replace the resource count field of struct d3d12_heap with an internal refcount.
When a heap was released at the same time as the last resource on that
heap, it was possible for both to see each other's
refcount/resource_count as 0 and both would try to destroy the heap.

Avoid that by converting "resource_count" to an internal refcount, which
holds an extra +1 if the main refcount is nonzero. The final release
will then be synchronized between the two since both will operate on
"internal_refcount".
2025-06-25 16:06:49 +02:00
Henri Verbeet
d572f4ac1f vkd3d: Use the DXBC checksum to construct a shader source name. 2025-06-18 15:50:18 +02:00
Henri Verbeet
a93d258a86 Release 1.16. 2025-05-20 11:35:48 +02:00
Henri Verbeet
cb4b5641ea vkd3d: Handle multiple fence NULL event waits in d3d12_device_SetEventOnMultipleFenceCompletion(). 2025-05-06 18:29:06 +02:00
Henri Verbeet
3fabac3f70 vkd3d: Handle multiple fence ANY waits in d3d12_device_SetEventOnMultipleFenceCompletion(). 2025-05-06 18:29:06 +02:00
Henri Verbeet
9222f5e5b1 vkd3d: Handle multiple fence ALL waits in d3d12_device_SetEventOnMultipleFenceCompletion(). 2025-05-06 18:29:06 +02:00
Henri Verbeet
52b947a005 vkd3d: Handle single fence waits in d3d12_device_SetEventOnMultipleFenceCompletion().
By forwarding to ID3D12Fence_SetEventOnCompletion().
2025-05-06 18:29:06 +02:00
Henri Verbeet
3ea84156c7 vkd3d: Validate the fence count in d3d12_device_SetEventOnMultipleFenceCompletion(). 2025-05-06 18:29:06 +02:00
Henri Verbeet
e54070c2d7 vkd3d: Introduce d3d12_fence_add_waiting_event(). 2025-05-06 18:29:06 +02:00
Henri Verbeet
615dce0eaa vkd3d: Introduce struct vkd3d_null_event.
This effectively moves "null_event_cond" from struct d3d12_fence and
"latch" from struct vkd3d_waiting_event together into a separate
structure, as well as storing the signalling function in struct
vkd3d_waiting_event instead of getting it from struct d3d12_device. I
think that largely makes sense on its own, but storing the signalling
function in struct vkd3d_waiting_event also allows us to more easily
implement d3d12_device_SetEventOnMultipleFenceCompletion() in a
subsequent commit.
2025-05-06 18:29:06 +02:00
Giovanni Mascellani
aa032f31bb vkd3d: Split Vulkan debug messages.
So that they do not get truncated if they're too long.
2025-03-03 17:53:17 +01:00
Giovanni Mascellani
8297ea9aa6 vkd3d/device: Require VK_KHR_zero_initialize_workgroup_memory when appropriate.
That extension (and the corresponding feature) must be enabled when
the Initializer operand is used for workgroup variables.
2025-02-26 16:11:50 +01:00
Henri Verbeet
1fd89abcc3 vkd3d-shader: Enable DXIL support in the default configuration. 2025-02-24 15:10:08 +01:00
Giovanni Mascellani
2feb3a3bba vkd3d: Take the root signature from shaders when creating graphics pipelines.
If the root signature wasn't explicitly specified.

This fixes a failure in The Touryst.
2025-02-20 16:00:55 +01:00
Henri Verbeet
0796af7b4b vkd3d: Avoid vkd3d_shader_parse_input_signature(). 2025-02-20 15:57:26 +01:00