diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-10-29 10:38:23 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-10-29 10:38:23 -0600 |
| commit | bbaf8f9c0ec8d8894a3a72be944f1ccc9f6e1656 (patch) | |
| tree | c46bbaa3745c0a8c5be49eb51d824b0616acb257 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 089e32ba7d7f48993fa0706f7b9f69a12bf7192a (diff) | |
| parent | 6d4867e36a5459b1606809ab9ded18ecbe463fc6 (diff) | |
Merge pull request #1434 from Sonicadvance1/fix-qualcomm
Fixes missing objects on Adreno hardware.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 4ef07dbb10..0f03fc013b 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -943,7 +943,10 @@ static inline void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_T out.SetConstantsUsed(C_ALPHA, C_ALPHA); - out.Write("\tif(!( "); + // This outputted if statement is not like 'if(!(cond))' for a reason. + // Qualcomm's v95 drivers produce incorrect code using logical not + // Checking against false produces the correct code. + out.Write("\tif(( "); uid_data->alpha_test_comp0 = bpmem.alpha_test.comp0; uid_data->alpha_test_comp1 = bpmem.alpha_test.comp1; @@ -958,7 +961,7 @@ static inline void WriteAlphaTest(T& out, pixel_shader_uid_data* uid_data, API_T // Lookup the second component from the alpha function table compindex = bpmem.alpha_test.comp1; out.Write(tevAlphaFuncsTable[compindex], alphaRef[1]); - out.Write(")) {\n"); + out.Write(") == false) {\n"); out.Write("\t\tocol0 = float4(0.0, 0.0, 0.0, 0.0);\n"); if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND) |
