Fixes barycentric test float64 support check
authorMatthew Netsch <quic_mnetsch@quicinc.com>
Wed, 16 Nov 2022 21:01:09 +0000 (13:01 -0800)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 17 Nov 2022 22:26:07 +0000 (22:26 +0000)
Barycentric tests were not checking shaderFloat64 check

Components: Vulkan
VK-GL-CTS Issue: 4112

Affects:
dEQP-VK.fragment_shading_barycentric.*double*

Change-Id: Ie31ab9998e6bd9a8f551d4906f7cbda7417ea94b

external/vulkancts/modules/vulkan/fragment_shading_barycentric/vktFragmentShadingBarycentricTests.cpp

index 34314ae..6288816 100644 (file)
@@ -1115,6 +1115,25 @@ void FragmentShadingBarycentricTestCase::checkSupport (Context& context) const
                if (!extendedDynamicStateFeaturesEXT.extendedDynamicState)
                        TCU_THROW(NotSupportedError, "Requires VkPhysicalDeviceExtendedDynamicStateFeaturesEXT.extendedDynamicState");
        }
+
+
+       if ((m_testParams.dataType == glu::TYPE_DOUBLE) ||
+               (m_testParams.dataType == glu::TYPE_DOUBLE_VEC2) ||
+               (m_testParams.dataType == glu::TYPE_DOUBLE_VEC3) ||
+               (m_testParams.dataType == glu::TYPE_DOUBLE_VEC4))
+       {
+               VkPhysicalDeviceFeatures2 features2;
+               deMemset(&features2, 0, sizeof(features2));
+               features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
+               features2.pNext = nullptr;
+               context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features2);
+               if (features2.features.shaderFloat64 != VK_TRUE)
+               {
+                       TCU_THROW(NotSupportedError, "shaderFloat64 not supported");
+               }
+       }
+
+
 }
 
 TestInstance* FragmentShadingBarycentricTestCase::createInstance (Context& context) const