Unify (well, almost) GetOutputFramebuffer (D3D11/GL)

This commit is contained in:
Henrik Rydgård committed 2017-10-18 10:54:26 +02:00
1 parent 214270d192
commit f2ea0ce472
8 files changed
+36 -94

No files matched your search

+4 -7
View File
@@ -1130,12 +1130,9 @@ void FramebufferManagerGLES::Resized() {
}
bool FramebufferManagerGLES::GetOutputFramebuffer(GPUDebugBuffer &buffer) {
int pw = PSP_CoreParameter().pixelWidth;
int ph = PSP_CoreParameter().pixelHeight;
// The backbuffer is flipped (last bool)
buffer.Allocate(pw, ph, GPU_DBG_FORMAT_888_RGB, true);
draw_->CopyFramebufferToMemorySync(nullptr, Draw::FB_COLOR_BIT, 0, 0, pw, ph, Draw::DataFormat::R8G8B8_UNORM, buffer.GetData(), pw);
CHECK_GL_ERROR_IF_DEBUG();
int w, h;
draw_->GetFramebufferDimensions(nullptr, &w, &h);
buffer.Allocate(w, h, GPU_DBG_FORMAT_888_RGB, true);
draw_->CopyFramebufferToMemorySync(nullptr, Draw::FB_COLOR_BIT, 0, 0, w, h, Draw::DataFormat::R8G8B8_UNORM, buffer.GetData(), w);
return true;
}