Skip to content

Commit 11ad78b

Browse files
vkd3d: Add config option for async presentation.
Signed-off-by: Hans-Kristian Arntzen <[email protected]>
1 parent 890c942 commit 11ad78b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

include/vkd3d.h

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ extern "C" {
106106
#define VKD3D_CONFIG_FLAG_DRIVER_VERSION_SENSITIVE_SHADERS (1ull << 48)
107107
#define VKD3D_CONFIG_FLAG_SMALL_VRAM_REBAR (1ull << 49)
108108
#define VKD3D_CONFIG_FLAG_STAGGERED_SUBMIT (1ull << 50)
109+
#define VKD3D_CONFIG_FLAG_ASYNC_PRESENT (1ull << 51)
109110

110111
struct vkd3d_instance;
111112

libs/vkd3d/device.c

+1
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ static const struct vkd3d_debug_option vkd3d_config_options[] =
940940
{"app_debug_marker_only", VKD3D_CONFIG_FLAG_APP_DEBUG_MARKER_ONLY},
941941
{"small_vram_rebar", VKD3D_CONFIG_FLAG_SMALL_VRAM_REBAR},
942942
{"staggered_submit", VKD3D_CONFIG_FLAG_STAGGERED_SUBMIT},
943+
{"async_present", VKD3D_CONFIG_FLAG_ASYNC_PRESENT},
943944
};
944945

945946
static void vkd3d_config_flags_init_once(void)

libs/vkd3d/swapchain.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,8 @@ static HRESULT dxgi_vk_swap_chain_create_surface(struct dxgi_vk_swap_chain *chai
13491349
* Only attempt this if the application is asking for an "unusual" priority, since this
13501350
* implies some out of order shenanigans. */
13511351
family_info = chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_COMPUTE];
1352-
if (chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_GRAPHICS]->queue_count == 1 &&
1352+
if ((vkd3d_config_flags & VKD3D_CONFIG_FLAG_ASYNC_PRESENT) &&
1353+
chain->queue->device->queue_families[VKD3D_QUEUE_FAMILY_GRAPHICS]->queue_count == 1 &&
13531354
family_info->vk_family_index != chain->queue->vkd3d_queue->vk_family_index &&
13541355
VK_CALL(vkGetPhysicalDeviceSurfaceSupportKHR(vk_physical_device,
13551356
family_info->vk_family_index, chain->vk_surface, &supported)) == VK_SUCCESS && supported)

0 commit comments

Comments
 (0)