mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
VideoCommon: Fix D3D shader warning X4000 (uninitialized variables)
Initialize alpha_A and alpha_B. They were previously only initialized in cases where they were used, but D3D isn't able to figure that out.
This commit is contained in:
parent
0fac1d6e87
commit
71541c1324
@ -889,8 +889,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
|
||||
out.Write(
|
||||
" uint alpha_compare_op = alpha_scale << 1 | uint(alpha_op);\n"
|
||||
"\n"
|
||||
" int alpha_A;\n"
|
||||
" int alpha_B;\n"
|
||||
" int alpha_A = 0;\n"
|
||||
" int alpha_B = 0;\n"
|
||||
" if (alpha_bias != 3u || alpha_compare_op > 5u) {{\n"
|
||||
" // Small optimisation here: alpha_A and alpha_B are unused by compare ops 0-5\n"
|
||||
" alpha_A = selectAlphaInput(s, ss, {0}colors_0, {0}colors_1, alpha_a) & 255;\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user