Fixes advanced blending tests support check
authorMatthew Netsch <quic_mnetsch@quicinc.com>
Mon, 15 Jun 2020 22:04:42 +0000 (18:04 -0400)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Mon, 15 Jun 2020 22:04:42 +0000 (18:04 -0400)
Tests were only running with
advancedBlendAllOperations supported

Components: Vulkan
VK-GL-CTS Issue: 2406

Affects:
dEQP-VK.pipeline.blend_operation_advanced.*

Change-Id: I387f1fd724bb14f6a34e784e663680abc178d5bb

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

index 560c1e9..f3e0ceb 100644 (file)
@@ -1660,7 +1660,30 @@ void BlendOperationAdvancedTest::checkSupport(Context& context) const
 
        if (!blendProperties.advancedBlendAllOperations)
        {
-               throw tcu::NotSupportedError("Unsupported all advanced blend operations");
+               for (deUint32 index = 0u; index < m_param.blendOps.size(); index++)
+               {
+                       switch (m_param.blendOps[index])
+                       {
+                       case VK_BLEND_OP_MULTIPLY_EXT:
+                       case VK_BLEND_OP_SCREEN_EXT:
+                       case VK_BLEND_OP_OVERLAY_EXT:
+                       case VK_BLEND_OP_DARKEN_EXT:
+                       case VK_BLEND_OP_LIGHTEN_EXT:
+                       case VK_BLEND_OP_COLORDODGE_EXT:
+                       case VK_BLEND_OP_COLORBURN_EXT:
+                       case VK_BLEND_OP_HARDLIGHT_EXT:
+                       case VK_BLEND_OP_SOFTLIGHT_EXT:
+                       case VK_BLEND_OP_DIFFERENCE_EXT:
+                       case VK_BLEND_OP_EXCLUSION_EXT:
+                       case VK_BLEND_OP_HSL_HUE_EXT:
+                       case VK_BLEND_OP_HSL_SATURATION_EXT:
+                       case VK_BLEND_OP_HSL_COLOR_EXT:
+                       case VK_BLEND_OP_HSL_LUMINOSITY_EXT:
+                               break;
+                       default:
+                               throw tcu::NotSupportedError("Unsupported all advanced blend operations and unsupported advanced blend operation");
+                       }
+               }
        }
 
        if (m_param.colorAttachmentsCount > blendProperties.advancedBlendMaxColorAttachments)