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

Function spvGeneratorStr

source/opcode.cpp:51–57  ·  view source on GitHub ↗

TODO(dneto): Move this to another file. It doesn't belong with opcode processing.

Source from the content-addressed store, hash-verified

49// TODO(dneto): Move this to another file. It doesn't belong with opcode
50// processing.
51const char* spvGeneratorStr(uint32_t generator) {
52 auto where = std::find_if(
53 std::begin(vendor_tools), std::end(vendor_tools),
54 [generator](const VendorTool& vt) { return generator == vt.value; });
55 if (where != std::end(vendor_tools)) return where->vendor_tool;
56 return "Unknown";
57}
58
59uint32_t spvOpcodeMake(uint16_t wordCount, spv::Op opcode) {
60 return ((uint32_t)opcode) | (((uint32_t)wordCount) << 16);

Callers 2

EmitHeaderGeneratorMethod · 0.85
TEST_PFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_PFunction · 0.68