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

Function spvBinaryParseWithOptions

source/binary.cpp:954–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952}
953
954spv_result_t spvBinaryParseWithOptions(
955 const spv_const_context context, void* user_data, const uint32_t* code,
956 const size_t num_words, spv_parsed_header_fn_t parsed_header,
957 spv_parsed_instruction_fn_t parsed_instruction, spv_diagnostic* diagnostic,
958 uint32_t options) {
959 spv_context_t hijack_context = *context;
960 if (diagnostic) {
961 *diagnostic = nullptr;
962 spvtools::UseDiagnosticAsMessageConsumer(&hijack_context, diagnostic);
963 }
964 Parser parser(&hijack_context, user_data, parsed_header, parsed_instruction);
965 if (options & SPV_BINARY_TO_TEXT_OPTION_HANDLE_UNKNOWN_OPCODES) {
966 parser.SetHandleUnknownOpcodes(true);
967 }
968 return parser.parse(code, num_words, diagnostic);
969}
970
971// TODO(dneto): This probably belongs in text.cpp since that's the only place
972// that a spv_binary_t value is created.

Callers 5

spvBinaryParseFunction · 0.85
FriendlyNameMapperMethod · 0.85
spvBinaryToTextFunction · 0.85
TEST_FFunction · 0.85

Calls 3

parseMethod · 0.45

Tested by 1

TEST_FFunction · 0.68