GL: Fix clearing alpha on stencil uploads.

This commit is contained in:
Henrik Rydgård 2018-02-10 17:18:18 +01:00
parent d9af90e016
commit 3c93eaf164
3 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ enum DrawTextureFlags {
DRAWTEX_NEAREST = 0,
DRAWTEX_LINEAR = 1,
DRAWTEX_KEEP_TEX = 2,
DRAWTEX_KEEP_STENCIL = 4,
DRAWTEX_KEEP_STENCIL_ALPHA = 4,
};
inline Draw::DataFormat GEFormatToThin3D(int geFormat) {

View File

@ -420,10 +420,10 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
}
// We always want a plain state here, well, except for when it's used by the stencil stuff...
render_->SetNoBlendAndMask(0xF);
render_->SetDepth(false, false, GL_ALWAYS);
render_->SetRaster(false, GL_CCW, GL_FRONT, GL_FALSE);
if (!(flags & DRAWTEX_KEEP_STENCIL)) {
if (!(flags & DRAWTEX_KEEP_STENCIL_ALPHA)) {
render_->SetNoBlendAndMask(0xF);
render_->SetStencilDisabled();
}

View File

@ -189,7 +189,7 @@ bool FramebufferManagerGLES::NotifyStencilUpload(u32 addr, int size, bool skipZe
render_->SetStencilOp(i, GL_REPLACE, GL_REPLACE, GL_REPLACE);
render_->SetUniformF1(&u_stencilValue, i * (1.0f / 255.0f));
}
DrawActiveTexture(0, 0, dstBuffer->width, dstBuffer->height, dstBuffer->bufferWidth, dstBuffer->bufferHeight, 0.0f, 0.0f, u1, v1, ROTATION_LOCKED_HORIZONTAL, DRAWTEX_NEAREST | DRAWTEX_KEEP_STENCIL);
DrawActiveTexture(0, 0, dstBuffer->width, dstBuffer->height, dstBuffer->bufferWidth, dstBuffer->bufferHeight, 0.0f, 0.0f, u1, v1, ROTATION_LOCKED_HORIZONTAL, DRAWTEX_NEAREST | DRAWTEX_KEEP_STENCIL_ALPHA);
}
if (useBlit) {