From b4b878ac2472188a7a347208005327ce5f9b97f4 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut <gregory.hainaut@gmail.com> Date: Sun, 24 Apr 2016 11:56:31 +0200 Subject: [PATCH] gsdx-ogl: add a note for a future small optimization --- plugins/GSdx/GSDeviceOGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 39ec12777b..03fad05fdf 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -1182,6 +1182,7 @@ void GSDeviceOGL::DoMerge(GSTexture* sTex[2], GSVector4* sRect, GSTexture* dTex, if(sTex[0]) { + // TODO: potentially we could cache the value to avoid to upload every frame m_merge_obj.cb->upload(&c.v); StretchRect(sTex[0], sRect[0], dTex, dRect[0], m_merge_obj.ps[mmod ? 1 : 0], m_MERGE_BLEND); @@ -1201,6 +1202,7 @@ void GSDeviceOGL::DoInterlace(GSTexture* sTex, GSTexture* dTex, int shader, bool GSVector4 sRect(0, 0, 1, 1); GSVector4 dRect(0.0f, yoffset, s.x, s.y + yoffset); + // TODO: potentially we could cache the value to avoid to upload every frame InterlaceConstantBuffer cb; cb.ZrH = GSVector2(0, 1.0f / s.y); @@ -1283,6 +1285,7 @@ void GSDeviceOGL::DoExternalFX(GSTexture* sTex, GSTexture* dTex) ExternalFXConstantBuffer cb; + // TODO: potentially we could cache the value to avoid to upload every frame cb.xyFrame = GSVector2((float)s.x, (float)s.y); cb.rcpFrame = GSVector4(1.0f / s.x, 1.0f / s.y, 0.0f, 0.0f); cb.rcpFrameOpt = GSVector4::zero();