Need Float16 in some derivative tests
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / spirv_assembly / vktSpvAsmInstructionTests.cpp
index 782acc5..bfa7d9e 100644 (file)
@@ -9402,7 +9402,7 @@ struct ConvertCase
 
                        if (instruction == "OpUConvert" || instruction == "OpSConvert" || instruction == "OpFConvert")
                        {
-                               // Conversions between 16 and 32 bit are provided by SPV_KHR_16bit_storage. The rest requires explicit Int16
+                               // Width-only conversions between 16 and 32 bit are provided by SPV_KHR_16bit_storage. The rest requires explicit Int16
                                if (usesInt32(from, to) || usesFloat32(from, to))
                                        requiresInt16Capability = false;
                        }
@@ -9420,8 +9420,8 @@ struct ConvertCase
                {
                        decl += "%f16        = OpTypeFloat 16\n";
 
-                       // Conversions between 16 and 32 bit are provided by SPV_KHR_16bit_storage. The rest requires explicit Float16
-                       if (!(usesInt32(from, to) || usesFloat32(from, to)))
+                       // Width-only conversions between 16 and 32 bit are provided by SPV_KHR_16bit_storage. The rest requires explicit Float16
+                       if (!usesFloat32(from, to))
                                caps += "OpCapability Float16\n";
                }
 
@@ -10967,7 +10967,7 @@ tcu::TestCaseGroup* createDerivativeTests (tcu::TestContext& testCtx)
                specs["type_decls"]                     = testType.typeDecls;
 
                fragments["extension"]          = "OpExtension \"SPV_KHR_16bit_storage\"";
-               fragments["capability"]         = "OpCapability DerivativeControl\nOpCapability StorageUniformBufferBlock16\n";
+               fragments["capability"]         = "OpCapability DerivativeControl\nOpCapability StorageUniformBufferBlock16\nOpCapability Float16\n";
                fragments["decoration"]         = decoration.specialize(specs);
                fragments["pre_main"]           = preMain.specialize(specs);
                fragments["testfun"]            = testFun.specialize(specs);