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

Method CheckLimitations

source/val/function.cpp:410–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410bool Function::CheckLimitations(const ValidationState_t& _,
411 const Function* entry_point,
412 std::string* reason) const {
413 bool return_value = true;
414 std::stringstream ss_reason;
415
416 for (const auto& is_compatible : limitations_) {
417 std::string message;
418 if (!is_compatible(_, entry_point, &message)) {
419 if (!reason) return false;
420 return_value = false;
421 if (!message.empty()) {
422 ss_reason << message << "\n";
423 }
424 }
425 }
426
427 if (!return_value && reason) {
428 *reason = ss_reason.str();
429 }
430
431 return return_value;
432}
433
434} // namespace val
435} // namespace spvtools

Callers 1

Calls 2

emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected