[Misc] (3rdparty): Update glslang to 15.4.0

This commit is contained in:
2025-07-15 09:58:37 +08:00
parent ea30e0ee92
commit 8e1427fbd0
36 changed files with 6003 additions and 5383 deletions
@@ -232,6 +232,13 @@ struct TParameter {
name = nullptr;
type = param.type->clone();
defaultValue = param.defaultValue;
if (defaultValue) {
// The defaultValue of a builtin is created in a TPoolAllocator that no longer exists
// when parsing the user program, so make a deep copy.
if (const auto *constUnion = defaultValue->getAsConstantUnion()) {
defaultValue = new TIntermConstantUnion(*constUnion->getConstArray().clone(), constUnion->getType());
}
}
return *this;
}
TBuiltInVariable getDeclaredBuiltIn() const { return type->getQualifier().declaredBuiltIn; }
@@ -245,12 +252,12 @@ public:
explicit TFunction(TOperator o) :
TSymbol(nullptr),
op(o),
defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { }
defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), variadic(false), defaultParamCount(0) { }
TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) :
TSymbol(name),
mangledName(*name + '('),
op(tOp),
defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0),
defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), variadic(false), defaultParamCount(0),
linkType(ELinkNone)
{
returnType.shallowCopy(retType);
@@ -268,6 +275,7 @@ public:
virtual void addParameter(TParameter& p)
{
assert(writable);
assert(!variadic && "cannot add more parameters if function is marked variadic");
parameters.push_back(p);
p.type->appendMangledName(mangledName);
@@ -310,6 +318,13 @@ public:
virtual bool hasImplicitThis() const { return implicitThis; }
virtual void setIllegalImplicitThis() { assert(writable); illegalImplicitThis = true; }
virtual bool hasIllegalImplicitThis() const { return illegalImplicitThis; }
virtual void setVariadic() {
assert(writable);
assert(!variadic && "function was already marked variadic");
variadic = true;
mangledName += 'z';
}
virtual bool isVariadic() const { return variadic; }
// Return total number of parameters
virtual int getParamCount() const { return static_cast<int>(parameters.size()); }
@@ -352,6 +367,7 @@ protected:
// even if it finds member variables in the symbol table.
// This is important for a static member function that has member variables in scope,
// but is not allowed to use them, or see hidden symbols instead.
bool variadic;
int defaultParamCount;
TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers