Generate correct image operand mask for Offset and ConstOffset(#77)
This commit is contained in:
parent
820a22fcc8
commit
86e608133c
2 changed files with 9 additions and 1 deletions
|
|
@ -136,6 +136,11 @@ public:
|
|||
bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampler; }
|
||||
bool isSampledImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampledImage; }
|
||||
|
||||
bool isConstant(Id resultId) const
|
||||
{
|
||||
Op opCode = getOpCode(resultId);
|
||||
return opCode == OpConstantTrue || opCode == OpConstantFalse || opCode == OpConstant || opCode == OpConstantComposite || opCode == OpConstantNull;
|
||||
}
|
||||
bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
|
||||
unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue