Use initializer list for composite initializations if backend.use_initializer_list is on.
This commit is contained in:
Родитель
bcaa1f0e3c
Коммит
ba1e415a9c
|
@ -5485,6 +5485,7 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
|
|||
{
|
||||
// Only use this path if we are building composites.
|
||||
// This path cannot be used for arithmetic.
|
||||
constructor_op += type_to_glsl_constructor(get<SPIRType>(result_type));
|
||||
constructor_op += "{ ";
|
||||
if (splat)
|
||||
constructor_op += to_expression(elems[0]);
|
||||
|
|
|
@ -68,6 +68,7 @@ string CompilerMSL::compile()
|
|||
backend.discard_literal = "discard_fragment()";
|
||||
backend.swizzle_is_function = false;
|
||||
backend.shared_is_implied = false;
|
||||
backend.use_initializer_list = true;
|
||||
backend.native_row_major_matrix = false;
|
||||
backend.flexible_member_array_supported = false;
|
||||
backend.force_temp_use_for_two_vector_shuffles = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче