From ca4bd9ce0bb04dad0d6fd005a02520e19cfc8ff3 Mon Sep 17 00:00:00 2001 From: Vihanakangas Date: Wed, 19 Aug 2020 14:54:58 +0300 Subject: [PATCH] Check support for sampleRateShading 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 --- .../pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp | 4 ++++ .../modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp index a8828c43e..7f4728835 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp @@ -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)) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp index b18e14d1e..a1500a0bc 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp @@ -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; -- 2.34.1