From: David Neto Date: Fri, 13 Nov 2015 18:03:28 +0000 (-0600) Subject: Register Glslang tool X-Git-Tag: upstream/2018.6~1438 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2266ba10611432ecdfa59e25c2a9a08cc0cda180;p=platform%2Fupstream%2FSPIRV-Tools.git Register Glslang tool --- diff --git a/source/opcode.cpp b/source/opcode.cpp index 0d1161a..c26e9b6 100644 --- a/source/opcode.cpp +++ b/source/opcode.cpp @@ -302,6 +302,8 @@ const char* spvGeneratorStr(uint32_t generator) { return "Khronos LLVM/SPIR-V Translator"; case SPV_GENERATOR_KHRONOS_ASSEMBLER: return "Khronos SPIR-V Tools Assembler"; + case SPV_GENERATOR_KHRONOS_GLSLANG: + return "Khronos Glslang Reference Front End"; default: return "Unknown"; } diff --git a/source/spirv_constant.h b/source/spirv_constant.h index 14da807..cbf33cc 100644 --- a/source/spirv_constant.h +++ b/source/spirv_constant.h @@ -97,6 +97,7 @@ typedef enum spv_generator_t { // These are vendor and tool. SPV_GENERATOR_KHRONOS_LLVM_TRANSLATOR = 6, SPV_GENERATOR_KHRONOS_ASSEMBLER = 7, + SPV_GENERATOR_KHRONOS_GLSLANG = 8, SPV_GENERATOR_NUM_ENTRIES, SPV_FORCE_16_BIT_ENUM(spv_generator_t) } spv_generator_t; diff --git a/test/BinaryToText.cpp b/test/BinaryToText.cpp index 6ec1535..55156cc 100644 --- a/test/BinaryToText.cpp +++ b/test/BinaryToText.cpp @@ -457,6 +457,8 @@ INSTANTIATE_TEST_CASE_P(GeneratorStrings, GeneratorStringTest, "Khronos LLVM/SPIR-V Translator; 38"}, {SPV_GENERATOR_KHRONOS_ASSEMBLER, 2, "Khronos SPIR-V Tools Assembler; 2"}, + {SPV_GENERATOR_KHRONOS_GLSLANG, 1, + "Khronos Glslang Reference Front End; 1"}, {9, 18, "Unknown(9); 18"}, {65535, 32767, "Unknown(65535); 32767"}, })); diff --git a/test/GeneratorMagicNumber.cpp b/test/GeneratorMagicNumber.cpp index a298d8d..6dd3a43 100644 --- a/test/GeneratorMagicNumber.cpp +++ b/test/GeneratorMagicNumber.cpp @@ -55,13 +55,14 @@ INSTANTIATE_TEST_CASE_P( {SPV_GENERATOR_KHRONOS_LLVM_TRANSLATOR, "Khronos LLVM/SPIR-V Translator"}, {SPV_GENERATOR_KHRONOS_ASSEMBLER, "Khronos SPIR-V Tools Assembler"}, + {SPV_GENERATOR_KHRONOS_GLSLANG, "Khronos Glslang Reference Front End"}, })); INSTANTIATE_TEST_CASE_P( Unregistered, GeneratorMagicNumberTest, ::testing::ValuesIn(std::vector>{ // Currently value 6 and beyond are unregiestered. - {spv_generator_t(8), "Unknown"}, + {spv_generator_t(9), "Unknown"}, {spv_generator_t(9999), "Unknown"}, })); } // anonymous namespace