Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2019-06-06 22:02:38 -07:00
parent 6eb0c7e224
commit 77823a3ff9
180 changed files with 16816 additions and 25402 deletions

View File

@@ -389,5 +389,29 @@ bool Function::IsCompatibleWithExecutionModel(SpvExecutionModel model,
return return_value;
}
bool Function::CheckLimitations(const ValidationState_t& _,
const Function* entry_point,
std::string* reason) const {
bool return_value = true;
std::stringstream ss_reason;
for (const auto& is_compatible : limitations_) {
std::string message;
if (!is_compatible(_, entry_point, &message)) {
if (!reason) return false;
return_value = false;
if (!message.empty()) {
ss_reason << message << "\n";
}
}
}
if (!return_value && reason) {
*reason = ss_reason.str();
}
return return_value;
}
} // namespace val
} // namespace spvtools