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

Function IsValid

source/fuzz/fuzzer_util.cpp:484–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484bool IsValid(const opt::IRContext* context,
485 spv_validator_options validator_options,
486 MessageConsumer consumer) {
487 std::vector<uint32_t> binary;
488 context->module()->ToBinary(&binary, false);
489 SpirvTools tools(context->grammar().target_env());
490 tools.SetMessageConsumer(std::move(consumer));
491 return tools.Validate(binary.data(), binary.size(), validator_options);
492}
493
494bool IsValidAndWellFormed(const opt::IRContext* ir_context,
495 spv_validator_options validator_options,

Callers 4

ApplyMethod · 0.85
IsApplicableMethod · 0.85
IsApplicableMethod · 0.85
IsValidAndWellFormedFunction · 0.85

Calls 7

target_envMethod · 0.80
ToBinaryMethod · 0.45
moduleMethod · 0.45
SetMessageConsumerMethod · 0.45
ValidateMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

IsApplicableMethod · 0.68