Check support for sampleRateShading
authorVihanakangas <venni.ihanakangas@siru.fi>
Wed, 19 Aug 2020 11:54:58 +0000 (14:54 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 10 Sep 2020 07:36:46 +0000 (03:36 -0400)
Some multisample tests attempted to use sampleRateShading without
checking for support.

Affects:

dEQP-VK.pipeline.multisample.mixed_count.*
dEQP-VK.pipeline.multisample.variable_rate.*
dEQP-VK.pipeline.multisample_shader_builtin.write_sample_mask.*

Components: Vulkan

VK-GL-CTS issue: 2532

Change-Id: Ieaeddc51183b005a78fd3cc847b767a8a5683b44

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

index a8828c43e7c7730926546e5278fbde08d57810d3..7f4728835026d2657caa7326a1b696e55f829359 100644 (file)
@@ -1543,6 +1543,10 @@ void WriteSampleMaskTestCase::checkSupport (Context& context) const
        const auto&     vki                             = context.getInstanceInterface();
        const auto      physicalDevice  = context.getPhysicalDevice();
 
+       // Check if sampleRateShading is supported.
+       if(!vk::getPhysicalDeviceFeatures(vki, physicalDevice).sampleRateShading)
+               TCU_THROW(NotSupportedError, "Sample rate shading is not supported");
+
        // Check the specific image format.
        const auto properties = vk::getPhysicalDeviceFormatProperties(vki, physicalDevice, kImageFormat);
        if (!(properties.optimalTilingFeatures & kFeatureFlags))
index b18e14d1e766b0eab45a96e18342093a21109a5f..a1500a0bc12b5beae17fbd94cb2ec0848758f623 100644 (file)
@@ -3676,6 +3676,10 @@ void VariableRateTestCase::checkSupport (Context& context) const
                        TCU_THROW(NotSupportedError, "Variable multisample rate not supported");
        }
 
+       // Check if sampleRateShading is supported.
+       if(!vk::getPhysicalDeviceFeatures(vki, physicalDevice).sampleRateShading)
+               TCU_THROW(NotSupportedError, "Sample rate shading is not supported");
+
        // Make sure all subpass sample counts are supported.
        const auto      properties              = vk::getPhysicalDeviceProperties(vki, physicalDevice);
        const auto&     supportedCounts = properties.limits.framebufferNoAttachmentsSampleCounts;