Returns a SPIR-V module header for a module with the given ID bound.
| 38 | |
| 39 | // Returns a SPIR-V module header for a module with the given ID bound. |
| 40 | std::vector<uint32_t> MakeHeader(uint32_t id_bound) { |
| 41 | return {spv::MagicNumber, 0x00010000u, |
| 42 | SPV_GENERATOR_WORD(SPV_GENERATOR_KHRONOS_ASSEMBLER, 0), id_bound, 0u}; |
| 43 | } |
| 44 | |
| 45 | // Returns the packed first word of a SPIR-V instruction. |
| 46 | uint32_t MakeFirstWord(uint32_t word_count, uint32_t opcode) { |