From: Alex Walters Date: Thu, 27 Apr 2017 09:24:08 +0000 (+0100) Subject: makeFramebufferWithoutAttachments creates invalid framebuffer X-Git-Tag: upstream/0.1.0~9^2~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c6859a60e7648a2dbfa192908e41f464e11ccd7;p=platform%2Fupstream%2FVK-GL-CTS.git makeFramebufferWithoutAttachments creates invalid framebuffer Current behaviour of setting width, height, and layers to zero is invalid. The validity language specifies that width, height, and layers must be > 0. The same function exists in the utils files for sparse_resources and synchronization tests, I've removed the unused copies. Affects: dEQP-VK.tessellation* Components: Vulkan VK-GL-CTS issue: 265 (cherry picked from commit bce45b549d21f068a75d005fe55bd87460b5df29) Change-Id: I7e6196944b1197ca3ce2d16ff17623e6e9bcfae7 --- diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp index ecfab5a..7e59f2b 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp @@ -441,45 +441,6 @@ Move makeRenderPass (const DeviceInterface& vk, return createRenderPass(vk, device, &renderPassInfo); } -Move makeRenderPassWithoutAttachments (const DeviceInterface& vk, - const VkDevice device) -{ - const VkAttachmentReference unusedAttachment = - { - VK_ATTACHMENT_UNUSED, // deUint32 attachment; - VK_IMAGE_LAYOUT_UNDEFINED // VkImageLayout layout; - }; - - const VkSubpassDescription subpassDescription = - { - (VkSubpassDescriptionFlags)0, // VkSubpassDescriptionFlags flags; - VK_PIPELINE_BIND_POINT_GRAPHICS, // VkPipelineBindPoint pipelineBindPoint; - 0u, // deUint32 inputAttachmentCount; - DE_NULL, // const VkAttachmentReference* pInputAttachments; - 0u, // deUint32 colorAttachmentCount; - DE_NULL, // const VkAttachmentReference* pColorAttachments; - DE_NULL, // const VkAttachmentReference* pResolveAttachments; - &unusedAttachment, // const VkAttachmentReference* pDepthStencilAttachment; - 0u, // deUint32 preserveAttachmentCount; - DE_NULL // const deUint32* pPreserveAttachments; - }; - - const VkRenderPassCreateInfo renderPassInfo = - { - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, // VkStructureType sType; - DE_NULL, // const void* pNext; - (VkRenderPassCreateFlags)0, // VkRenderPassCreateFlags flags; - 0u, // deUint32 attachmentCount; - DE_NULL, // const VkAttachmentDescription* pAttachments; - 1u, // deUint32 subpassCount; - &subpassDescription, // const VkSubpassDescription* pSubpasses; - 0u, // deUint32 dependencyCount; - DE_NULL // const VkSubpassDependency* pDependencies; - }; - - return createRenderPass(vk, device, &renderPassInfo); -} - Move makeFramebuffer (const DeviceInterface& vk, const VkDevice device, const VkRenderPass renderPass, @@ -503,25 +464,6 @@ Move makeFramebuffer (const DeviceInterface& vk, return createFramebuffer(vk, device, &framebufferInfo); } -Move makeFramebufferWithoutAttachments (const DeviceInterface& vk, - const VkDevice device, - const VkRenderPass renderPass) -{ - const VkFramebufferCreateInfo framebufferInfo = { - VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, // VkStructureType sType; - DE_NULL, // const void* pNext; - (VkFramebufferCreateFlags)0, // VkFramebufferCreateFlags flags; - renderPass, // VkRenderPass renderPass; - 0u, // uint32_t attachmentCount; - DE_NULL, // const VkImageView* pAttachments; - 0u, // uint32_t width; - 0u, // uint32_t height; - 0u, // uint32_t layers; - }; - - return createFramebuffer(vk, device, &framebufferInfo); -} - GraphicsPipelineBuilder& GraphicsPipelineBuilder::setShader (const DeviceInterface& vk, const VkDevice device, const VkShaderStageFlagBits stage, diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp index 79e352d..49feef5 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp @@ -220,9 +220,7 @@ vk::Move makePipelineLayout (const vk::DeviceInterfa vk::Move makePipelineLayoutWithoutDescriptors (const vk::DeviceInterface& vk, const vk::VkDevice device); vk::Move makeComputePipeline (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkPipelineLayout pipelineLayout, const vk::VkShaderModule shaderModule, const vk::VkSpecializationInfo* specInfo, PipelineCacheData& pipelineCacheData); vk::Move makeRenderPass (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkFormat colorFormat); -vk::Move makeRenderPassWithoutAttachments (const vk::DeviceInterface& vk, const vk::VkDevice device); vk::Move makeFramebuffer (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkRenderPass renderPass, const vk::VkImageView colorAttachment, const deUint32 width, const deUint32 height, const deUint32 layers); -vk::Move makeFramebufferWithoutAttachments (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkRenderPass renderPass); vk::Move makeImageView (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkImage image, const vk::VkImageViewType viewType, const vk::VkFormat format, const vk::VkImageSubresourceRange subresourceRange); vk::Move makeEvent (const vk::DeviceInterface& vk, const vk::VkDevice device); vk::VkBufferImageCopy makeBufferImageCopy (const vk::VkImageSubresourceLayers subresourceLayers, const vk::VkExtent3D extent); diff --git a/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp b/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp index 58f6c96..c7c8edc 100644 --- a/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp +++ b/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp @@ -482,9 +482,9 @@ Move makeFramebufferWithoutAttachments (const DeviceInterface& v renderPass, // VkRenderPass renderPass; 0u, // uint32_t attachmentCount; DE_NULL, // const VkImageView* pAttachments; - 0u, // uint32_t width; - 0u, // uint32_t height; - 0u, // uint32_t layers; + 1u, // uint32_t width; + 1u, // uint32_t height; + 1u, // uint32_t layers; }; return createFramebuffer(vk, device, &framebufferInfo);