Updated glslang.

This commit is contained in:
Бранимир Караџић 2023-07-01 08:36:30 -07:00
parent 5bc450408c
commit 0b66150e9b
2 changed files with 10 additions and 3 deletions

View File

@ -1580,7 +1580,12 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()),
glslangIntermediate->getVersion());
if (options.generateDebugInfo) {
if (options.emitNonSemanticShaderDebugSource)
this->options.emitNonSemanticShaderDebugInfo = true;
if (options.emitNonSemanticShaderDebugInfo)
this->options.generateDebugInfo = true;
if (this->options.generateDebugInfo) {
builder.setEmitOpLines();
builder.setSourceFile(glslangIntermediate->getSourceFile());
@ -1607,8 +1612,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.addInclude(iItr->first, iItr->second);
}
builder.setEmitNonSemanticShaderDebugInfo(options.emitNonSemanticShaderDebugInfo);
builder.setEmitNonSemanticShaderDebugSource(options.emitNonSemanticShaderDebugSource);
builder.setEmitNonSemanticShaderDebugInfo(this->options.emitNonSemanticShaderDebugInfo);
builder.setEmitNonSemanticShaderDebugSource(this->options.emitNonSemanticShaderDebugSource);
stdBuiltins = builder.import("GLSL.std.450");

View File

@ -97,6 +97,8 @@ public:
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
virtual ~Instruction() {}
void addIdOperand(Id id) {
// ids can't be 0
assert(id);
operands.push_back(id);
idOperand.push_back(true);
}