TODO(dneto): Move this to another file. It doesn't belong with opcode processing.
| 49 | // TODO(dneto): Move this to another file. It doesn't belong with opcode |
| 50 | // processing. |
| 51 | const 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 | |
| 59 | uint32_t spvOpcodeMake(uint16_t wordCount, spv::Op opcode) { |
| 60 | return ((uint32_t)opcode) | (((uint32_t)wordCount) << 16); |
no outgoing calls