Function spirv_tools_sys::val::validate

source ·
pub unsafe extern "C" fn validate(
    tool: *const ToolContext,
    binary: *const Binary,
    diagnostic: *mut *mut Diagnostic
) -> SpirvResult
Expand description

Validates a SPIR-V binary for correctness. 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.