From 92d68b70d3d676d07883facdc5f17c617d5f5a1d Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 29 May 2015 18:12:08 +0200 Subject: [PATCH] gsdx-ogl: add a performance note for later The idea will be to replace StretchRect for standard case with a framebuffer blit. Potentially it toggles less gl state. Worth a test on Star Ocean 3 that uses a lots this function for stencil emulation --- plugins/GSdx/GSDeviceOGL.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 6b5044603b..207b33e435 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -733,6 +733,10 @@ void GSDeviceOGL::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture return; } + // Performance optimization. It might be faster to use a framebuffer blit for standard case + // instead to emulate it with shader + // see https://www.opengl.org/wiki/Framebuffer#Blitting + GL_PUSH("StretchRect from %d to %d", sTex->GetID(), dTex->GetID()); // ************************************