diff --git a/include/vkd3d.h b/include/vkd3d.h index d57233e59f..8e93c36f06 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -106,6 +106,7 @@ extern "C" { #define VKD3D_CONFIG_FLAG_DRIVER_VERSION_SENSITIVE_SHADERS (1ull << 48) #define VKD3D_CONFIG_FLAG_SMALL_VRAM_REBAR (1ull << 49) #define VKD3D_CONFIG_FLAG_STAGGERED_SUBMIT (1ull << 50) +#define VKD3D_CONFIG_FLAG_ASYNC_PRESENT (1ull << 51) struct vkd3d_instance; diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index b137cde576..a530692d75 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -940,6 +940,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] = {"app_debug_marker_only", VKD3D_CONFIG_FLAG_APP_DEBUG_MARKER_ONLY}, {"small_vram_rebar", VKD3D_CONFIG_FLAG_SMALL_VRAM_REBAR}, {"staggered_submit", VKD3D_CONFIG_FLAG_STAGGERED_SUBMIT}, + {"async_present", VKD3D_CONFIG_FLAG_ASYNC_PRESENT}, }; static void vkd3d_config_flags_init_once(void) diff --git a/libs/vkd3d/swapchain.c b/libs/vkd3d/swapchain.c index 62513377fe..77f4106101 100644 --- a/libs/vkd3d/swapchain.c +++ b/libs/vkd3d/swapchain.c @@ -1349,7 +1349,8 @@ static HRESULT dxgi_vk_swap_chain_create_surface(struct dxgi_vk_swap_chain *chai * Only attempt this if the application is asking for an "unusual" priority, since this * implies some out of order shenanigans. */ family_info = chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_COMPUTE]; - if (chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_GRAPHICS]->queue_count == 1 && + if ((vkd3d_config_flags & VKD3D_CONFIG_FLAG_ASYNC_PRESENT) && + chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_GRAPHICS]->queue_count == 1 && family_info->vk_family_index != chain->queue->vkd3d_queue->vk_family_index && VK_CALL(vkGetPhysicalDeviceSurfaceSupportKHR(vk_physical_device, family_info->vk_family_index, chain->vk_surface, &supported)) == VK_SUCCESS && supported)