mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-24 18:00:54 +00:00
Updated spirv-tools.
This commit is contained in:
24
3rdparty/spirv-tools/source/val/function.cpp
vendored
24
3rdparty/spirv-tools/source/val/function.cpp
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user