dzn: Flip on enhanced barrier code paths based on D3D capability

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
This commit is contained in:
Jesse Natalie
2022-12-14 12:48:39 -08:00
committed by Marge Bot
parent dc9a3ed4d5
commit a0b9e5a93e
2 changed files with 7 additions and 0 deletions

View File

@@ -652,6 +652,8 @@ dzn_cmd_buffer_create(const VkCommandBufferAllocateInfo *info,
cmdbuf->type = type;
cmdbuf->valid_sync = cmd_buffer_valid_sync[type];
cmdbuf->valid_access = cmd_buffer_valid_access[type];
cmdbuf->enhanced_barriers = pdev->options12.EnhancedBarriersSupported;
out:
if (result != VK_SUCCESS)
dzn_cmd_buffer_destroy(&cmdbuf->vk);

View File

@@ -2178,6 +2178,11 @@ dzn_device_create(struct dzn_physical_device *pdev,
&vk_common_device_entrypoints,
false);
/* Override entrypoints with alternatives based on supported features. */
if (pdev->options12.EnhancedBarriersSupported) {
device->cmd_dispatch.CmdPipelineBarrier2 = dzn_CmdPipelineBarrier2_enhanced;
}
VkResult result =
vk_device_init(&device->vk, &pdev->vk, &dispatch_table, pCreateInfo, pAllocator);
if (result != VK_SUCCESS) {