From d1dd910f1743d579ede07418508688f586b165c2 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 27 Dec 2016 12:59:52 +1000 Subject: [PATCH] Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel --- Source/Core/VideoBackends/Vulkan/Renderer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index 9c558aa9f9..4097b31ab6 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -345,9 +345,10 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha bpmem.zcontrol.pixel_format == PEControl::RGB8_Z24 || bpmem.zcontrol.pixel_format == PEControl::Z24) { - // Force alpha writes, and set the color to 0xFF. + // Force alpha writes, and clear the alpha channel. This is different to the other backends, + // where the existing values of the alpha channel are preserved. alpha_enable = true; - color |= 0xFF000000; + color &= 0x00FFFFFF; } // Convert RGBA8 -> floating-point values.