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

Function spvValidateWithOptions

source/val/validate.cpp:494–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494spv_result_t spvValidateWithOptions(const spv_const_context context,
495 spv_const_validator_options options,
496 const spv_const_binary binary,
497 spv_diagnostic* pDiagnostic) {
498 spv_context_t hijack_context = *context;
499 if (pDiagnostic) {
500 *pDiagnostic = nullptr;
501 spvtools::UseDiagnosticAsMessageConsumer(&hijack_context, pDiagnostic);
502 }
503
504 // Create the ValidationState using the context.
505 spvtools::val::ValidationState_t vstate(&hijack_context, options,
506 binary->code, binary->wordCount,
507 kDefaultMaxNumOfWarnings);
508
509 return spvtools::val::ValidateBinaryUsingContextAndValidationState(
510 hijack_context, binary->code, binary->wordCount, pDiagnostic, &vstate);
511}

Callers 4

ValidateMethod · 0.85
ValidateInstructionsMethod · 0.85
SinglePassRunAndCheckMethod · 0.85

Tested by

no test coverage detected