From 78ebe6289071beddfb8ab44eeebec8479ce4d2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sat, 24 Jun 2023 09:54:56 -0700 Subject: [PATCH] Updated glslang. --- 3rdparty/glslang/SPIRV/GLSL.std.450.h | 2 +- 3rdparty/glslang/SPIRV/GlslangToSpv.cpp | 28 +++++++++++-------- 3rdparty/glslang/SPIRV/GlslangToSpv.h | 4 +-- .../glslang/SPIRV/NonSemanticDebugPrintf.h | 10 +++---- .../SPIRV/NonSemanticShaderDebugInfo100.h | 10 +++---- 3rdparty/glslang/SPIRV/SpvBuilder.cpp | 3 +- 3rdparty/glslang/SPIRV/SpvBuilder.h | 2 +- 3rdparty/glslang/SPIRV/disassemble.cpp | 2 +- 3rdparty/glslang/SPIRV/doc.cpp | 20 ++++++------- 3rdparty/glslang/SPIRV/doc.h | 2 +- 3rdparty/glslang/SPIRV/spirv.hpp | 14 +++++----- 3rdparty/glslang/SPIRV/spvIR.h | 2 +- 3rdparty/glslang/StandAlone/StandAlone.cpp | 10 ++++--- 3rdparty/glslang/glslang/Include/Types.h | 5 ++-- .../glslang/Include/glslang_c_interface.h | 6 ++-- .../MachineIndependent/SymbolTable.cpp | 2 +- .../glslang/MachineIndependent/Versions.cpp | 2 +- 17 files changed, 67 insertions(+), 57 deletions(-) diff --git a/3rdparty/glslang/SPIRV/GLSL.std.450.h b/3rdparty/glslang/SPIRV/GLSL.std.450.h index df31092be..86d3da806 100644 --- a/3rdparty/glslang/SPIRV/GLSL.std.450.h +++ b/3rdparty/glslang/SPIRV/GLSL.std.450.h @@ -13,7 +13,7 @@ ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index 5926582fa..2b5333abc 100755 --- a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -3393,7 +3393,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; - + case glslang::EOpHitObjectRecordHitNV: case glslang::EOpHitObjectRecordHitMotionNV: case glslang::EOpHitObjectRecordHitWithIndexNV: @@ -3573,7 +3573,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else if (arg == 2) { continue; } - } + } #endif // for l-values, pass the address, for r-values, pass the value @@ -3617,8 +3617,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) || (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) || (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) || - (arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) || - (arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) || + (arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) || + (arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) || (arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) { const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0; const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); @@ -4501,7 +4501,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty builder.addCapability(spv::CapabilityShaderInvocationReorderNV); spvType = builder.makeHitObjectNVType(); } - break; + break; #ifndef GLSLANG_WEB case glslang::EbtSpirvType: { // GL_EXT_spirv_intrinsics @@ -7200,7 +7200,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV; break; - + #endif case glslang::EOpCopyObject: @@ -9068,7 +9068,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operands); } return 0; - + } break; #endif // GLSLANG_WEB @@ -10036,27 +10036,32 @@ int GetSpirvGeneratorVersion() } // Write SPIR-V out to a binary file -void OutputSpvBin(const std::vector& spirv, const char* baseName) +bool OutputSpvBin(const std::vector& spirv, const char* baseName) { std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } for (int i = 0; i < (int)spirv.size(); ++i) { unsigned int word = spirv[i]; out.write((const char*)&word, 4); } out.close(); + return true; } // Write SPIR-V out to a text file with 32-bit hexadecimal words -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) { #if !defined(GLSLANG_WEB) std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } out << "\t// " << GetSpirvGeneratorVersion() << GLSLANG_VERSION_MAJOR << "." << GLSLANG_VERSION_MINOR << "." << GLSLANG_VERSION_PATCH << @@ -10083,6 +10088,7 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, } out.close(); #endif + return true; } // diff --git a/3rdparty/glslang/SPIRV/GlslangToSpv.h b/3rdparty/glslang/SPIRV/GlslangToSpv.h index 3907be43b..b9736d7c9 100644 --- a/3rdparty/glslang/SPIRV/GlslangToSpv.h +++ b/3rdparty/glslang/SPIRV/GlslangToSpv.h @@ -55,7 +55,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); -void OutputSpvBin(const std::vector& spirv, const char* baseName); -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); +bool OutputSpvBin(const std::vector& spirv, const char* baseName); +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); } diff --git a/3rdparty/glslang/SPIRV/NonSemanticDebugPrintf.h b/3rdparty/glslang/SPIRV/NonSemanticDebugPrintf.h index 83796d75e..3ca7247f2 100644 --- a/3rdparty/glslang/SPIRV/NonSemanticDebugPrintf.h +++ b/3rdparty/glslang/SPIRV/NonSemanticDebugPrintf.h @@ -1,5 +1,5 @@ // Copyright (c) 2020 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the // "Materials"), to deal in the Materials without restriction, including @@ -7,15 +7,15 @@ // distribute, sublicense, and/or sell copies of the Materials, and to // permit persons to whom the Materials are furnished to do so, subject to // the following conditions: -// +// // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Materials. -// +// // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS // KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS // SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT // https://www.khronos.org/registry/ -// +// // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -23,7 +23,7 @@ // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -// +// #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ diff --git a/3rdparty/glslang/SPIRV/NonSemanticShaderDebugInfo100.h b/3rdparty/glslang/SPIRV/NonSemanticShaderDebugInfo100.h index c52f32f80..f74abcb64 100644 --- a/3rdparty/glslang/SPIRV/NonSemanticShaderDebugInfo100.h +++ b/3rdparty/glslang/SPIRV/NonSemanticShaderDebugInfo100.h @@ -1,19 +1,19 @@ // Copyright (c) 2018 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. -// +// // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL diff --git a/3rdparty/glslang/SPIRV/SpvBuilder.cpp b/3rdparty/glslang/SPIRV/SpvBuilder.cpp index 8d0b677ba..df5f234b3 100644 --- a/3rdparty/glslang/SPIRV/SpvBuilder.cpp +++ b/3rdparty/glslang/SPIRV/SpvBuilder.cpp @@ -2109,7 +2109,8 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const return function; } -Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) { +Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId) +{ assert(function != nullptr); assert(nameId != 0); assert(funcTypeId != 0); diff --git a/3rdparty/glslang/SPIRV/SpvBuilder.h b/3rdparty/glslang/SPIRV/SpvBuilder.h index 02e9cf400..70edf250d 100644 --- a/3rdparty/glslang/SPIRV/SpvBuilder.h +++ b/3rdparty/glslang/SPIRV/SpvBuilder.h @@ -103,7 +103,7 @@ public: stringIds[file_c_str] = strId; return strId; } - spv::Id getSourceFile() const + spv::Id getSourceFile() const { return sourceFileStringId; } diff --git a/3rdparty/glslang/SPIRV/disassemble.cpp b/3rdparty/glslang/SPIRV/disassemble.cpp index f943fd564..479f4a64e 100644 --- a/3rdparty/glslang/SPIRV/disassemble.cpp +++ b/3rdparty/glslang/SPIRV/disassemble.cpp @@ -515,7 +515,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 || strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 || strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 || - strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || + strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 || strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) { extInstSet = GLSLextNVInst; diff --git a/3rdparty/glslang/SPIRV/doc.cpp b/3rdparty/glslang/SPIRV/doc.cpp index 571ef7880..3d78d3de1 100755 --- a/3rdparty/glslang/SPIRV/doc.cpp +++ b/3rdparty/glslang/SPIRV/doc.cpp @@ -318,7 +318,7 @@ const char* DecorationString(int decoration) case DecorationPerPrimitiveNV: return "PerPrimitiveNV"; case DecorationPerViewNV: return "PerViewNV"; case DecorationPerTaskNV: return "PerTaskNV"; - + case DecorationPerVertexKHR: return "PerVertexKHR"; case DecorationNonUniformEXT: return "DecorationNonUniformEXT"; @@ -584,7 +584,7 @@ const char* ImageChannelOrderString(int format) case 17: return "sRGBA"; case 18: return "sBGRA"; - default: + default: return "Bad"; } } @@ -870,7 +870,7 @@ const char* CapabilityString(int info) case 22: return "Int16"; case 23: return "TessellationPointSize"; case 24: return "GeometryPointSize"; - case 25: return "ImageGatherExtended"; + case 25: return "ImageGatherExtended"; case 26: return "Bad"; case 27: return "StorageImageMultisample"; case 28: return "UniformBufferArrayDynamicIndexing"; @@ -2253,11 +2253,11 @@ void Parameterize() InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - + InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); @@ -2937,7 +2937,7 @@ void Parameterize() InstructionDesc[OpTerminateRayNV].setResultAndType(false, false); InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); - + InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index"); InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID"); InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false); @@ -3053,7 +3053,7 @@ void Parameterize() InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'"); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true); InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true); - + InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'"); InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'"); @@ -3099,7 +3099,7 @@ void Parameterize() InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false); - + InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'"); InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true); @@ -3117,7 +3117,7 @@ void Parameterize() InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'"); InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true); - + InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'"); InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true); @@ -3173,7 +3173,7 @@ void Parameterize() InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'"); InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'"); InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false); - + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'"); InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'"); diff --git a/3rdparty/glslang/SPIRV/doc.h b/3rdparty/glslang/SPIRV/doc.h index 7e1559950..95aa5ce8c 100644 --- a/3rdparty/glslang/SPIRV/doc.h +++ b/3rdparty/glslang/SPIRV/doc.h @@ -197,7 +197,7 @@ public: // Parameterize a set of enumerants that form an enum class EnumDefinition : public EnumParameters { public: - EnumDefinition() : + EnumDefinition() : ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { } void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false) { diff --git a/3rdparty/glslang/SPIRV/spirv.hpp b/3rdparty/glslang/SPIRV/spirv.hpp index 111285326..f3fb899f6 100644 --- a/3rdparty/glslang/SPIRV/spirv.hpp +++ b/3rdparty/glslang/SPIRV/spirv.hpp @@ -1,19 +1,19 @@ // Copyright (c) 2014-2020 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. -// +// // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -27,7 +27,7 @@ // Enumeration tokens for SPIR-V, in various styles: // C, C++, C++11, JSON, Lua, Python, C#, D, Beef -// +// // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL @@ -38,7 +38,7 @@ // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL // - Beef will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL -// +// // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have // "Mask" in their name, and a parallel enum that has the shift diff --git a/3rdparty/glslang/SPIRV/spvIR.h b/3rdparty/glslang/SPIRV/spvIR.h index 09691273a..660742a75 100644 --- a/3rdparty/glslang/SPIRV/spvIR.h +++ b/3rdparty/glslang/SPIRV/spvIR.h @@ -386,7 +386,7 @@ public: if (lineInstruction != nullptr) { lineInstruction->dump(out); } - + // OpFunction functionInstruction.dump(out); diff --git a/3rdparty/glslang/StandAlone/StandAlone.cpp b/3rdparty/glslang/StandAlone/StandAlone.cpp index e038ed167..a4c9fec12 100644 --- a/3rdparty/glslang/StandAlone/StandAlone.cpp +++ b/3rdparty/glslang/StandAlone/StandAlone.cpp @@ -725,7 +725,7 @@ void ProcessArguments(std::vector>& workItem HlslDxPositionW = true; } else if (lowerword == "enhanced-msgs") { EnhancedMsgs = true; - } else if (lowerword == "auto-sampled-textures") { + } else if (lowerword == "auto-sampled-textures") { autoSampledTextures = true; } else if (lowerword == "invert-y" || // synonyms lowerword == "iy") { @@ -1526,9 +1526,11 @@ void CompileAndLinkShaderUnits(std::vector compUnits) if (! (Options & EOptionMemoryLeakMode)) { printf("%s", logger.getAllMessages().c_str()); if (Options & EOptionOutputHexadecimal) { - glslang::OutputSpvHex(spirv, GetBinaryName((EShLanguage)stage), variableName); + if (!glslang::OutputSpvHex(spirv, GetBinaryName((EShLanguage)stage), variableName)) + exit(EFailUsage); } else { - glslang::OutputSpvBin(spirv, GetBinaryName((EShLanguage)stage)); + if (!glslang::OutputSpvBin(spirv, GetBinaryName((EShLanguage)stage))) + exit(EFailUsage); } outputFiles.push_back(GetBinaryName((EShLanguage)stage)); @@ -1973,7 +1975,7 @@ void usage() " without explicit bindings\n" " --auto-map-locations | --aml automatically locate input/output lacking\n" " 'location' (fragile, not cross stage)\n" - " --auto-sampled-textures Removes sampler variables and converts\n" + " --auto-sampled-textures Removes sampler variables and converts\n" " existing textures to sampled textures\n" " --client {vulkan|opengl} see -V and -G\n" " --depfile writes depfile for build systems\n" diff --git a/3rdparty/glslang/glslang/Include/Types.h b/3rdparty/glslang/glslang/Include/Types.h index c3d0bff44..6e3ad6210 100644 --- a/3rdparty/glslang/glslang/Include/Types.h +++ b/3rdparty/glslang/glslang/Include/Types.h @@ -1788,14 +1788,15 @@ public: } // for block reference (first parameter must be EbtReference) explicit TType(TBasicType t, const TType &p, const TString& n) : - basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr) + basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) #ifndef GLSLANG_WEB , spirvType(nullptr) #endif { assert(t == EbtReference); typeName = NewPoolTString(n.c_str()); + sampler.clear(); qualifier.clear(); qualifier.storage = p.qualifier.storage; referentType = p.clone(); diff --git a/3rdparty/glslang/glslang/Include/glslang_c_interface.h b/3rdparty/glslang/glslang/Include/glslang_c_interface.h index a519f6358..fd636cf5f 100644 --- a/3rdparty/glslang/glslang/Include/glslang_c_interface.h +++ b/3rdparty/glslang/glslang/Include/glslang_c_interface.h @@ -248,8 +248,8 @@ extern "C" { #define GLSLANG_EXPORT #endif -GLSLANG_EXPORT int glslang_initialize_process(); -GLSLANG_EXPORT void glslang_finalize_process(); +GLSLANG_EXPORT int glslang_initialize_process(void); +GLSLANG_EXPORT void glslang_finalize_process(void); GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input); GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader); @@ -264,7 +264,7 @@ GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader); GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader); -GLSLANG_EXPORT glslang_program_t* glslang_program_create(); +GLSLANG_EXPORT glslang_program_t* glslang_program_create(void); GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program); GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader); GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t diff --git a/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp index f5f98a0b0..43f8dbe3e 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -382,7 +382,7 @@ TVariable* TVariable::clone() const TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) { for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { - TParameter param; + TParameter param{}; parameters.push_back(param); (void)parameters.back().copyParam(copyOf.parameters[i]); } diff --git a/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp b/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp index 71032c8d1..eae0a59f3 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp @@ -556,7 +556,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_mesh_shader 1\n" "#define GL_NV_cooperative_matrix 1\n" "#define GL_NV_integer_cooperative_matrix 1\n" - "#define GL_NV_shader_execution_reorder 1\n" + "#define GL_NV_shader_invocation_reorder 1\n" "#define GL_EXT_shader_explicit_arithmetic_types 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"