From: David Neto Date: Fri, 12 Jul 2019 20:20:13 +0000 (-0400) Subject: Need Float16 capability for float16 tests X-Git-Tag: upstream/1.3.5~1527^2~102^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d36177fd9d49550f42a740792fde0b0ec8f2c62;p=platform%2Fupstream%2FVK-GL-CTS.git Need Float16 capability for float16 tests Fixes validation of 2537 tests. Components: Vulkan Affects: dEQP-VK.spirv_assembly.instruction.compute.float16.* dEQP-VK.spirv_assembly.instruction.graphics.float16.* VK-GL-CTS issue: 1874 Change-Id: I68bf7951939b5ff8382ab40e9adcaa8e1ee61c4d (cherry picked from commit 633e2c204c70c185ab48a93e35a876beab88de1f) --- diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp index 03eae47..2adf839 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp @@ -3110,6 +3110,7 @@ void createOpPhiVartypeTests (de::MovePtr& group, tcu::TestC specFloat16.assembly = "OpCapability Shader\n" "OpCapability StorageUniformBufferBlock16\n" + "OpCapability Float16\n" "OpExtension \"SPV_KHR_16bit_storage\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint GLCompute %main \"main\" %id\n" @@ -7569,7 +7570,7 @@ tcu::TestCaseGroup* createOpPhiTests(tcu::TestContext& testCtx) fragments4["pre_main"] = typesAndConstants4; fragments4["testfun"] = function4; - fragments4["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments4["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments4["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; extensions4.push_back("VK_KHR_16bit_storage"); @@ -10130,7 +10131,7 @@ tcu::TestCaseGroup* createFloat16LogicalSet (tcu::TestContext& testCtx, const bo de::MovePtr testGroup (new tcu::TestCaseGroup(testCtx, groupName.c_str(), "Float 16 logical tests")); de::Random rnd (deStringHash(testGroup->getName())); - const string spvCapabilities = string("OpCapability StorageUniformBufferBlock16\n") + (nanSupported ? "OpCapability SignedZeroInfNanPreserve\n" : ""); + const string spvCapabilities = string("OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n") + (nanSupported ? "OpCapability SignedZeroInfNanPreserve\n" : ""); const string spvExtensions = string("OpExtension \"SPV_KHR_16bit_storage\"\n") + (nanSupported ? "OpExtension \"SPV_KHR_float_controls\"\n" : ""); const string spvExecutionMode = nanSupported ? "OpExecutionMode %BP_main SignedZeroInfNanPreserve 16\n" : ""; const deUint32 numDataPoints = 16; @@ -10451,7 +10452,7 @@ tcu::TestCaseGroup* createFloat16FuncSet (tcu::TestContext& testCtx) de::MovePtr testGroup (new tcu::TestCaseGroup(testCtx, "function", "Float 16 function call related tests")); de::Random rnd (deStringHash(testGroup->getName())); - const StringTemplate capabilities ("OpCapability ${cap}\n"); + const StringTemplate capabilities ("OpCapability ${cap}\nOpCapability Float16\n"); const deUint32 numDataPoints = 256; const vector float16InputData = getFloat16s(rnd, numDataPoints); const vector float16OutputDummy (float16InputData.size(), 0); @@ -11195,7 +11196,7 @@ tcu::TestCaseGroup* createFloat16VectorExtractSet (tcu::TestContext& testCtx) specs["type_decl"] = testType.typeDecls; fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; - fragments["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs); @@ -11433,7 +11434,7 @@ tcu::TestCaseGroup* createFloat16VectorInsertSet (tcu::TestContext& testCtx) specs["replacement"] = de::toString(replacement); fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; - fragments["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs); @@ -11804,7 +11805,7 @@ tcu::TestCaseGroup* createFloat16VectorShuffleSet (tcu::TestContext& testCtx) specs["case_count"] = de::toString(caseCount); fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; - fragments["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs); @@ -12064,7 +12065,7 @@ tcu::TestCaseGroup* createFloat16CompositeConstructSet (tcu::TestContext& testCt specs["consts"] = consts; fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; - fragments["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs); @@ -12457,7 +12458,7 @@ tcu::TestCaseGroup* createFloat16CompositeInsertExtractSet (tcu::TestContext& te specs["op_case_default_value"] = opParts.caseDefaultValue; fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\""; - fragments["capability"] = "OpCapability StorageUniformBufferBlock16\n"; + fragments["capability"] = "OpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs); @@ -16876,7 +16877,7 @@ void createFloat16ArithmeticFuncTest (tcu::TestContext& testCtx, tcu::TestCaseGr specs["arg_func_call"] = funcCall; fragments["extension"] = "OpExtension \"SPV_KHR_16bit_storage\"\n%ext_import = OpExtInstImport \"GLSL.std.450\""; - fragments["capability"] = "OpCapability Matrix\nOpCapability StorageUniformBufferBlock16"; + fragments["capability"] = "OpCapability Matrix\nOpCapability StorageUniformBufferBlock16\nOpCapability Float16\n"; fragments["decoration"] = decoration.specialize(specs); fragments["pre_main"] = preMain.specialize(specs); fragments["testfun"] = testFun.specialize(specs);