From 2d954d84affc8635f2a5fc4e7174f8092a466ccf Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 26 May 2022 10:17:23 -0700 Subject: [PATCH] c/render: Fix invalid synchronization when uploading images; `queue_upload_for_first_level_and_layer` uploads pixels to an image. It performs a layout transition, does the copy, and does another layout transition. There is an execution dependency between the the copy and the second layout transition, but the memory dependency was missing. Caught/tested via enabling synchronization validation. --- src/xrt/compositor/render/render_resources.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/compositor/render/render_resources.c b/src/xrt/compositor/render/render_resources.c index 58974f2df..1ddd6473c 100644 --- a/src/xrt/compositor/render/render_resources.c +++ b/src/xrt/compositor/render/render_resources.c @@ -377,7 +377,7 @@ queue_upload_for_first_level_and_layer( vk, // cmd, // dst, // - 0, // + VK_ACCESS_TRANSFER_WRITE_BIT, // VK_ACCESS_SHADER_READ_BIT, // VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, // VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, //