mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-09-19 14:19:59 +00:00
Merge pull request #2089 from warmenhoven/patch-1
Win10 doesn't like std::max
This commit is contained in:
commit
4be568c004
@ -2364,7 +2364,7 @@ bool CompilerMSL::add_component_variable_to_interface_block(spv::StorageClass st
|
||||
if (pad_fragment_output)
|
||||
{
|
||||
uint32_t locn = get_decoration(var.self, DecorationLocation);
|
||||
num_components = std::max(num_components, get_target_components_for_fragment_location(locn));
|
||||
num_components = max<uint32_t>(num_components, get_target_components_for_fragment_location(locn));
|
||||
}
|
||||
|
||||
// We have already declared an IO block member as m_location_N.
|
||||
@ -3846,7 +3846,7 @@ uint32_t CompilerMSL::add_interface_block(StorageClass storage, bool patch)
|
||||
for (uint32_t location_offset = 0; location_offset < array_size; location_offset++)
|
||||
{
|
||||
auto &location_meta = meta.location_meta[location + location_offset];
|
||||
location_meta.num_components = std::max(location_meta.num_components, component + type.vecsize);
|
||||
location_meta.num_components = max<uint32_t>(location_meta.num_components, component + type.vecsize);
|
||||
|
||||
// For variables sharing location, decorations and base type must match.
|
||||
location_meta.base_type_id = type.self;
|
||||
@ -7206,7 +7206,7 @@ static string inject_top_level_storage_qualifier(const string &expr, const strin
|
||||
else if (last_pointer == string::npos)
|
||||
last_significant = last_reference;
|
||||
else
|
||||
last_significant = std::max(last_reference, last_pointer);
|
||||
last_significant = max<size_t>(last_reference, last_pointer);
|
||||
|
||||
if (last_significant == string::npos)
|
||||
return join(qualifier, " ", expr);
|
||||
|
Loading…
Reference in New Issue
Block a user