Remove redundant constructor calls for scalar types
This commit is contained in:
parent
ed04c95b08
commit
32a561a6c3
@ -14,6 +14,6 @@ void main()
|
||||
oB = vec4(UBO[4].y, UBO[5].y, UBO[6].y, UBO[7].y);
|
||||
oC = UBO[9];
|
||||
oD = vec4(UBO[10].x, UBO[11].x, UBO[12].x, UBO[13].x);
|
||||
oE = vec4(UBO[1].z, float(UBO[6].y), UBO[9].z, float(UBO[12].y));
|
||||
oE = vec4(UBO[1].z, UBO[6].y, UBO[9].z, UBO[12].y);
|
||||
}
|
||||
|
||||
|
@ -3418,8 +3418,11 @@ std::string CompilerGLSL::flattened_access_chain_vector(uint32_t base, const uin
|
||||
{
|
||||
std::string expr;
|
||||
|
||||
expr += type_to_glsl_constructor(target_type);
|
||||
expr += "(";
|
||||
if (target_type.vecsize > 1)
|
||||
{
|
||||
expr += type_to_glsl_constructor(target_type);
|
||||
expr += "(";
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < target_type.vecsize; ++i)
|
||||
{
|
||||
@ -3440,7 +3443,10 @@ std::string CompilerGLSL::flattened_access_chain_vector(uint32_t base, const uin
|
||||
expr += vector_swizzle(1, index % 4);
|
||||
}
|
||||
|
||||
expr += ")";
|
||||
if (target_type.vecsize > 1)
|
||||
{
|
||||
expr += ")";
|
||||
}
|
||||
|
||||
return expr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user