MCPcopy Create free account
hub / github.com/InoriRus/Kyty / spvOpcodeString

Function spvOpcodeString

source/3rdparty/vulkan/source/opcode.cpp:186–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186const char* spvOpcodeString(const uint32_t opcode) {
187 const auto beg = kOpcodeTableEntries;
188 const auto end = kOpcodeTableEntries + ARRAY_SIZE(kOpcodeTableEntries);
189 spv_opcode_desc_t needle = {"", static_cast<SpvOp>(opcode),
190 0, nullptr,
191 0, {},
192 false, false,
193 0, nullptr,
194 ~0u, ~0u};
195 auto comp = [](const spv_opcode_desc_t& lhs, const spv_opcode_desc_t& rhs) {
196 return lhs.opcode < rhs.opcode;
197 };
198 auto it = std::lower_bound(beg, end, needle, comp);
199 if (it != end && it->opcode == opcode) {
200 return it->name;
201 }
202
203 assert(0 && "Unreachable!");
204 return "unknown";
205}
206
207int32_t spvOpcodeIsScalarType(const SpvOp opcode) {
208 switch (opcode) {

Callers 15

HandleInstructionMethod · 0.85
ValidateUniquenessFunction · 0.85
ValidateTypeVectorFunction · 0.85
ValidateImageOperandsFunction · 0.85
ValidateSampledImageFunction · 0.85
ValidateImageReadFunction · 0.85
ImagePassFunction · 0.85
CapabilityCheckFunction · 0.85
VersionCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected