Splat even less in HLSL

This commit is contained in:
Robert Konrad 2016-10-05 19:18:04 +02:00
parent 451bdeeeff
commit beebcbd1aa

View File

@ -3036,7 +3036,7 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
// Only splat if we have vector constructors.
// Arrays and structs must be initialized properly in full.
bool composite = !out_type.array.empty() || out_type.basetype == SPIRType::Struct;
bool splat = in_type.vecsize == 1 && in_type.columns == 1 && !composite;
bool splat = in_type.vecsize == 1 && in_type.columns == 1 && !composite && backend.use_constructor_splatting;
if (splat)
{