Avoid making FBO copies in the debugger.

When it binds the texture preview.  Not needed.
This commit is contained in:
Unknown W. Brackets 2014-06-13 08:35:12 -07:00
parent 3da962f585
commit dad1bf41f7
3 changed files with 9 additions and 0 deletions

View File

@ -135,6 +135,10 @@ bool EnterStepping(std::function<void()> callback) {
return true;
}
bool IsStepping() {
return isStepping;
}
static bool GetBuffer(const GPUDebugBuffer *&buffer, PauseAction type, const GPUDebugBuffer &resultBuffer) {
if (!isStepping) {
return false;

View File

@ -26,6 +26,7 @@ namespace GPUStepping {
// Begins stepping and calls callback while inside a lock preparing stepping.
// This would be a good place to deliver a message to code that stepping is ready.
bool EnterStepping(std::function<void()> callback);
bool IsStepping();
bool GPU_GetCurrentFramebuffer(const GPUDebugBuffer *&buffer);
bool GPU_GetCurrentDepthbuffer(const GPUDebugBuffer *&buffer);

View File

@ -37,6 +37,7 @@
#include "GPU/Common/PostShader.h"
#include "GPU/Common/TextureDecoder.h"
#include "GPU/Debugger/Stepping.h"
#include "GPU/GLES/Framebuffer.h"
#include "GPU/GLES/TextureCache.h"
#include "GPU/GLES/TransformPipeline.h"
@ -1139,6 +1140,9 @@ void FramebufferManager::BindFramebufferColor(VirtualFramebuffer *framebuffer, b
// currentRenderVfb_ will always be set when this is called, except from the GE debugger.
// Let's just not bother with the copy in that case.
if (GPUStepping::IsStepping()) {
skipCopy = true;
}
if (!skipCopy && currentRenderVfb_ && MaskedEqual(framebuffer->fb_address, gstate.getFrameBufRawAddress())) {
// TODO: Maybe merge with bvfbs_? Not sure if those could be packing, and they're created at a different size.
FBO *renderCopy = GetTempFBO(framebuffer->renderWidth, framebuffer->renderHeight, framebuffer->colorDepth);