MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / spvOpcodeIsConstant

Function spvOpcodeIsConstant

source/opcode.cpp:133–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133int32_t spvOpcodeIsConstant(const spv::Op opcode) {
134 switch (opcode) {
135 case spv::Op::OpConstantTrue:
136 case spv::Op::OpConstantFalse:
137 case spv::Op::OpConstant:
138 case spv::Op::OpConstantComposite:
139 case spv::Op::OpConstantCompositeReplicateEXT:
140 case spv::Op::OpConstantSampler:
141 case spv::Op::OpConstantNull:
142 case spv::Op::OpConstantFunctionPointerINTEL:
143 case spv::Op::OpConstantStringAMDX:
144 case spv::Op::OpSpecConstantTrue:
145 case spv::Op::OpSpecConstantFalse:
146 case spv::Op::OpSpecConstant:
147 case spv::Op::OpSpecConstantComposite:
148 case spv::Op::OpSpecConstantCompositeReplicateEXT:
149 case spv::Op::OpSpecConstantOp:
150 case spv::Op::OpSpecConstantStringAMDX:
151 case spv::Op::OpGraphConstantARM:
152 case spv::Op::OpAsmTargetINTEL:
153 case spv::Op::OpAsmINTEL:
154 case spv::Op::OpSpecConstantArchitectureINTEL:
155 case spv::Op::OpSpecConstantTargetINTEL:
156 case spv::Op::OpSpecConstantCapabilitiesINTEL:
157 case spv::Op::OpConstantSizeOfEXT:
158 case spv::Op::OpConstantDataKHR:
159 case spv::Op::OpSpecConstantDataKHR:
160 return true;
161 default:
162 return false;
163 }
164}
165
166bool spvOpcodeIsConstantOrUndef(const spv::Op opcode) {
167 return opcode == spv::Op::OpUndef || spvOpcodeIsConstant(opcode);

Callers 15

MatchConstantsMethod · 0.85
ValidateTypeVectorIdEXTFunction · 0.85
ValidateTypeArrayFunction · 0.85
ValidateTypeTensorARMFunction · 0.85
ValidateImageOperandsFunction · 0.85
ValidateImageGatherFunction · 0.85
ValidateMemorySemanticsFunction · 0.85
InstructionLayoutSectionFunction · 0.85
IsArrayTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected