Fixes to glslang for compiling on Android and linux

This commit is contained in:
baldurk
2026-03-13 13:07:43 +00:00
parent 2054748153
commit 1f10092108
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -3071,7 +3071,7 @@ Instruction* Builder::createDescHeapLoadStoreBaseRemap(Id baseId, Op op)
baseVal = chain->getResultId();
clearAccessChain();
} else if (instOp != Op::OpUntypedAccessChainKHR) {
assert("Not a untyped load type");
assert(false && "Not a untyped load type");
}
Instruction* inst = nullptr;
@@ -43,6 +43,7 @@
#include "Scan.h"
#include <algorithm>
#include <limits>
#include <sys/types.h>
#include "Versions.h"
@@ -1835,10 +1836,10 @@ void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFun
if (type.isCoopMatNV()) {
// coopmatNV don't encode usage, so provide the correct usage by default
return {size->getArraySize(2), size->getArraySize(3), idx};
return std::tuple<ArrayDim, ArrayDim, int>(size->getArraySize(2), size->getArraySize(3), idx);
} else {
assert(type.isCoopMatKHR());
return {size->getArraySize(1), size->getArraySize(2), size->getDimSize(3)};
return std::tuple<ArrayDim, ArrayDim, int>(size->getArraySize(1), size->getArraySize(2), size->getDimSize(3));
}
};
@@ -839,7 +839,9 @@ public:
std::unordered_multimap<std::string, std::string> collectBuiltinAlias() {
std::unordered_multimap<std::string, std::string> allRetargets;
for (int level = 0; level <= std::min(currentLevel(), builtinLevel); ++level)
// RD modification - some compilers get confused with this and expect an instantiation of the static const int
const int x = builtinLevel;
for (int level = 0; level <= std::min(currentLevel(), x); ++level)
table[level]->collectRetargetedSymbols(allRetargets);
return allRetargets;