spirv_tools_sys::val

Function validate_with_options

Source
pub unsafe extern "C" fn validate_with_options(
    tool: *const ToolContext,
    options: *const ValidatorOptions,
    binary: *const Binary,
    diagnostic: *mut *mut Diagnostic,
) -> SpirvResult
Expand description

Validates a SPIR-V binary for correctness. Uses the provided Validator options. Any errors will be written into *diagnostic if diagnostic is non-null, otherwise the context’s message consumer will be used.

Validate for SPIR-V spec rules for the SPIR-V version named in the binary’s header (at word offset 1). Additionally, if the context target environment is a client API (such as Vulkan 1.1), then validate for that client API version, to the extent that it is verifiable from data in the binary itself, or in the validator options.