Skip to content

Commit

Permalink
Vulkan: Fix stencil clears to a specific value. Should help #10150
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Nov 17, 2017
1 parent 875f70b commit ac518f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GPU/Vulkan/FramebufferVulkan.cpp
Expand Up @@ -180,7 +180,9 @@ void FramebufferManagerVulkan::NotifyClear(bool clearColor, bool clearAlpha, boo
if (clearAlpha)
mask |= Draw::FBChannel::FB_STENCIL_BIT;

draw_->Clear(mask, color, depth, 0);
// Note that since the alpha channel and the stencil channel are shared on the PSP,
// when we clear alpha, we also clear stencil to the same value.
draw_->Clear(mask, color, depth, color >> 24);
if (clearColor || clearAlpha) {
SetColorUpdated(gstate_c.skipDrawReason);
}
Expand Down

0 comments on commit ac518f8

Please sign in to comment.