diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-02-19 16:22:23 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-02-19 16:53:53 +0300 |
commit | fefc981f4b0af86f3d9e1760d7dc1bb134e5878a (patch) | |
tree | 822083642c4b65ef7f8a3a89420d654d128cb1ad | |
parent | ade3d5d55ebd31794d90d33872d4acfc6f466efe (diff) |
vkd3d: Disable async compute queues for the time being.metro-tess-fixes
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>
-rw-r--r-- | libs/vkd3d/device.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 757d4ac8..a9c38ec7 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -1659,13 +1659,21 @@ static HRESULT vkd3d_select_queues(const struct vkd3d_instance *vkd3d_instance, return E_FAIL; } +#define VKD3D_FORCE_SINGLE_QUEUE 1 + /* Works around https://gitlab.freedesktop.org/mesa/mesa/issues/2529. + * The other viable workaround was to disable VK_EXT_descriptor_indexing for the time being, + * but that did not work out as we relied on global_bo_list to deal with games like RE2 which appear + * to potentially access descriptors which reference freed memory. This is fine in D3D12, but we need + * PARTIALLY_BOUND_BIT semantics to make that work well. + * Just disabling async compute works around the issue as well. */ + /* No compute-only queue family, reuse the direct queue family with graphics and compute. */ - if (info->family_index[VKD3D_QUEUE_FAMILY_COMPUTE] == ~0u) + if (VKD3D_FORCE_SINGLE_QUEUE || info->family_index[VKD3D_QUEUE_FAMILY_COMPUTE] == ~0u) { info->family_index[VKD3D_QUEUE_FAMILY_COMPUTE] = info->family_index[VKD3D_QUEUE_FAMILY_DIRECT]; info->vk_properties[VKD3D_QUEUE_FAMILY_COMPUTE] = info->vk_properties[VKD3D_QUEUE_FAMILY_DIRECT]; } - if (info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] == ~0u) + if (VKD3D_FORCE_SINGLE_QUEUE || info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] == ~0u) { info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] = info->family_index[VKD3D_QUEUE_FAMILY_DIRECT]; info->vk_properties[VKD3D_QUEUE_FAMILY_TRANSFER] = info->vk_properties[VKD3D_QUEUE_FAMILY_DIRECT]; @@ -1673,11 +1681,14 @@ static HRESULT vkd3d_select_queues(const struct vkd3d_instance *vkd3d_instance, /* Compact the array. */ info->vk_family_count = 1; + +#if !VKD3D_FORCE_SINGLE_QUEUE for (i = info->vk_family_count; i < ARRAY_SIZE(info->vk_queue_create_info); ++i) { if (info->vk_queue_create_info[i].queueCount) info->vk_queue_create_info[info->vk_family_count++] = info->vk_queue_create_info[i]; } +#endif return S_OK; } |