Fix errors in SPIR-V 16bit_storage tests
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 22 Jun 2018 06:30:28 +0000 (08:30 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 22 Jun 2018 07:33:00 +0000 (09:33 +0200)
Commit 04ba8ac400a3 was wrongly setting a condition that made
all the *16_to_16* tests to fail. Also, in the last rebase of CL#2458,
there were a rename of an argument of OpFunction that was not updated.

Affects: dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.*

Components: Vulkan
VK-GL-CTS issue: 1234

Change-Id: Ia83bedefa33d3e37b62336ebadb2bc992e0ddb2a

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm16bitStorageTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp

index 5c50c48..5367b67 100644 (file)
@@ -6659,7 +6659,7 @@ void addGraphics16BitStorageUniformFloat16To64Group (tcu::TestCaseGroup* testGro
 
                // ssbo64[] <- convert ssbo16[] to 64bit float
                const StringTemplate testFun            (
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
@@ -6769,7 +6769,7 @@ void addGraphics16BitStorageUniformFloat16To64Group (tcu::TestCaseGroup* testGro
 
                // ssbo64[] <- convert ssbo16[] to 64bit float
                const StringTemplate testFun            (
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
@@ -6883,7 +6883,7 @@ void addGraphics16BitStorageUniformFloat16To64Group (tcu::TestCaseGroup* testGro
                        "OpDecorate %ssbo16 Binding 0\n");
 
                fragments["testfun"]                            =
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
@@ -6998,7 +6998,7 @@ void addGraphics16BitStoragePushConstantFloat16To64Group (tcu::TestCaseGroup* te
        getDefaultColors(defaultColors);
 
        const StringTemplate    testFun         (
-               "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+               "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                "    %param = OpFunctionParameter %v4f32\n"
 
                "%entry = OpLabel\n"
@@ -7421,7 +7421,7 @@ void addGraphics16BitStorageUniformFloat64To16Group (tcu::TestCaseGroup* testGro
                        "${rounddecor}\n");
 
                fragments["testfun"]                            =
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
@@ -7517,7 +7517,7 @@ void addGraphics16BitStorageUniformFloat64To16Group (tcu::TestCaseGroup* testGro
 
                // ssbo16[] <- convert ssbo64[] to 16bit float
                fragments["testfun"]                            =
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
@@ -7618,7 +7618,7 @@ void addGraphics16BitStorageUniformFloat64To16Group (tcu::TestCaseGroup* testGro
                        "${rounddecor}\n");
 
                fragments["testfun"]                            =
-                       "%test_code = OpFunction %v4f32 None %v4f32_function\n"
+                       "%test_code = OpFunction %v4f32 None %v4f32_v4f32_function\n"
                        "    %param = OpFunctionParameter %v4f32\n"
 
                        "%entry = OpLabel\n"
index ec0731e..ce8de1d 100644 (file)
@@ -3915,7 +3915,7 @@ TestStatus runAndVerifyDefaultPipeline (Context& context, InstanceContext instan
                                        if (!compare16BitFloat64(original[eleNdx], actual[eleNdx], instance.interfaces.getRoundingMode(), context.getTestContext().getLog()))
                                                equal = false;
                        }
-                       else if (outputType.elementType == NUMBERTYPE_FLOAT16 && inputType.elementType == NUMBERTYPE_FLOAT32)
+                       else if (outputType.elementType == NUMBERTYPE_FLOAT16 && inputType.elementType != NUMBERTYPE_FLOAT64)
                        {
                                if (inputType.elementType == NUMBERTYPE_FLOAT16)
                                {