Commit Graph

177 Commits

Author SHA1 Message Date
Józef Kucia 55025f7bec libs/vkd3d: Get rid of vkd3d_get_vk_queue().
Replaced by vkd3d_acquire_vk_queue().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-16 20:11:12 +01:00
Józef Kucia 12ca2bbcf6 libs/vkd3d: Add thread-safe API for accessing Vulkan command queues.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:39 +01:00
Józef Kucia db2e1d402e libs/vkd3d: Synchronize access to Vulkan queues.
Access to VkQueue must be externally synchronized.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-15 17:51:32 +01:00
Józef Kucia 604056daf4 libs/vkd3d: Allow library user to create internal threads.
We want to create Win32 threads when running under Wine.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-12 19:26:58 +01:00
Józef Kucia 5d85da0d84 libs/vkd3d: Release current command allocator in d3d12_command_list_Close().
d3d12_command_allocator_free_command_buffer() is not a very accurate name.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-09 20:37:12 +01:00
Józef Kucia f2b37c732a libs/vkd3d: Use if-else in d3d12_command_list_get_fb_extent(). 2017-10-24 12:10:48 +02:00
Józef Kucia c70a023aeb libs/vkd3d: Remove FIXME comment from vk_barrier_parameters_from_d3d12_resource_state(). 2017-10-24 12:10:48 +02:00
Józef Kucia b211df683e libs/vkd3d: Implement copying between depth/stencil and color textures.
This could be implemented more efficiently, but ideally we would get
a Vulkan extension for copying between depth/stencil and color textures.
2017-10-20 18:27:17 +02:00
Józef Kucia 853068c84d libs/vkd3d: Get rid of host writes memory dependency for intial state transitions. 2017-10-06 17:06:31 +02:00
Józef Kucia 97bfba1167 libs/vkd3d: Avoid read access bits in source access masks.
A memory dependency is used to make memory writes available
and visible.
2017-10-06 17:06:31 +02:00
Józef Kucia 67aed755ab libs/vkd3d: Implement d3d12_command_list_ClearUnorderedAccessViewUint() for R32_UINT buffer views.
Ideally, we would store additional informations only in CPU descriptors.
2017-10-04 13:55:33 +02:00
Józef Kucia fecc94cebc libs/vkd3d: Add helpers for dereferencing descriptor handles. 2017-10-04 13:55:33 +02:00
Józef Kucia 14d975da8d libs/vkd3d: Unroll descriptor copies for SRVs and UAVs.
Consecutive binding updates need to have the same descriptor type
according to validation layers.
2017-09-22 16:42:07 +02:00
Józef Kucia 6ef1961ed0 libs/vkd3d: Avoid recording invalid vkCmdCopyImage() commands. 2017-09-21 15:12:13 +02:00
Józef Kucia 54cd424daf libs/vkd3d: Implement d3d12_command_list_SetGraphicsRootShaderResourceView(). 2017-09-19 17:29:20 +02:00
Józef Kucia eb8eba02bd libs/vkd3d: Implement d3d12_command_list_SetComputeRootShaderResourceView(). 2017-09-19 17:29:20 +02:00
Józef Kucia 90cf804d9b libs/vkd3d: Use Vulkan pipeline cache for graphics pipelines. 2017-09-19 10:58:04 +02:00
Józef Kucia acfd64c20e libs/vkd3d: Avoid copying descriptors for dirty root descriptor tables. 2017-09-18 15:40:42 +02:00
Józef Kucia 2ea8ffb554 libs/vkd3d: Avoid vkCmdCopyQueryPoolResults() for not issued queries.
The Vulkan spec states:

  * "If the query does not become available in a finite amount of time
    (e.g.  due to not issuing a query since the last reset), a
    VK_ERROR_DEVICE_LOST error may occur."

  * "If queries will never finish (e.g. due to being reset but not
    issued), then vkGetQueryPoolResults may not return in finite time."
2017-09-14 14:57:09 +02:00
Józef Kucia 334c532401 libs/vkd3d: Implement d3d12_command_list_CopyResource() for buffers. 2017-09-14 14:57:09 +02:00
Józef Kucia 8e802ed0af libs/vkd3d: Update descriptor table ranges only with matching descriptor types. 2017-09-11 22:35:16 +02:00
Józef Kucia a78fe60ef8 Revert "libs/vkd3d: Skip unbound UAV counters."
This reverts commit d9bc635d1a.

