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:
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user