Fix compilation issue in float_controls
authorPiotr Byszewski <piotr.byszewski@mobica.com>
Wed, 30 Jun 2021 12:03:40 +0000 (14:03 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 1 Jul 2021 07:19:13 +0000 (07:19 +0000)
Two assertions in float_controls tests used conditions of type:
(x!=a || x!=b) which are always true and started triger compilation
errors on some platforms.

Components: Vulkan

Affects:
dEQP-VK.spirv_assembly.instruction.compute.float_controls.*
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.*

Change-Id: I2df613acaf2cc089df29cdc8172d50f3174c6456

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp

index d20e58f..c5aeaa3 100644 (file)
@@ -3654,11 +3654,11 @@ void ComputeTestGroupBuilder::fillShaderSpec(const SettingsTestCaseInfo&        testCas
        if (testCaseInfo.testedMode == SM_ROUNDING)
        {
                // make sure that only rounding options are used
-               DE_ASSERT((testCaseInfo.fp16Option != SO_FLUSH) ||
-                                 (testCaseInfo.fp16Option != SO_PRESERVE) ||
-                                 (testCaseInfo.fp32Option != SO_FLUSH) ||
-                                 (testCaseInfo.fp32Option != SO_PRESERVE) ||
-                                 (testCaseInfo.fp64Option != SO_FLUSH) ||
+               DE_ASSERT((testCaseInfo.fp16Option != SO_FLUSH) &&
+                                 (testCaseInfo.fp16Option != SO_PRESERVE) &&
+                                 (testCaseInfo.fp32Option != SO_FLUSH) &&
+                                 (testCaseInfo.fp32Option != SO_PRESERVE) &&
+                                 (testCaseInfo.fp64Option != SO_FLUSH) &&
                                  (testCaseInfo.fp64Option != SO_PRESERVE));
 
                bool fp16RteRounding    = testCaseInfo.fp16Option == SO_RTE;
@@ -3693,11 +3693,11 @@ void ComputeTestGroupBuilder::fillShaderSpec(const SettingsTestCaseInfo&        testCas
        else // SM_DENORMS
        {
                // make sure that only denorm options are used
-               DE_ASSERT((testCaseInfo.fp16Option != SO_RTE) ||
-                                 (testCaseInfo.fp16Option != SO_RTZ) ||
-                                 (testCaseInfo.fp32Option != SO_RTE) ||
-                                 (testCaseInfo.fp32Option != SO_RTZ) ||
-                                 (testCaseInfo.fp64Option != SO_RTE) ||
+               DE_ASSERT((testCaseInfo.fp16Option != SO_RTE) &&
+                                 (testCaseInfo.fp16Option != SO_RTZ) &&
+                                 (testCaseInfo.fp32Option != SO_RTE) &&
+                                 (testCaseInfo.fp32Option != SO_RTZ) &&
+                                 (testCaseInfo.fp64Option != SO_RTE) &&
                                  (testCaseInfo.fp64Option != SO_RTZ));
 
                bool fp16DenormPreserve         = testCaseInfo.fp16Option == SO_PRESERVE;