mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #11873 from unknownbrackets/stencil-upload
GLES: Fix stencil buffer upload at > 1x PSP
This commit is contained in:
3 files changed
+5
-2
No files matched your search
@@ -1863,7 +1863,8 @@ Draw::Framebuffer *FramebufferManagerCommon::GetTempFBO(TempFBO reason, u16 w, u
|
||||
}
|
||||
|
||||
textureCache_->ForgetLastTexture();
|
||||
Draw::Framebuffer *fbo = draw_->CreateFramebuffer({ w, h, 1, 1, false, depth });
|
||||
bool z_stencil = reason == TempFBO::STENCIL;
|
||||
Draw::Framebuffer *fbo = draw_->CreateFramebuffer({ w, h, 1, 1, z_stencil, depth });
|
||||
if (!fbo)
|
||||
return fbo;
|
||||
|
||||
|
||||
@@ -162,6 +162,8 @@ enum class TempFBO {
|
||||
BLIT,
|
||||
// For copies of framebuffers (e.g. shader blending.)
|
||||
COPY,
|
||||
// Used to copy stencil data, means we need a stencil backing.
|
||||
STENCIL,
|
||||
};
|
||||
|
||||
inline Draw::DataFormat GEFormatToThin3D(int geFormat) {
|
||||
|
||||
@@ -168,7 +168,7 @@ bool FramebufferManagerGLES::NotifyStencilUpload(u32 addr, int size, bool skipZe
|
||||
|
||||
Draw::Framebuffer *blitFBO = nullptr;
|
||||
if (useBlit) {
|
||||
blitFBO = GetTempFBO(TempFBO::COPY, w, h, Draw::FBO_8888);
|
||||
blitFBO = GetTempFBO(TempFBO::STENCIL, w, h, Draw::FBO_8888);
|
||||
draw_->BindFramebufferAsRenderTarget(blitFBO, { Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE });
|
||||
} else if (dstBuffer->fbo) {
|
||||
draw_->BindFramebufferAsRenderTarget(dstBuffer->fbo, { Draw::RPAction::KEEP, Draw::RPAction::KEEP, Draw::RPAction::DONT_CARE });
|
||||
|
||||
Reference in new issue
Block a user