#include "source/val/validate.h"
#include <functional>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
#include "source/binary.h"
#include "source/diagnostic.h"
#include "source/enum_string_mapping.h"
#include "source/extensions.h"
#include "source/opcode.h"
#include "source/spirv_constant.h"
#include "source/spirv_endian.h"
#include "source/spirv_target_env.h"
#include "source/val/construct.h"
#include "source/val/instruction.h"
#include "source/val/validation_state.h"
#include "spirv-tools/libspirv.h"
namespace {
static uint32_t kDefaultMaxNumOfWarnings = …;
}
namespace spvtools {
namespace val {
namespace {
void RegisterExtension(ValidationState_t& _,
const spv_parsed_instruction_t* inst) { … }
spv_result_t ProcessExtensions(void* user_data,
const spv_parsed_instruction_t* inst) { … }
spv_result_t ProcessInstruction(void* user_data,
const spv_parsed_instruction_t* inst) { … }
spv_result_t ValidateForwardDecls(ValidationState_t& _) { … }
spv_result_t ValidateEntryPoints(ValidationState_t& _) { … }
spv_result_t ValidateBinaryUsingContextAndValidationState(
const spv_context_t& context, const uint32_t* words, const size_t num_words,
spv_diagnostic* pDiagnostic, ValidationState_t* vstate) { … }
}
spv_result_t ValidateBinaryAndKeepValidationState(
const spv_const_context context, spv_const_validator_options options,
const uint32_t* words, const size_t num_words, spv_diagnostic* pDiagnostic,
std::unique_ptr<ValidationState_t>* vstate) { … }
}
}
spv_result_t spvValidate(const spv_const_context context,
const spv_const_binary binary,
spv_diagnostic* pDiagnostic) { … }
spv_result_t spvValidateBinary(const spv_const_context context,
const uint32_t* words, const size_t num_words,
spv_diagnostic* pDiagnostic) { … }
spv_result_t spvValidateWithOptions(const spv_const_context context,
spv_const_validator_options options,
const spv_const_binary binary,
spv_diagnostic* pDiagnostic) { … }