Run format_all.sh.
This commit is contained in:
parent
8e90382675
commit
719cf9d42f
@ -1252,7 +1252,6 @@ static inline bool type_is_floating_point(const SPIRType &type)
|
||||
{
|
||||
return type.basetype == SPIRType::Half || type.basetype == SPIRType::Float || type.basetype == SPIRType::Double;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -3942,7 +3942,8 @@ bool Compiler::get_common_basic_type(const SPIRType &type, SPIRType::BaseType &b
|
||||
}
|
||||
}
|
||||
|
||||
void Compiler::ActiveBuiltinHandler::handle_builtin(const SPIRType &type, BuiltIn builtin, const Bitset &decoration_flags)
|
||||
void Compiler::ActiveBuiltinHandler::handle_builtin(const SPIRType &type, BuiltIn builtin,
|
||||
const Bitset &decoration_flags)
|
||||
{
|
||||
// If used, we will need to explicitly declare a new array size for these builtins.
|
||||
|
||||
|
@ -883,7 +883,8 @@ uint32_t CompilerGLSL::type_to_packed_base_size(const SPIRType &type, BufferPack
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t CompilerGLSL::type_to_packed_alignment(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing)
|
||||
uint32_t CompilerGLSL::type_to_packed_alignment(const SPIRType &type, const Bitset &flags,
|
||||
BufferPackingStandard packing)
|
||||
{
|
||||
if (!type.array.empty())
|
||||
{
|
||||
@ -971,7 +972,8 @@ uint32_t CompilerGLSL::type_to_packed_alignment(const SPIRType &type, const Bits
|
||||
SPIRV_CROSS_THROW("Did not find suitable rule for type. Bogus decorations?");
|
||||
}
|
||||
|
||||
uint32_t CompilerGLSL::type_to_packed_array_stride(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing)
|
||||
uint32_t CompilerGLSL::type_to_packed_array_stride(const SPIRType &type, const Bitset &flags,
|
||||
BufferPackingStandard packing)
|
||||
{
|
||||
// Array stride is equal to aligned size of the underlying type.
|
||||
uint32_t parent = type.parent_type;
|
||||
@ -1914,11 +1916,9 @@ void CompilerGLSL::emit_declared_builtin_block(StorageClass storage, ExecutionMo
|
||||
block_var = &var;
|
||||
}
|
||||
|
||||
global_builtins = Bitset(global_builtins.get_lower() &
|
||||
((1ull << BuiltInPosition) |
|
||||
(1ull << BuiltInPointSize) |
|
||||
(1ull << BuiltInClipDistance) |
|
||||
(1ull << BuiltInCullDistance)));
|
||||
global_builtins =
|
||||
Bitset(global_builtins.get_lower() & ((1ull << BuiltInPosition) | (1ull << BuiltInPointSize) |
|
||||
(1ull << BuiltInClipDistance) | (1ull << BuiltInCullDistance)));
|
||||
|
||||
// Try to collect all other declared builtins.
|
||||
if (!emitted_block)
|
||||
|
@ -611,16 +611,14 @@ uint32_t CompilerMSL::add_interface_block(StorageClass storage)
|
||||
else if (!is_builtin || has_active_builtin(builtin, storage))
|
||||
{
|
||||
// Arrays of MRT output is not allowed in MSL, so need to handle it specially.
|
||||
if (!is_builtin &&
|
||||
storage == StorageClassOutput &&
|
||||
get_entry_point().model == ExecutionModelFragment &&
|
||||
if (!is_builtin && storage == StorageClassOutput && get_entry_point().model == ExecutionModelFragment &&
|
||||
!type.array.empty())
|
||||
{
|
||||
if (type.array.size() != 1)
|
||||
SPIRV_CROSS_THROW("Cannot emit arrays-of-arrays with MRT.");
|
||||
|
||||
uint32_t num_mrts =
|
||||
type.array_size_literal.back() ? type.array.back() : get<SPIRConstant>(type.array.back()).scalar();
|
||||
uint32_t num_mrts = type.array_size_literal.back() ? type.array.back() :
|
||||
get<SPIRConstant>(type.array.back()).scalar();
|
||||
|
||||
auto *no_array_type = &type;
|
||||
while (!no_array_type->array.empty())
|
||||
@ -648,7 +646,8 @@ uint32_t CompilerMSL::add_interface_block(StorageClass storage)
|
||||
}
|
||||
|
||||
// Lower the internal array to flattened output when entry point returns.
|
||||
entry_func.fixup_statements.push_back(join(ib_var_ref, ".", mbr_name, " = ", to_name(p_var->self), "[", i, "];"));
|
||||
entry_func.fixup_statements.push_back(
|
||||
join(ib_var_ref, ".", mbr_name, " = ", to_name(p_var->self), "[", i, "];"));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2939,9 +2938,8 @@ string CompilerMSL::func_type_decl(SPIRType &type)
|
||||
entry_type = "vertex";
|
||||
break;
|
||||
case ExecutionModelFragment:
|
||||
entry_type = execution.flags.get(ExecutionModeEarlyFragmentTests) ?
|
||||
"fragment [[ early_fragment_tests ]]" :
|
||||
"fragment";
|
||||
entry_type =
|
||||
execution.flags.get(ExecutionModeEarlyFragmentTests) ? "fragment [[ early_fragment_tests ]]" : "fragment";
|
||||
break;
|
||||
case ExecutionModelGLCompute:
|
||||
case ExecutionModelKernel:
|
||||
|
Loading…
Reference in New Issue
Block a user