vulkan/renderpass: Use GENERAL for initial layout

UNDEFINED initial layouts may not preserve the contents
of the attachment after transitioning the layout. We want
them to be preserved because we do partial rendering.

Use GENERAL as the initial layout for render passes.
This commit is contained in:
Georges Basile Stavracas Neto 2019-10-04 17:55:25 -03:00
parent 0b2006b74f
commit a2b49322fb

View File

@ -172,7 +172,7 @@ gsk_vulkan_render_pass_new (GdkVulkanContext *context,
.samples = VK_SAMPLE_COUNT_1_BIT, .samples = VK_SAMPLE_COUNT_1_BIT,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR, .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_STORE, .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, .initialLayout = VK_IMAGE_LAYOUT_GENERAL,
.finalLayout = final_layout .finalLayout = final_layout
} }
}, },