• Home
  • Raw
  • Download

Lines Matching refs:vstate

156     spv_diagnostic* pDiagnostic, ValidationState_t* vstate) {  in ValidateBinaryUsingContextAndValidationState()  argument
185 if (header.bound > vstate->options()->universal_limits_.max_id_bound) { in ValidateBinaryUsingContextAndValidationState()
189 << vstate->options()->universal_limits_.max_id_bound << "."; in ValidateBinaryUsingContextAndValidationState()
199 spvBinaryParse(&hijacked_context, vstate, words, num_words, in ValidateBinaryUsingContextAndValidationState()
205 if (auto error = spvBinaryParse(&context, vstate, words, num_words, in ValidateBinaryUsingContextAndValidationState()
212 for (auto& instruction : vstate->ordered_instructions()) { in ValidateBinaryUsingContextAndValidationState()
232 vstate->RegisterEntryPoint(entry_point, execution_model, in ValidateBinaryUsingContextAndValidationState()
245 return vstate->diag(SPV_ERROR_INVALID_DATA, inst) in ValidateBinaryUsingContextAndValidationState()
254 if (!vstate->in_function_body()) { in ValidateBinaryUsingContextAndValidationState()
255 return vstate->diag(SPV_ERROR_INVALID_LAYOUT, &instruction) in ValidateBinaryUsingContextAndValidationState()
260 vstate->AddFunctionCallTarget(called_id); in ValidateBinaryUsingContextAndValidationState()
263 if (vstate->in_function_body()) { in ValidateBinaryUsingContextAndValidationState()
264 inst->set_function(&(vstate->current_function())); in ValidateBinaryUsingContextAndValidationState()
265 inst->set_block(vstate->current_function().current_block()); in ValidateBinaryUsingContextAndValidationState()
267 if (vstate->in_block() && spvOpcodeIsBlockTerminator(inst->opcode())) { in ValidateBinaryUsingContextAndValidationState()
268 vstate->current_function().current_block()->set_terminator(inst); in ValidateBinaryUsingContextAndValidationState()
272 if (auto error = IdPass(*vstate, inst)) return error; in ValidateBinaryUsingContextAndValidationState()
275 if (auto error = CapabilityPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
276 if (auto error = ModuleLayoutPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
277 if (auto error = CfgPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
278 if (auto error = InstructionPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
283 vstate->RegisterInstruction(inst); in ValidateBinaryUsingContextAndValidationState()
285 vstate->RegisterForwardPointer(inst->GetOperandAs<uint32_t>(0)); in ValidateBinaryUsingContextAndValidationState()
290 if (!vstate->has_memory_model_specified()) in ValidateBinaryUsingContextAndValidationState()
291 return vstate->diag(SPV_ERROR_INVALID_LAYOUT, nullptr) in ValidateBinaryUsingContextAndValidationState()
294 if (vstate->in_function_body()) in ValidateBinaryUsingContextAndValidationState()
295 return vstate->diag(SPV_ERROR_INVALID_LAYOUT, nullptr) in ValidateBinaryUsingContextAndValidationState()
299 if (auto error = ValidateForwardDecls(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
303 ReachabilityPass(*vstate); in ValidateBinaryUsingContextAndValidationState()
313 for (size_t i = 0; i < vstate->ordered_instructions().size(); ++i) { in ValidateBinaryUsingContextAndValidationState()
314 auto& instruction = vstate->ordered_instructions()[i]; in ValidateBinaryUsingContextAndValidationState()
315 if (auto error = UpdateIdUse(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
319 for (size_t i = 0; i < vstate->ordered_instructions().size(); ++i) { in ValidateBinaryUsingContextAndValidationState()
320 auto& instruction = vstate->ordered_instructions()[i]; in ValidateBinaryUsingContextAndValidationState()
324 if (auto error = MiscPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
325 if (auto error = DebugPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
326 if (auto error = AnnotationPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
327 if (auto error = ExtensionPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
328 if (auto error = ModeSettingPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
329 if (auto error = TypePass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
330 if (auto error = ConstantPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
331 if (auto error = MemoryPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
332 if (auto error = FunctionPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
333 if (auto error = ImagePass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
334 if (auto error = ConversionPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
335 if (auto error = CompositesPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
336 if (auto error = ArithmeticsPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
337 if (auto error = BitwisePass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
338 if (auto error = LogicalsPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
339 if (auto error = ControlFlowPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
340 if (auto error = DerivativesPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
341 if (auto error = AtomicsPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
342 if (auto error = PrimitivesPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
343 if (auto error = BarriersPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
347 if (auto error = NonUniformPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
349 if (auto error = LiteralsPass(*vstate, &instruction)) return error; in ValidateBinaryUsingContextAndValidationState()
354 if (auto error = ValidateAdjacency(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
356 if (auto error = ValidateEntryPoints(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
359 if (auto error = PerformCfgChecks(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
360 if (auto error = CheckIdDefinitionDominateUse(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
361 if (auto error = ValidateDecorations(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
362 if (auto error = ValidateInterfaces(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
365 if (auto error = ValidateBuiltIns(*vstate)) return error; in ValidateBinaryUsingContextAndValidationState()
368 for (const auto& inst : vstate->ordered_instructions()) { in ValidateBinaryUsingContextAndValidationState()
369 if (auto error = ValidateExecutionLimitations(*vstate, &inst)) return error; in ValidateBinaryUsingContextAndValidationState()
370 if (auto error = ValidateSmallTypeUses(*vstate, &inst)) return error; in ValidateBinaryUsingContextAndValidationState()
381 std::unique_ptr<ValidationState_t>* vstate) { in ValidateBinaryAndKeepValidationState() argument
388 vstate->reset(new ValidationState_t(&hijack_context, options, words, in ValidateBinaryAndKeepValidationState()
392 hijack_context, words, num_words, pDiagnostic, vstate->get()); in ValidateBinaryAndKeepValidationState()
418 spvtools::val::ValidationState_t vstate(&hijack_context, default_options, in spvValidateBinary() local
424 hijack_context, words, num_words, pDiagnostic, &vstate); in spvValidateBinary()
441 spvtools::val::ValidationState_t vstate(&hijack_context, options, in spvValidateWithOptions() local
446 hijack_context, binary->code, binary->wordCount, pDiagnostic, &vstate); in spvValidateWithOptions()