PixelShaderGen/UberShaderPixel: Silence -Wmissing-braces warnings

This commit is contained in:
Lioncash 2018-03-23 10:03:31 -04:00
parent e88cc33a29
commit a52cc8d52b
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7
2 changed files with 16 additions and 16 deletions

View File

@ -1420,7 +1420,7 @@ static void WriteBlend(ShaderCode& out, const pixel_shader_uid_data* uid_data)
{ {
if (uid_data->blend_enable) if (uid_data->blend_enable)
{ {
static const std::array<const char*, 8> blendSrcFactor = { static const std::array<const char*, 8> blendSrcFactor{{
"float3(0,0,0);", // ZERO "float3(0,0,0);", // ZERO
"float3(1,1,1);", // ONE "float3(1,1,1);", // ONE
"initial_ocol0.rgb;", // DSTCLR "initial_ocol0.rgb;", // DSTCLR
@ -1429,8 +1429,8 @@ static void WriteBlend(ShaderCode& out, const pixel_shader_uid_data* uid_data)
"float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA "float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA
"initial_ocol0.aaa;", // DSTALPHA "initial_ocol0.aaa;", // DSTALPHA
"float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA "float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendSrcFactorAlpha = { static const std::array<const char*, 8> blendSrcFactorAlpha{{
"0.0;", // ZERO "0.0;", // ZERO
"1.0;", // ONE "1.0;", // ONE
"initial_ocol0.a;", // DSTCLR "initial_ocol0.a;", // DSTCLR
@ -1439,8 +1439,8 @@ static void WriteBlend(ShaderCode& out, const pixel_shader_uid_data* uid_data)
"1.0 - ocol1.a;", // INVSRCALPHA "1.0 - ocol1.a;", // INVSRCALPHA
"initial_ocol0.a;", // DSTALPHA "initial_ocol0.a;", // DSTALPHA
"1.0 - initial_ocol0.a;", // INVDSTALPHA "1.0 - initial_ocol0.a;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendDstFactor = { static const std::array<const char*, 8> blendDstFactor{{
"float3(0,0,0);", // ZERO "float3(0,0,0);", // ZERO
"float3(1,1,1);", // ONE "float3(1,1,1);", // ONE
"ocol0.rgb;", // SRCCLR "ocol0.rgb;", // SRCCLR
@ -1449,8 +1449,8 @@ static void WriteBlend(ShaderCode& out, const pixel_shader_uid_data* uid_data)
"float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA "float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA
"initial_ocol0.aaa;", // DSTALPHA "initial_ocol0.aaa;", // DSTALPHA
"float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA "float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendDstFactorAlpha = { static const std::array<const char*, 8> blendDstFactorAlpha{{
"0.0;", // ZERO "0.0;", // ZERO
"1.0;", // ONE "1.0;", // ONE
"ocol0.a;", // SRCCLR "ocol0.a;", // SRCCLR
@ -1459,7 +1459,7 @@ static void WriteBlend(ShaderCode& out, const pixel_shader_uid_data* uid_data)
"1.0 - ocol1.a;", // INVSRCALPHA "1.0 - ocol1.a;", // INVSRCALPHA
"initial_ocol0.a;", // DSTALPHA "initial_ocol0.a;", // DSTALPHA
"1.0 - initial_ocol0.a;", // INVDSTALPHA "1.0 - initial_ocol0.a;", // INVDSTALPHA
}; }};
out.Write("\tfloat4 blend_src;\n"); out.Write("\tfloat4 blend_src;\n");
out.Write("\tblend_src.rgb = %s\n", blendSrcFactor[uid_data->blend_src_factor]); out.Write("\tblend_src.rgb = %s\n", blendSrcFactor[uid_data->blend_src_factor]);
out.Write("\tblend_src.a = %s\n", blendSrcFactorAlpha[uid_data->blend_src_factor_alpha]); out.Write("\tblend_src.a = %s\n", blendSrcFactorAlpha[uid_data->blend_src_factor_alpha]);

View File

@ -1255,7 +1255,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
if (use_shader_blend) if (use_shader_blend)
{ {
static const std::array<const char*, 8> blendSrcFactor = { static const std::array<const char*, 8> blendSrcFactor{{
"float3(0,0,0);", // ZERO "float3(0,0,0);", // ZERO
"float3(1,1,1);", // ONE "float3(1,1,1);", // ONE
"initial_ocol0.rgb;", // DSTCLR "initial_ocol0.rgb;", // DSTCLR
@ -1264,8 +1264,8 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
"float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA "float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA
"initial_ocol0.aaa;", // DSTALPHA "initial_ocol0.aaa;", // DSTALPHA
"float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA "float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendSrcFactorAlpha = { static const std::array<const char*, 8> blendSrcFactorAlpha{{
"0.0;", // ZERO "0.0;", // ZERO
"1.0;", // ONE "1.0;", // ONE
"initial_ocol0.a;", // DSTCLR "initial_ocol0.a;", // DSTCLR
@ -1274,8 +1274,8 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
"1.0 - ocol1.a;", // INVSRCALPHA "1.0 - ocol1.a;", // INVSRCALPHA
"initial_ocol0.a;", // DSTALPHA "initial_ocol0.a;", // DSTALPHA
"1.0 - initial_ocol0.a;", // INVDSTALPHA "1.0 - initial_ocol0.a;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendDstFactor = { static const std::array<const char*, 8> blendDstFactor{{
"float3(0,0,0);", // ZERO "float3(0,0,0);", // ZERO
"float3(1,1,1);", // ONE "float3(1,1,1);", // ONE
"ocol0.rgb;", // SRCCLR "ocol0.rgb;", // SRCCLR
@ -1284,8 +1284,8 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
"float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA "float3(1,1,1) - ocol1.aaa;", // INVSRCALPHA
"initial_ocol0.aaa;", // DSTALPHA "initial_ocol0.aaa;", // DSTALPHA
"float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA "float3(1,1,1) - initial_ocol0.aaa;", // INVDSTALPHA
}; }};
static const std::array<const char*, 8> blendDstFactorAlpha = { static const std::array<const char*, 8> blendDstFactorAlpha{{
"0.0;", // ZERO "0.0;", // ZERO
"1.0;", // ONE "1.0;", // ONE
"ocol0.a;", // SRCCLR "ocol0.a;", // SRCCLR
@ -1294,7 +1294,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
"1.0 - ocol1.a;", // INVSRCALPHA "1.0 - ocol1.a;", // INVSRCALPHA
"initial_ocol0.a;", // DSTALPHA "initial_ocol0.a;", // DSTALPHA
"1.0 - initial_ocol0.a;", // INVDSTALPHA "1.0 - initial_ocol0.a;", // INVDSTALPHA
}; }};
out.Write(" if (blend_enable) {\n" out.Write(" if (blend_enable) {\n"
" float4 blend_src;\n" " float4 blend_src;\n"