Inline all non-entry-point functions

This commit is contained in:
Thomas Roughton 2019-08-29 17:07:57 +12:00
parent 6338f0aa0f
commit e5f9e2c203

View File

@ -5368,9 +5368,10 @@ void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &)
add_function_overload(func);
local_variable_names = resource_names;
string decl;
processing_entry_point = (func.self == ir.default_entry_point);
string decl = processing_entry_point ? "" : "inline ";
auto &type = get<SPIRType>(func.return_type);
@ -5381,7 +5382,7 @@ void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &)
else
{
// We cannot return arrays in MSL, so "return" through an out variable.
decl = "void";
decl += "void";
}
decl += " ";