mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Start work on separating frame from backbuffer renderpass
This commit is contained in:
1 parent
4407445d50
commit
3b6fa9be87
5 files changed
+40
-34
No files matched your search
@@ -205,7 +205,7 @@ void FramebufferManagerCommon::SetNumExtraFBOs(int num) {
|
||||
Draw::Framebuffer *fbo = draw_->CreateFramebuffer({ (int)renderWidth_, (int)renderHeight_, 1, 1, false, Draw::FBO_8888 });
|
||||
extraFBOs_.push_back(fbo);
|
||||
|
||||
// The new FBO is still bound after creation, but let's bind it anyway.
|
||||
// The new FBO is still bound after creation, but let's bind and clear it anyway.
|
||||
draw_->BindFramebufferAsRenderTarget(fbo);
|
||||
ClearBuffer();
|
||||
}
|
||||
@@ -828,20 +828,16 @@ void FramebufferManagerCommon::CopyDisplayToOutput() {
|
||||
DownloadFramebufferOnSwitch(currentRenderVfb_);
|
||||
|
||||
SetViewport2D(0, 0, pixelWidth_, pixelHeight_);
|
||||
draw_->BindBackbufferAsRenderTarget();
|
||||
currentRenderVfb_ = 0;
|
||||
|
||||
if (displayFramebufPtr_ == 0) {
|
||||
DEBUG_LOG(FRAMEBUF, "Display disabled, displaying only black");
|
||||
// No framebuffer to display! Clear to black.
|
||||
draw_->BindBackbufferAsRenderTarget();
|
||||
ClearBuffer();
|
||||
return;
|
||||
}
|
||||
|
||||
if (useBufferedRendering_) {
|
||||
draw_->Clear(Draw::FB_COLOR_BIT | Draw::FB_STENCIL_BIT | Draw::FB_DEPTH_BIT, 0, 0, 0);
|
||||
}
|
||||
|
||||
u32 offsetX = 0;
|
||||
u32 offsetY = 0;
|
||||
|
||||
@@ -888,6 +884,11 @@ void FramebufferManagerCommon::CopyDisplayToOutput() {
|
||||
}
|
||||
}
|
||||
|
||||
draw_->BindBackbufferAsRenderTarget();
|
||||
if (useBufferedRendering_) {
|
||||
draw_->Clear(Draw::FB_COLOR_BIT | Draw::FB_STENCIL_BIT | Draw::FB_DEPTH_BIT, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (!vfb) {
|
||||
if (Memory::IsValidAddress(displayFramebufPtr_)) {
|
||||
// The game is displaying something directly from RAM. In GTA, it's decoded video.
|
||||
|
||||
Reference in new issue
Block a user