diff --git a/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index ff9c8b04a..12f034b50 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -69,7 +69,8 @@ namespace spv { #include #include #include -#include +// RD Modification - remove use of std::optional +//#include #include #include #include @@ -169,7 +170,8 @@ protected: spv::Id convertGlslangToSpvType(const glslang::TType& type, bool forwardReferenceOnly = false); spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&, bool lastBufferBlockMember, bool forwardReferenceOnly = false); - void applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member); + // RD Modification - remove use of std::optional + void applySpirvDecorate(const glslang::TType& type, spv::Id id, int* member); bool filterMember(const glslang::TType& member); spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&); @@ -5268,8 +5270,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* if (options.emitNonSemanticShaderDebugInfo && storageClass != spv::StorageClass::Function) { // Create variable alias for retargeted symbols if any. // Notably, this is only applicable to built-in variables so that it is okay to only use name as the key. - auto [itBegin, itEnd] = glslangIntermediate->getBuiltinAliasLookup().equal_range(name); - for (auto it = itBegin; it != itEnd; ++it) { + // RD modification - use pair explicitly + auto itRange = glslangIntermediate->getBuiltinAliasLookup().equal_range(name); + for (auto it = itRange.first; it != itRange.second; ++it) { builder.createDebugGlobalVariable(builder.getDebugType(spvType), it->second.c_str(), var); } } @@ -5830,7 +5833,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // Apply SPIR-V decorations to the SPIR-V object (provided by SPIR-V ID). If member index is provided, the // decorations are applied to this member. -void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member) +// RD Modification - remove use of std::optional +void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv::Id id, int* member) { assert(type.getQualifier().hasSpirvDecorate()); @@ -5841,12 +5845,12 @@ void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv: if (!decorate.second.empty()) { std::vector literals; TranslateLiterals(decorate.second, literals); - if (member.has_value()) + if (member) builder.addMemberDecoration(id, *member, static_cast(decorate.first), literals); else builder.addDecoration(id, static_cast(decorate.first), literals); } else { - if (member.has_value()) + if (member) builder.addMemberDecoration(id, *member, static_cast(decorate.first)); else builder.addDecoration(id, static_cast(decorate.first)); @@ -5854,7 +5858,7 @@ void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv: } // Add spirv_decorate_id - if (member.has_value()) { + if (member) { // spirv_decorate_id not applied to members assert(spirvDecorate.decorateIds.empty()); } else { @@ -5879,7 +5883,7 @@ void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv: const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); strings.push_back(string); } - if (member.has_value()) + if (member) builder.addMemberDecoration(id, *member, static_cast(decorateString.first), strings); else builder.addDecoration(id, static_cast(decorateString.first), strings); @@ -5987,7 +5991,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy // + Table lookup during creation of composite debug types. This really shouldn't be necessary. if(options.emitNonSemanticShaderDebugInfo) { spv::StructMemberDebugInfo debugInfo{}; - debugInfo.name = glslangMember.type->getFieldName(); + // RD modification - use explicit string conversion + debugInfo.name = std::string(glslangMember.type->getFieldName().data(), glslangMember.type->getFieldName().size()); debugInfo.line = glslangMember.loc.line; debugInfo.column = glslangMember.loc.column; @@ -6307,8 +6312,9 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, } // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) + // RD Modification - remove use of std::optional if (glslangMember.getQualifier().hasSpirvDecorate()) - applySpirvDecorate(glslangMember, spvType, member); + applySpirvDecorate(glslangMember, spvType, &member); } // Decorate the structure @@ -11243,8 +11249,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) + // RD Modification - remove use of std::optional if (symbol->getType().getQualifier().hasSpirvDecorate()) - applySpirvDecorate(symbol->getType(), id, {}); + applySpirvDecorate(symbol->getType(), id, NULL); if (symbol->getQualifier().hasBank()) { builder.addExtension(spv::E_SPV_NV_push_constant_bank); diff --git a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.cpp b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.cpp index 52e484c26..47006138e 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.cpp +++ b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.cpp @@ -2819,7 +2819,9 @@ void Builder::enterFunction(Function const* function) addInstruction(std::unique_ptr(defInst)); } - if (auto linkType = function->getLinkType(); linkType != LinkageType::Max) { + // RD Modification - remove use of new declaration-inside-if + auto linkType = function->getLinkType(); + if (linkType != LinkageType::Max) { Id funcId = function->getFuncId(); addCapability(Capability::Linkage); addLinkageDecoration(funcId, function->getExportName(), linkType); diff --git a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h index abfec52ef..7c92432f2 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h +++ b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h @@ -208,7 +208,9 @@ public: // Maps the given OpType Id to a Non-Semantic DebugType Id. Id getDebugType(Id type) { - if (auto it = debugTypeIdLookup.find(type); it != debugTypeIdLookup.end()) { + // RD Modification - remove use of new declaration-inside-if + auto it = debugTypeIdLookup.find(type); + if (it != debugTypeIdLookup.end()) { return it->second; } @@ -217,7 +219,9 @@ public: // Maps the given OpFunction Id to a Non-Semantic DebugFunction Id. Id getDebugFunction(Id func) { - if (auto it = debugFuncIdLookup.find(func); it != debugFuncIdLookup.end()) { + // RD Modification - remove use of new declaration-inside-if + auto it = debugFuncIdLookup.find(func); + if (it != debugFuncIdLookup.end()) { return it->second; } @@ -1115,7 +1119,8 @@ protected: struct ScalarConstantKeyHash { // 64/32 bit mix function from MurmurHash3 inline std::size_t hash_mix(std::size_t h) const { - if constexpr (sizeof(std::size_t) == 8) { + // RD Modification - remove if constexpr + if (sizeof(std::size_t) == 8) { h ^= h >> 33; h *= UINT64_C(0xff51afd7ed558ccd); h ^= h >> 33; diff --git a/renderdoc/3rdparty/glslang/SPIRV/spvIR.h b/renderdoc/3rdparty/glslang/SPIRV/spvIR.h index ce7afbcce..d9ba1d934 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/spvIR.h +++ b/renderdoc/3rdparty/glslang/SPIRV/spvIR.h @@ -56,7 +56,8 @@ #include #include #include -#include +// RD Modification - remove use of std::optional +//#include namespace spv { @@ -297,8 +298,8 @@ public: // Returns true if the source location is actually updated. // Note we still need the builder to insert the line marker instruction. This is just a tracker. bool updateDebugSourceLocation(int line, int column, spv::Id fileId) { - if (currentSourceLoc && currentSourceLoc->line == line && currentSourceLoc->column == column && - currentSourceLoc->fileId == fileId) { + if (currentSourceLoc.line == line && currentSourceLoc.column == column && + currentSourceLoc.fileId == fileId) { return false; } @@ -309,7 +310,7 @@ public: // Note we still need the builder to insert the debug scope instruction. This is just a tracker. bool updateDebugScope(spv::Id scopeId) { assert(scopeId); - if (currentDebugScope && *currentDebugScope == scopeId) { + if (currentDebugScope && currentDebugScope == scopeId) { return false; } @@ -409,10 +410,12 @@ protected: Function& parent; // Track source location of the last source location marker instruction. - std::optional currentSourceLoc; + // RD Modification - remove use of std::optional + DebugSourceLocation currentSourceLoc = {-1, -1}; // Track scope of the last debug scope instruction. - std::optional currentDebugScope; + // RD Modification - remove use of std::optional + spv::Id currentDebugScope = {}; // track whether this block is known to be uncreachable (not necessarily // true for all unreachable blocks, but should be set at least diff --git a/renderdoc/3rdparty/glslang/glslang/Include/InfoSink.h b/renderdoc/3rdparty/glslang/glslang/Include/InfoSink.h index 262933941..34ffa85e6 100644 --- a/renderdoc/3rdparty/glslang/glslang/Include/InfoSink.h +++ b/renderdoc/3rdparty/glslang/glslang/Include/InfoSink.h @@ -36,7 +36,8 @@ #define _INFOSINK_INCLUDED_ #include "../Include/Common.h" -#include +// RD Modification - remove std::filesystem use +//#include #include namespace glslang { @@ -104,16 +105,17 @@ public: snprintf(locText, maxSize, ":%d", loc.line); } - if(loc.getFilename() == nullptr && shaderFileName != nullptr && absolute) { - append(std::filesystem::absolute(shaderFileName).string()); - } else { + // RD Modification - absolute paths unsupported + //if(loc.getFilename() == nullptr && shaderFileName != nullptr && absolute) { + // append(std::filesystem::absolute(shaderFileName).string()); + //} else { std::string location = loc.getStringNameOrNum(false); - if (absolute) { - append(std::filesystem::absolute(location).string()); - } else { + //if (absolute) { + // append(std::filesystem::absolute(location).string()); + //} else { append(location); - } - } + //} + //} append(locText); append(": "); diff --git a/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h b/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h index 6b6dfd64d..af58bffd6 100644 --- a/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h +++ b/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h @@ -120,14 +120,15 @@ private: unsigned char* mem; // beginning of our allocation (pts to header) TAllocation* prevAlloc; // prior allocation in the chain - static inline constexpr unsigned char guardBlockBeginVal = 0xfb; - static inline constexpr unsigned char guardBlockEndVal = 0xfe; - static inline constexpr unsigned char userDataFill = 0xcd; + // RD Modification - static constexpr implies inline + static constexpr unsigned char guardBlockBeginVal = 0xfb; + static constexpr unsigned char guardBlockEndVal = 0xfe; + static constexpr unsigned char userDataFill = 0xcd; # ifdef GUARD_BLOCKS - static inline constexpr size_t guardBlockSize = 16; + static constexpr size_t guardBlockSize = 16; # else - static inline constexpr size_t guardBlockSize = 0; + static constexpr size_t guardBlockSize = 0; # endif # ifdef GUARD_BLOCKS @@ -317,8 +318,11 @@ public: pool_allocator select_on_container_copy_construction() const { return pool_allocator{}; } -protected: + // RD Modification - work around seeming old libstdc++ bug, string move assignment + // invokes std::swap() which swaps allocators via assignment + // newer compilers do not invoke this function pool_allocator& operator=(const pool_allocator&) { return *this; } +protected: TPoolAllocator& allocator; }; diff --git a/renderdoc/3rdparty/glslang/glslang/Include/SpirvIntrinsics.h b/renderdoc/3rdparty/glslang/glslang/Include/SpirvIntrinsics.h index 0082a4d4e..6ab9dd918 100644 --- a/renderdoc/3rdparty/glslang/glslang/Include/SpirvIntrinsics.h +++ b/renderdoc/3rdparty/glslang/glslang/Include/SpirvIntrinsics.h @@ -39,7 +39,8 @@ // GL_EXT_spirv_intrinsics // #include "Common.h" -#include +// RD Modification - remove std::variant use +//#include namespace glslang { @@ -97,19 +98,19 @@ struct TSpirvInstruction { struct TSpirvTypeParameter { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TSpirvTypeParameter(const TIntermConstantUnion* arg) { value = arg; } - TSpirvTypeParameter(const TType* arg) { value = arg; } + TSpirvTypeParameter(const TIntermConstantUnion* arg) { value.constant = arg; valueIndex = 0; } + TSpirvTypeParameter(const TType* arg) { value.type = arg; valueIndex = 1; } const TIntermConstantUnion* getAsConstant() const { - if (value.index() == 0) - return std::get(value); + if (valueIndex == 0) + return value.constant; return nullptr; } const TType* getAsType() const { - if (value.index() == 1) - return std::get(value); + if (valueIndex == 1) + return value.type; return nullptr; } @@ -117,7 +118,14 @@ struct TSpirvTypeParameter { bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } // Parameter value: constant expression or type specifier - std::variant value; + // RD Modification - remove std::variant use + //std::variant value; + union + { + const TIntermConstantUnion* constant; + const TType* type; + } value; + int valueIndex = 0; }; typedef TVector TSpirvTypeParameters; diff --git a/renderdoc/3rdparty/glslang/glslang/Include/Types.h b/renderdoc/3rdparty/glslang/glslang/Include/Types.h index 3fb0c55b5..d927b2a85 100644 --- a/renderdoc/3rdparty/glslang/glslang/Include/Types.h +++ b/renderdoc/3rdparty/glslang/glslang/Include/Types.h @@ -2691,8 +2691,9 @@ public: TString getBasicTypeString() const { + // RD modification: use explicit constructor if (basicType == EbtSampler) - return TString{sampler.getString()}; + return TString(sampler.getString().data(), sampler.getString().size()); else return getBasicString(); } diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp index 546d8af85..6d3956c8b 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp @@ -142,17 +142,21 @@ struct Versioning { EProfile EDesktopProfile = static_cast(ENoProfile | ECoreProfile | ECompatibilityProfile); // Declare pointers to put into the table for versioning. - const std::array Es300Desktop130Version = { Versioning{ EEsProfile, 0, 300, 0, nullptr }, +// RD Modification - explicitly type std::array + const std::array Es300Desktop130Version + = {{ Versioning{ EEsProfile, 0, 300, 0, nullptr }, Versioning{ EDesktopProfile, 0, 130, 0, nullptr }, - }; + }}; - const std::array Es310Desktop400Version = { Versioning{ EEsProfile, 0, 310, 0, nullptr }, + const std::array Es310Desktop400Version + = {{ Versioning{ EEsProfile, 0, 310, 0, nullptr }, Versioning{ EDesktopProfile, 0, 400, 0, nullptr }, - }; + }}; - const std::array Es310Desktop450Version = { Versioning{ EEsProfile, 0, 310, 0, nullptr }, + const std::array Es310Desktop450Version + = {{ Versioning{ EEsProfile, 0, 310, 0, nullptr }, Versioning{ EDesktopProfile, 0, 450, 0, nullptr }, - }; + }}; // The main descriptor of what a set of function prototypes can look like, and // a pointer to extra versioning information, when needed. @@ -174,7 +178,8 @@ struct BuiltInFunction { // // Table is terminated by an OpNull TOperator. -const std::array BaseFunctions = { +// RD Modification - explicitly type std::array +const std::array BaseFunctions = {{ // TOperator, name, arg-count, ArgType, ArgClass, versioning // --------- ---- --------- ------- -------- ---------- BuiltInFunction{ EOpRadians, "radians", 1, TypeF, ClassRegular, {} }, @@ -256,13 +261,14 @@ const std::array BaseFunctions = { BuiltInFunction{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeB, ClassRegular, {Es310Desktop450Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeIU, ClassLB, {Es310Desktop450Version} }, -}; +}}; -const std::array DerivativeFunctions = { +// RD Modification - explicitly type std::array +const std::array DerivativeFunctions = {{ BuiltInFunction{ EOpDPdx, "dFdx", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpDPdy, "dFdy", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpFwidth, "fwidth", 1, TypeF, ClassRegular, {} }, -}; +}}; // For functions declared some other way, but still use the table to relate to operator. struct CustomFunction { @@ -5069,7 +5075,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV << t << " data[], uint tensorOperands = 0U, ...);\n"; } ostream << "uint tensorSizeARM(readonly writeonly tensorARM t, uint dim);\n"; - commonBuiltins.append(ostream.str()); + // RD modification - remove incompatible string conversion + commonBuiltins.append(ostream.str().data(), ostream.str().size()); } if (profile != EEsProfile && version >= 450) { @@ -7269,7 +7276,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV false, ms ? true : false); - TString typeName = TString{sampler.getString()}; + // RD modification - explicit string conversion + TString typeName = TString(sampler.getString().data(), sampler.getString().size()); addQueryFunctions(sampler, typeName, version, profile); addImageFunctions(sampler, typeName, version, profile); @@ -7371,8 +7379,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c shadow ? true : false, ms ? true : false); } - - TString typeName = TString{sampler.getString()}; + // RD modification - explicit string conversion + TString typeName = TString(sampler.getString().data(), sampler.getString().size()); if (dim == EsdSubpass) { addSubpassSampling(sampler, typeName, version, profile); @@ -7396,7 +7404,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // texture types. sampler.setTexture(sampler.type, sampler.dim, sampler.arrayed, sampler.shadow, sampler.ms); - TString textureTypeName = TString{sampler.getString()}; + // RD modification - explicit string conversion + TString textureTypeName = TString(sampler.getString().data(), sampler.getString().size()); addSamplingFunctions(sampler, textureTypeName, version, profile); addQueryFunctions(sampler, textureTypeName, version, profile); } diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index 658ca42d4..6fbcaba51 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -1827,7 +1827,8 @@ void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFun // Validate that the matrix sizes are compatible for multiplication and addition const auto &sequence = arguments->getAsAggregate()->getSequence(); - using ArrayDim = const TArraySize&; + // RD modification use no reference - the struct is small and fine to value copy + using ArrayDim = TArraySize; auto getDim = [](const TIntermSequence& seq, int idx) -> std::tuple { const auto &type = seq[idx]->getAsTyped()->getType(); const auto *size = type.getTypeParameters()->arraySizes; @@ -1842,9 +1843,12 @@ void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFun }; // sizes look like: [scope, rows, cols, use] - auto [aRows, aCols, aUse] = getDim(sequence, 0); - auto [bRows, bCols, bUse] = getDim(sequence, 1); - auto [cRows, cCols, cUse] = getDim(sequence, 2); + // RD modification - use std::tie + ArrayDim aRows, aCols, bRows, bCols, cRows, cCols; + int aUse, bUse, cUse; + std::tie(aRows, aCols, aUse) = getDim(sequence, 0); + std::tie(bRows, bCols, bUse) = getDim(sequence, 1); + std::tie(cRows, cCols, cUse) = getDim(sequence, 2); auto toString = [](ArrayDim dim) -> std::string { std::stringstream buf; diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp index fd8a690f2..ce3f90d6d 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -370,7 +370,9 @@ void TSymbolTableLevel::setFunctionExtensionsCallback(const char* name, std::fun // Should only be used for a version/profile that actually needs the extension(s). void TSymbolTableLevel::setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) { - if (auto candidate = level.find(name); candidate != level.end()) { + // RD Modification - remove use of new declaration-inside-if + auto candidate = level.find(name); + if (candidate != level.end()) { candidate->second->setExtensions(num, extensions); } } diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h index 916192749..1d738c8f2 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h @@ -507,8 +507,9 @@ public: } void collectRetargetedSymbols(std::unordered_multimap &out) const { - for (const auto &[fromName, toName] : retargetedSymbols) - out.insert({std::string{toName}, std::string{fromName}}); + // RD modification - use normal pair access, use explicit constructor + for (const auto &sym : retargetedSymbols) + out.insert({std::string(sym.second.data(), sym.second.size()), std::string(sym.first.data(), sym.first.size())}); } TSymbol* find(const TString& name) const diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h index df1fa5701..ea93015a8 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h @@ -83,8 +83,9 @@ public: const char* featureDesc); virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); + // RD Modification - drop redundant constexpr (warning about it not implying const) template - constexpr void ppRequireExtensions(const TSourceLoc& loc, Container extensions, const char* featureDesc) { + void ppRequireExtensions(const TSourceLoc& loc, Container extensions, const char* featureDesc) { ppRequireExtensions(loc, static_cast(extensions.size()), extensions.data(), featureDesc); } diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp index 90270367f..33df13585 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -1020,7 +1020,8 @@ int TPpContext::readCPPline(TPpToken* ppToken) break; case PpAtomInclude: if(!parseContext.isReadingHLSL()) { - const std::array exts = { E_GL_GOOGLE_include_directive, E_GL_ARB_shading_language_include }; + // RD Modification - explicitly type std::array + const std::array exts = {{ E_GL_GOOGLE_include_directive, E_GL_ARB_shading_language_include }}; parseContext.ppRequireExtensions(ppToken->loc, exts, "#include"); } token = CPPinclude(ppToken);