Lines Matching refs:binary

17 #include "source/binary.h"
38 spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
41 if (!binary->code) return SPV_ERROR_INVALID_BINARY;
42 if (binary->wordCount < SPV_INDEX_INSTRUCTION)
47 pHeader->magic = spvFixWord(binary->code[SPV_INDEX_MAGIC_NUMBER], endian);
48 pHeader->version = spvFixWord(binary->code[SPV_INDEX_VERSION_NUMBER], endian);
58 spvFixWord(binary->code[SPV_INDEX_GENERATOR_NUMBER], endian);
59 pHeader->bound = spvFixWord(binary->code[SPV_INDEX_BOUND], endian);
60 pHeader->schema = spvFixWord(binary->code[SPV_INDEX_SCHEMA], endian);
61 pHeader->instructions = &binary->code[SPV_INDEX_INSTRUCTION];
77 // A SPIR-V binary parser. A parser instance communicates detailed parse
91 // Parses the specified binary SPIR-V module, issuing callbacks on a parsed
103 // Parses an instruction at the current position of the binary. Assumes
112 // starting at inst_offset words into the SPIR-V binary.
113 // If the SPIR-V binary is the same endianness as the host, then the
152 // The default failure for parsing is invalid binary.
194 // The state used to parse a single SPIR-V binary module.
212 const uint32_t* words; // Words in the binary SPIR-V module.
217 spv_endianness_t endian; // The endianness of the binary.
218 // Is the SPIR-V binary in a different endianness from the host native
259 spv_const_binary_t binary{_.words, _.num_words};
260 if (spvBinaryEndianness(&binary, &_.endian)) {
268 if (spvBinaryHeaderGet(&binary, _.endian, &header)) {
395 // If no conversion is required, then just point to the underlying binary.
852 void spvBinaryDestroy(spv_binary binary) {
853 if (binary) {
854 if (binary->code) delete[] binary->code;
855 delete binary;