We should not need to handle this invalid behavior. It was triggered
by the bug in d3d12_command_list_update_descriptor_table().
2017-09-11 22:35:16 +02:00
Józef Kucia 1cde37d341 libs/vkd3d: Fix updating descriptor sets for descriptor tables with gaps.
Fixes 9afaed918d.
2017-09-11 22:35:16 +02:00
Józef Kucia 32966338df libs/vkd3d: Get rid of UAV counter count from d3d12_pipeline_state. 2017-09-08 15:30:48 +02:00
Józef Kucia e8868affc0 libs/vkd3d: Clear UAV counters dirty mask after updating descriptors. 2017-09-08 15:30:48 +02:00
Józef Kucia d9bc635d1a libs/vkd3d: Skip unbound UAV counters. 2017-09-08 15:04:30 +02:00
Józef Kucia 9afaed918d libs/vkd3d: Bind descriptor set for UAV counters. 2017-09-08 15:04:30 +02:00
Józef Kucia 19dc6c412e libs/vkd3d: Constify root signature pointers. 2017-09-08 15:04:30 +02:00
Józef Kucia 37f4c9d2a3 libs/vkd3d: Print only TRACE() messages for not initialized descriptors.
A descriptor do not have to be initialized if it is not used by shaders.
2017-09-07 17:48:43 +02:00
Józef Kucia 23150f6050 libs/vkd3d: Update Vulkan descriptor sets just before draw call. 2017-09-05 11:53:55 +02:00
Józef Kucia 36d7578093 libs/vkd3d: Move descriptor set functions closer to top of file.
In prep for the next commit.
2017-09-05 11:53:55 +02:00
Józef Kucia a780b7a11c libs/vkd3d: Implement reference counting for Vulkan views and samplers. 2017-09-04 18:33:09 +02:00
Józef Kucia 62bd4e6e63 libs/vkd3d: Add support for OffsetInDescriptorsFromTableStart. 2017-08-31 11:21:34 +02:00
Józef Kucia d8847aa462 libs/vkd3d: Fix texture region copying for miplevels other than 0. 2017-08-31 09:42:50 +02:00
Józef Kucia 0dca9909d9 libs/vkd3d: Copy single layer for array textures in d3d12_command_list_CopyTextureRegion(). 2017-08-31 09:42:50 +02:00
Józef Kucia d42f46cab6 libs/vkd3d: Use d3d12_resource_is_buffer() in d3d12_command_list_ResolveQueryData(). 2017-08-31 09:29:02 +02:00
Józef Kucia 904858f4a9 libs/vkd3d: Introduce d3d12_resource_is_texture() helper function.
Makes some code easier to read.
2017-08-30 18:31:52 +02:00
Sven Hesse 4aa534914b libs/vkd3d: Implement CopyTextureRegion() for texture to texture. 2017-08-30 16:53:29 +02:00
Henri Verbeet 3019a3e8f1 libs/vkd3d: Support both native and Win32 wchar_t. 2017-08-29 16:36:05 +02:00
Sven Hesse 1f51eebe12 libs/vkd3d: Fail in GetTimestampFrequency() for queues without timestamp support. 2017-08-29 15:17:39 +02:00
Sven Hesse 5b6bd40464 libs/vkd3d: Cache the number of valid bits in queue timestamp queries. 2017-08-29 15:16:41 +02:00
Sven Hesse 4bfa651561 libs/vkd3d: Reset the queries before use. 2017-08-29 14:05:49 +02:00
Sven Hesse 531875d924 libs/vkd3d: Add a FIXME for binary occlusion queries. 2017-08-29 13:38:39 +02:00
Sven Hesse 027cc05209 libs/vkd3d: Set VK_QUERY_CONTROL_PRECISE_BIT for occlusion queries. 2017-08-29 13:38:39 +02:00
Józef Kucia 6800dc8e40 libs/vkd3d: Use switch instead of multiple ifs in vk_write_descriptor_set_from_d3d12_desc(). 2017-08-29 12:43:04 +02:00
Józef Kucia 7864ac4d67 libs/vkd3d: Merge if statements in vk_write_descriptor_set_from_d3d12_desc(). 2017-08-29 12:43:04 +02:00
Józef Kucia 61044c462b libs/vkd3d: Add FIXME() for ignored max command count. 2017-08-29 10:32:24 +02:00
Henri Verbeet a624787479 libs/vkd3d: Simplify d3d12_command_list_ResolveQueryData(). 2017-08-28 20:38:17 +02:00
Henri Verbeet 040082d965 libs/vkd3d: Simplify d3d12_command_list_EndQuery(). 2017-08-28 20:38:05 +02:00
Henri Verbeet 9af2876958 libs/vkd3d: Simplify d3d12_command_list_BeginQuery(). 2017-08-28 20:37:51 +02:00