diff options
author | Alex Walters <alex.walters@imgtec.com> | 2017-04-27 10:24:08 +0100 |
---|---|---|
committer | Alex Walters <alex.walters@imgtec.com> | 2017-04-27 10:24:08 +0100 |
commit | 8c6859a60e7648a2dbfa192908e41f464e11ccd7 (patch) | |
tree | f1e20ab61ea4b968d651cb581c443cf51df86c9a | |
parent | 50405c2b626c597cd17ac5990c69b37d0f326de4 (diff) | |
download | deqp-8c6859a60e7648a2dbfa192908e41f464e11ccd7.tar.gz |
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
3 files changed, 3 insertions, 63 deletions
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp index ecfab5a95..7e59f2b5e 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp @@ -441,45 +441,6 @@ Move<VkRenderPass> makeRenderPass (const DeviceInterface& vk, return createRenderPass(vk, device, &renderPassInfo); } -Move<VkRenderPass> 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<VkFramebuffer> makeFramebuffer (const DeviceInterface& vk, const VkDevice device, const VkRenderPass renderPass, @@ -503,25 +464,6 @@ Move<VkFramebuffer> makeFramebuffer (const DeviceInterface& vk, return createFramebuffer(vk, device, &framebufferInfo); } -Move<VkFramebuffer> 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 79e352d37..49feef58a 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.hpp @@ -220,9 +220,7 @@ vk::Move<vk::VkPipelineLayout> makePipelineLayout (const vk::DeviceInterfa vk::Move<vk::VkPipelineLayout> makePipelineLayoutWithoutDescriptors (const vk::DeviceInterface& vk, const vk::VkDevice device); vk::Move<vk::VkPipeline> 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<vk::VkRenderPass> makeRenderPass (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkFormat colorFormat); -vk::Move<vk::VkRenderPass> makeRenderPassWithoutAttachments (const vk::DeviceInterface& vk, const vk::VkDevice device); vk::Move<vk::VkFramebuffer> 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<vk::VkFramebuffer> makeFramebufferWithoutAttachments (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkRenderPass renderPass); vk::Move<vk::VkImageView> 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<vk::VkEvent> 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 58f6c96b4..c7c8edc92 100644 --- a/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp +++ b/external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp @@ -482,9 +482,9 @@ Move<VkFramebuffer> 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); |