Add corner case values for float32 to int16 conversion tests.
authorAri Suonpaa <ari.suonpaa@siru.fi>
Mon, 8 Oct 2018 10:05:16 +0000 (13:05 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Oct 2018 09:30:07 +0000 (05:30 -0400)
Issues with conversion of 32bit float to 16bit int was
reported for values over 2048. Added values 3001 and -3001
to cover this.

New tests:

dEQP-VK.spirv_assembly.instruction.*.convertftos.float32_to_int16_*

Components: Vulkan

VK-GL-CTS issue: 1398
Change-Id: Id70be1763fb6a34c9de59387074e9da3ddeffecf

android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
external/vulkancts/mustpass/1.1.3/vk-default-no-waivers.txt
external/vulkancts/mustpass/1.1.3/vk-default.txt

index a010679ffac5bd21c599037995dfb1b0292e115e..ee862133b7c678b889b2e4e77e7e07a2de3ea5e7 100755 (executable)
@@ -219148,6 +219148,8 @@ dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float32
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_1
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_2
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int32
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float64_to_int16
@@ -224831,6 +224833,16 @@ dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tesse
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_geom
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_frag
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_vert
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tesse
index 7dea35abc36c5e9f4f41bcf1bcbf51e13305bea5..62480d87931409b17a18e584de317d2f695b6169 100644 (file)
@@ -8483,9 +8483,9 @@ const string getTypeName (ConversionDataType type)
        return "";
 }
 
-const string getTestName (ConversionDataType from, ConversionDataType to)
+const string getTestName (ConversionDataType from, ConversionDataType to, deUint32 caseNumber)
 {
-       return getTypeName(from) + "_to_" + getTypeName(to);
+       return getTypeName(from) + "_to_" + getTypeName(to) + (caseNumber != 0 ? (string("_") + de::toString(caseNumber)) : string(""));
 }
 
 const string getAsmTypeName (ConversionDataType type)
@@ -8599,11 +8599,11 @@ vector<string> getFeatureStringVector (ComputeTestFeatures computeTestFeatures)
 
 struct ConvertCase
 {
-       ConvertCase (ConversionDataType from, ConversionDataType to, deInt64 number, bool separateOutput = false, deInt64 outputNumber = 0)
+       ConvertCase (ConversionDataType from, ConversionDataType to, deInt64 number, bool separateOutput = false, deInt64 outputNumber = 0, deUint32 caseNumber = 0)
        : m_fromType            (from)
        , m_toType                      (to)
        , m_features            (getConversionUsedFeatures(from, to))
-       , m_name                        (getTestName(from, to))
+       , m_name                        (getTestName(from, to, caseNumber))
        , m_inputBuffer         (getBuffer(from, number))
        {
                m_asmTypes["inputType"]         = getAsmTypeName(from);
@@ -8826,6 +8826,8 @@ void createConvertCases (vector<ConvertCase>& testCases, const string& instructi
        else if (instruction == "OpConvertFToS")
        {
                testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_32,                     DATA_TYPE_SIGNED_16,            0xc49a4000,                                                     true,   -1234));
+               testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_32,                     DATA_TYPE_SIGNED_16,            0x453b9000,                                                     true,    3001, 1));
+               testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_32,                     DATA_TYPE_SIGNED_16,            0xc53b9000,                                                     true,   -3001, 2));
                testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_32,                     DATA_TYPE_SIGNED_32,            0xc49a4000,                                                     true,   -1234));
                testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_32,                     DATA_TYPE_SIGNED_64,            0xc49a4000,                                                     true,   -1234));
                testCases.push_back(ConvertCase(DATA_TYPE_FLOAT_64,                     DATA_TYPE_SIGNED_16,            0xc093480000000000,                                     true,   -1234));
index f79750633ab9a3c00a8391448de5d9206031e14a..f2239c09810208f59fa30e7f5a73be8709571be0 100644 (file)
@@ -219153,6 +219153,8 @@ dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float32
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_1
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_2
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int32
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float64_to_int16
@@ -224812,6 +224814,16 @@ dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tesse
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_geom
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_frag
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_vert
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tesse
index a48296407fa379d9dc20e0d9950c3a4e45804d0d..c1d532bdb2ea96ace9470dca5782d0a3b48a0bc4 100644 (file)
@@ -219153,6 +219153,8 @@ dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float32
 dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_1
+dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int16_2
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int32
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float32_to_int64
 dEQP-VK.spirv_assembly.instruction.compute.convertftos.float64_to_int16
@@ -224812,6 +224814,16 @@ dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_tesse
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_geom
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_1_frag
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_vert
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tessc
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_tesse
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_geom
+dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int16_2_frag
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_vert
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tessc
 dEQP-VK.spirv_assembly.instruction.graphics.convertftos.float32_to_int32_tesse