summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/Renderer.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-01-02 12:29:36 +0100
committerGitHub <noreply@github.com>2017-01-02 12:29:36 +0100
commit96314a0ec1ebe0fecca61dcd1dac3ddb1bcca78c (patch)
tree57247be7170ecc844ac1f08edc0053c2e2171e6a /Source/Core/VideoBackends/Vulkan/Renderer.cpp
parentb46dcc7768381d1b07570f5b1438a6dd815bc7ed (diff)
parente6249619a0262a0da5827e0c6d26f63fbfcad156 (diff)
Merge pull request #4574 from stenzek/vulkan-alpha-clear
Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/Renderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
index b4e39f3ed0..19f25ad784 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.