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

Function MakeHeader

test/handle_unknown_opcodes_test.cpp:40–43  ·  view source on GitHub ↗

Returns a SPIR-V module header for a module with the given ID bound.

Source from the content-addressed store, hash-verified

38
39// Returns a SPIR-V module header for a module with the given ID bound.
40std::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.
46uint32_t MakeFirstWord(uint32_t word_count, uint32_t opcode) {

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected