Fix more sampleShading issues in dEQP-VK.pipeline.multisample_shader_builtin.*
authorChris Forbes <chrisforbes@google.com>
Mon, 3 Jun 2019 17:45:28 +0000 (10:45 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 6 Jun 2019 07:27:25 +0000 (03:27 -0400)
The `pattern` case here does not require per-sample shading, and the
request for the feature is easily disabled. The `write` case could
potentially also run without per-sample shading, but is plumbed
differently, so I have not adjusted it to run per-pixel.

All remaining cases which used per-sample shading have been
adjusted to check for the sampleShading feature efore running.

VK-GL-CTS Issue: 1807
Affects: dEQP-VK.pipeline.multisample_shader_builtin.sample_mask.*
Components: Vulkan

Change-Id: Iab86205fa89ace6f55ad00ba3fc51e2745a28744

external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp

index 18a12ee..c2d8e31 100644 (file)
@@ -620,7 +620,7 @@ VkPipelineMultisampleStateCreateInfo MSInstanceSampleMaskPattern::getMSStateCrea
                DE_NULL,                                                                                                                // const void*                                                          pNext;
                (VkPipelineMultisampleStateCreateFlags)0u,                                              // VkPipelineMultisampleStateCreateFlags        flags;
                imageMSParams.numSamples,                                                                               // VkSampleCountFlagBits                                        rasterizationSamples;
-               VK_TRUE,                                                                                                                // VkBool32                                                                     sampleShadingEnable;
+               VK_FALSE,                                                                                                               // VkBool32                                                                     sampleShadingEnable;
                1.0f,                                                                                                                   // float                                                                        minSampleShading;
                &m_sampleMask,                                                                                                  // const VkSampleMask*                                          pSampleMask;
                VK_FALSE,                                                                                                               // VkBool32                                                                     alphaToCoverageEnable;
@@ -791,6 +791,12 @@ template<> tcu::TestStatus MSInstance<MSInstanceSampleMaskBitCount>::verifyImage
 
 class MSCaseSampleMaskBitCount;
 
+template<> void MSCase<MSCaseSampleMaskBitCount>::checkSupport (Context& context) const
+{
+       if (!context.getDeviceFeatures().sampleRateShading)
+               TCU_THROW(NotSupportedError, "sampleRateShading not supported");
+}
+
 template<> void MSCase<MSCaseSampleMaskBitCount>::init (void)
 {
        m_testCtx.getLog()
@@ -880,6 +886,12 @@ template<> tcu::TestStatus MSInstance<MSInstanceSampleMaskCorrectBit>::verifyIma
 
 class MSCaseSampleMaskCorrectBit;
 
+template<> void MSCase<MSCaseSampleMaskCorrectBit>::checkSupport (Context& context) const
+{
+       if (!context.getDeviceFeatures().sampleRateShading)
+               TCU_THROW(NotSupportedError, "sampleRateShading not supported");
+}
+
 template<> void MSCase<MSCaseSampleMaskCorrectBit>::init (void)
 {
        m_testCtx.getLog()
@@ -982,6 +994,12 @@ template<> tcu::TestStatus MSInstance<MSInstanceSampleMaskWrite>::verifyImageDat
 
 class MSCaseSampleMaskWrite;
 
+template<> void MSCase<MSCaseSampleMaskWrite>::checkSupport (Context& context) const
+{
+       if (!context.getDeviceFeatures().sampleRateShading)
+               TCU_THROW(NotSupportedError, "sampleRateShading not supported");
+}
+
 template<> void MSCase<MSCaseSampleMaskWrite>::init (void)
 {
        m_testCtx.getLog()