From e88bc84edea639d028cfd8f37abd6875016fa70c Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Tue, 11 Sep 2018 16:23:14 -0600 Subject: cube: Fix new validation error As of Vulkan-ValidationLayers commit 2872f4a, the layers now check that image layouts specified in descriptors match the current image layout state. LAYOUT_GENERAL is not a wildcard for this matching. Change the image layouts for the combined image sampler descriptors from LAYOUT_GENERAL to LAYOUT_SHADER_READ_ONLY_OPTIMAL. --- cube/cube.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cube/cube.cpp') diff --git a/cube/cube.cpp b/cube/cube.cpp index 65cce400..6ff11900 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -1825,7 +1825,7 @@ void Demo::prepare_descriptor_set() { for (uint32_t i = 0; i < texture_count; i++) { tex_descs[i].setSampler(textures[i].sampler); tex_descs[i].setImageView(textures[i].view); - tex_descs[i].setImageLayout(vk::ImageLayout::eGeneral); + tex_descs[i].setImageLayout(vk::ImageLayout::eShaderReadOnlyOptimal); } vk::WriteDescriptorSet writes[2]; -- cgit v1.2.3