Format spirv_msl.cpp
This commit is contained in:
parent
5cbed7a69f
commit
7c8db865c4
@ -2720,20 +2720,25 @@ string CompilerMSL::entry_point_args(bool append_comma)
|
||||
{
|
||||
if (type.basetype == SPIRType::SampledImage)
|
||||
{
|
||||
resources.push_back({ &id, to_name(var_id), SPIRType::Image, get_metal_resource_index(var, SPIRType::Image) });
|
||||
resources.push_back(
|
||||
{ &id, to_name(var_id), SPIRType::Image, get_metal_resource_index(var, SPIRType::Image) });
|
||||
|
||||
if (type.image.dim != DimBuffer)
|
||||
resources.push_back({ &id, to_sampler_expression(var_id), SPIRType::Sampler, get_metal_resource_index(var, SPIRType::Sampler) });
|
||||
resources.push_back({ &id, to_sampler_expression(var_id), SPIRType::Sampler,
|
||||
get_metal_resource_index(var, SPIRType::Sampler) });
|
||||
}
|
||||
else
|
||||
{
|
||||
resources.push_back({ &id, to_name(var_id), type.basetype, get_metal_resource_index(var, type.basetype) });
|
||||
resources.push_back(
|
||||
{ &id, to_name(var_id), type.basetype, get_metal_resource_index(var, type.basetype) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(resources.begin(), resources.end(), [](const Resource& lhs, const Resource& rhs) { return tie(lhs.basetype, lhs.index) < tie(rhs.basetype, rhs.index); });
|
||||
std::sort(resources.begin(), resources.end(), [](const Resource &lhs, const Resource &rhs) {
|
||||
return tie(lhs.basetype, lhs.index) < tie(rhs.basetype, rhs.index);
|
||||
});
|
||||
|
||||
for (auto &r : resources)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user