Shader runner changes to fix validation
authorGraeme Leese <gleese@broadcom.com>
Tue, 9 Oct 2018 14:59:44 +0000 (15:59 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 17 Oct 2018 09:12:20 +0000 (05:12 -0400)
Fix one pipeline barrier and stop allocating unneeded fragment outputs.
Tests with multiple outputs were allocating one color target for each,
but self-checking tests combine their results down to a single yes/no
color write. For these tests, only allocate one output target.

Components: Vulkan
Affects: dEQP-VK.glsl.*

Change-Id: Icb97091e9de7e58e3751f0a5c4f9a19a6894f085

external/vulkancts/modules/vulkan/vktDrawUtil.cpp
external/vulkancts/modules/vulkan/vktShaderLibrary.cpp

index 1ff5a57..752f4f1 100644 (file)
@@ -736,7 +736,7 @@ VulkanDrawContext::VulkanDrawContext ( Context&                             context,
                                        VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
                                        **m_resolveImage, colorSubresourceRange);
 
-                               vk.cmdPipelineBarrier(*m_cmdBuffer, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0,
+                               vk.cmdPipelineBarrier(*m_cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, (VkDependencyFlags)0,
                                        0u, DE_NULL, 0u, DE_NULL, 1u, &barrier);
                        }
                        else
index 1df4da9..1cc85d2 100644 (file)
@@ -1314,7 +1314,7 @@ ShaderCaseInstance::ShaderCaseInstance (Context& context, const ShaderCaseSpecif
        , m_uniformMem                  (m_uniformLayout.size > 0 ? allocateAndBindMemory(context, *m_uniformBuffer, vk::MemoryRequirement::HostVisible) : MovePtr<vk::Allocation>())
 
        , m_rtFormat                    (getRenderTargetFormat(spec.outputFormat))
-       , m_outputCount                 ((deUint32)m_spec.values.outputs.size() == 0 ? 1 : (deUint32)m_spec.values.outputs.size())
+       , m_outputCount                 (((deUint32)m_spec.values.outputs.size() == 0 || m_spec.outputType == glu::sl::OUTPUT_RESULT) ? 1 : (deUint32)m_spec.values.outputs.size())
        , m_rtImage                             ()
        , m_rtMem                               ()
        , m_rtView                              ()