Permalink
Browse files

Merge pull request #7359 from stenzek/intel-d3d-crash

PixelShaderGen: Ensure all components of ocol1 are initialized
  • Loading branch information...
delroth committed Aug 27, 2018
2 parents eef4799 + bae1168 commit db55c36f0920f318dee5a2f98471c1fd21e5e3b4
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -1406,13 +1406,13 @@ static void WriteColor(ShaderCode& out, APIType api_type, const pixel_shader_uid
// Use dual-source color blending to perform dst alpha in a single pass
if (use_dual_source)
out.Write("\tocol1.a = float(prev.a) / 255.0;\n");
out.Write("\tocol1 = float4(0.0, 0.0, 0.0, float(prev.a) / 255.0);\n");
}
else
{
out.Write("\tocol0.a = float(prev.a >> 2) / 63.0;\n");
if (use_dual_source)
out.Write("\tocol1.a = float(prev.a) / 255.0;\n");
out.Write("\tocol1 = float4(0.0, 0.0, 0.0, float(prev.a) / 255.0);\n");
}
}

0 comments on commit db55c36

Please sign in to comment.