SPV: Fix missing 'Member' operand to OpArrayLength.
This commit is contained in:
parent
142d7780a4
commit
ee21fc9081
5 changed files with 18 additions and 4 deletions
|
|
@ -890,6 +890,16 @@ Id Builder::createAccessChain(StorageClass storageClass, Id base, std::vector<Id
|
|||
return chain->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::createArrayLength(Id base, unsigned int member)
|
||||
{
|
||||
Instruction* length = new Instruction(getUniqueId(), makeIntType(32), OpArrayLength);
|
||||
length->addIdOperand(base);
|
||||
length->addImmediateOperand(member);
|
||||
buildPoint->addInstruction(length);
|
||||
|
||||
return length->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index)
|
||||
{
|
||||
Instruction* extract = new Instruction(getUniqueId(), typeId, OpCompositeExtract);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue