Parameters of spirv_decorate_id should accept variables
spirv_decorate_id will generate OpDecorateId. The parameter list should accept variables as part of decorations. This is because OpDecorateId allows this. The spec says: All such <id> Extra Operands must be constant instructions or OpVariable instructions.
This commit is contained in:
parent
adcc7e8163
commit
8ff8b45131
8 changed files with 2257 additions and 2136 deletions
|
|
@ -9449,10 +9449,10 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
std::vector<spv::Id> operandIds;
|
||||
assert(!decorateId.second.empty());
|
||||
for (auto extraOperand : decorateId.second) {
|
||||
if (extraOperand->getQualifier().isSpecConstant())
|
||||
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||
else
|
||||
if (extraOperand->getQualifier().isFrontEndConstant())
|
||||
operandIds.push_back(createSpvConstant(*extraOperand));
|
||||
else
|
||||
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||
}
|
||||
builder.addDecorationId(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue