Add create functions for common Vulkan types.
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / tessellation / vktTessellationCommonEdgeTests.cpp
index a2bfc8f..b495048 100644 (file)
@@ -365,7 +365,7 @@ tcu::TestStatus test (Context& context, const CaseDefinition caseDef)
        const Unique<VkRenderPass>         renderPass                   (makeRenderPass                                          (vk, device, colorFormat));
        const Unique<VkFramebuffer>        framebuffer                  (makeFramebuffer                                         (vk, device, *renderPass, *colorAttachmentView, renderSize.x(), renderSize.y(), 1u));
        const Unique<VkCommandPool>        cmdPool                              (makeCommandPool                                         (vk, device, queueFamilyIndex));
-       const Unique<VkCommandBuffer>  cmdBuffer                        (makeCommandBuffer                                       (vk, device, *cmdPool));
+       const Unique<VkCommandBuffer>  cmdBuffer                        (allocateCommandBuffer                           (vk, device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY));
        const Unique<VkPipelineLayout> pipelineLayout           (makePipelineLayoutWithoutDescriptors(vk, device));
 
        const int inPatchSize = (caseDef.primitiveType == TESSPRIMITIVETYPE_TRIANGLES ? 3 : 4);
@@ -431,7 +431,7 @@ tcu::TestStatus test (Context& context, const CaseDefinition caseDef)
                        0u, DE_NULL, 0u, DE_NULL, 1u, &colorAttachmentPreCopyBarrier);
        }
        {
-               const VkBufferImageCopy copyRegion = makeBufferImageCopy(makeExtent3D(renderSize.x(), renderSize.y(), 0), makeImageSubresourceLayers(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 0u, 1u));
+               const VkBufferImageCopy copyRegion = makeBufferImageCopy(makeExtent3D(renderSize.x(), renderSize.y(), 1), makeImageSubresourceLayers(VK_IMAGE_ASPECT_COLOR_BIT, 0u, 0u, 1u));
                vk.cmdCopyImageToBuffer(*cmdBuffer, *colorAttachmentImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *colorBuffer, 1u, &copyRegion);
        }
        {