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

Function ValidateBinaryAndKeepValidationState

source/val/validate.cpp:442–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440} // namespace
441
442spv_result_t ValidateBinaryAndKeepValidationState(
443 const spv_const_context context, spv_const_validator_options options,
444 const uint32_t* words, const size_t num_words, spv_diagnostic* pDiagnostic,
445 std::unique_ptr<ValidationState_t>* vstate) {
446 spv_context_t hijack_context = *context;
447 if (pDiagnostic) {
448 *pDiagnostic = nullptr;
449 UseDiagnosticAsMessageConsumer(&hijack_context, pDiagnostic);
450 }
451
452 vstate->reset(new ValidationState_t(&hijack_context, options, words,
453 num_words, kDefaultMaxNumOfWarnings));
454
455 return ValidateBinaryUsingContextAndValidationState(
456 hijack_context, words, num_words, pDiagnostic, vstate->get());
457}
458
459} // namespace val
460} // namespace spvtools

Callers 1

Calls 4

resetMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected