From: Piers Daniell Date: Wed, 22 Nov 2017 20:23:12 +0000 (-0700) Subject: Fix some CTS bugs that cause validation failures X-Git-Tag: upstream/1.3.5~2565^2~6^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23336be1abda90e87d9bbaf5e0398ca489f0cbc6;p=platform%2Fupstream%2FVK-GL-CTS.git Fix some CTS bugs that cause validation failures Most of these are misuse of the dstStageMask parameter to vkCmdPipelineBarrier. The dstStageMask has to be compatible with the destination access type of the buffer or image. The other large source of validation errors is a bug in the CTS framework when calling vkCreateDevice. The wrong pNext member was used for setting the enabled features. The effect is that all features were disabled. Affects: dEQP-VK.pipeline.push_constant.graphics_pipeline.* dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.pattern.* dEQP-VK.* Components: Vulkan VK-GL-CTS issue: 862 Change-Id: I58ca4e033d7d66b52c6726a635808b9b747546d8 --- diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp index 0bc6922..1ba7327 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp @@ -302,7 +302,7 @@ de::MovePtr readColorAttachment (const vk::DeviceInterface& v VK_CHECK(vk.beginCommandBuffer(*cmdBuffer, &cmdBufferBeginInfo)); vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 0, (const VkBufferMemoryBarrier*)DE_NULL, 1, &imageBarrier); vk.cmdCopyImageToBuffer(*cmdBuffer, image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *buffer, 1, ©Region); - vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 1, &bufferBarrier, 0, (const VkImageMemoryBarrier*)DE_NULL); + vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, (VkDependencyFlags)0, 0, (const VkMemoryBarrier*)DE_NULL, 1, &bufferBarrier, 0, (const VkImageMemoryBarrier*)DE_NULL); VK_CHECK(vk.endCommandBuffer(*cmdBuffer)); const VkSubmitInfo submitInfo = diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp index 64f2923..2e3b459 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp @@ -781,7 +781,7 @@ tcu::TestStatus MSInstanceBaseResolveAndPerSampleFetch::iterate (void) ); } - deviceInterface.cmdPipelineBarrier(*commandBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0u, 0u, DE_NULL, 0u, DE_NULL, + deviceInterface.cmdPipelineBarrier(*commandBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, 0u, 0u, DE_NULL, 0u, DE_NULL, static_cast(imageOutputAttachmentBarriers.size()), dataPointer(imageOutputAttachmentBarriers)); } diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp index dddf31b..50b6974 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp @@ -1116,7 +1116,7 @@ PushConstantGraphicsTestInstance::PushConstantGraphicsTestInstance (Context& VK_CHECK(vk.beginCommandBuffer(*m_cmdBuffer, &cmdBufferBeginInfo)); - vk.cmdPipelineBarrier(*m_cmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, (VkDependencyFlags)0, + vk.cmdPipelineBarrier(*m_cmdBuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, (VkDependencyFlags)0, 0u, DE_NULL, 0u, DE_NULL, 1u, &attachmentLayoutBarrier); vk.cmdBeginRenderPass(*m_cmdBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE); diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index 29940f0..3f4103f 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -244,14 +244,14 @@ Move createDefaultDevice (const InstanceInterface& vki, // VK_KHR_get_physical_device_propeties2 is used if enabledFeatures.pNext != 0 queueInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; - queueInfo.pNext = enabledFeatures.pNext ? &enabledFeatures : DE_NULL; + queueInfo.pNext = DE_NULL; queueInfo.flags = (VkDeviceQueueCreateFlags)0u; queueInfo.queueFamilyIndex = queueIndex; queueInfo.queueCount = 1u; queueInfo.pQueuePriorities = &queuePriority; deviceInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; - deviceInfo.pNext = DE_NULL; + deviceInfo.pNext = enabledFeatures.pNext ? &enabledFeatures : DE_NULL; deviceInfo.queueCreateInfoCount = 1u; deviceInfo.pQueueCreateInfos = &queueInfo; deviceInfo.enabledExtensionCount = (deUint32)extensionPtrs.size();