Fix some CTS bugs that cause validation failures
authorPiers Daniell <pdaniell@nvidia.com>
Wed, 22 Nov 2017 20:23:12 +0000 (13:23 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Jan 2018 12:32:50 +0000 (07:32 -0500)
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
(cherry picked from commit 23336be1abda90e87d9bbaf5e0398ca489f0cbc6)

external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelinePushConstantTests.cpp
external/vulkancts/modules/vulkan/vktTestCase.cpp

index 809945a..044630b 100644 (file)
@@ -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<deUint32>(imageOutputAttachmentBarriers.size()), dataPointer(imageOutputAttachmentBarriers));
        }
 
index dddf31b..50b6974 100644 (file)
@@ -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);
index a44ee43..4e6bf91 100644 (file)
@@ -179,14 +179,14 @@ Move<VkDevice> 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();