diff --git a/Combiner.cpp b/Combiner.cpp index dec41a98..7f853d8f 100644 --- a/Combiner.cpp +++ b/Combiner.cpp @@ -117,41 +117,6 @@ void CombinerInfo::destroy() m_combiners.clear(); } -void CombinerInfo::updateCombineColors() -{ - m_pCurrent->UpdateColors(); - gDP.changed &= ~CHANGED_COMBINE_COLORS; -} - -void CombinerInfo::updateCombineFBInfo() -{ - m_pCurrent->UpdateFBInfo(true); - gDP.changed &= ~CHANGED_FB_TEXTURE; -} - -void CombinerInfo::updateCombineDepthInfo() -{ - if (m_pCurrent != NULL) - m_pCurrent->UpdateDepthInfo(true); -} - -void CombinerInfo::updateAlphaTestInfo() -{ - if (m_pCurrent != NULL) - m_pCurrent->UpdateAlphaTestInfo(); -} - -void CombinerInfo::updateTextureInfo() -{ - if (m_pCurrent != NULL) - m_pCurrent->UpdateTextureInfo(); -} - -void CombinerInfo::updateRenderState() { - if (m_pCurrent != NULL) - m_pCurrent->UpdateRenderState(); -} - static void SimplifyCycle( CombineCycle *cc, CombinerStage *stage ) { diff --git a/Combiner.h b/Combiner.h index b513379b..1c7729b9 100644 --- a/Combiner.h +++ b/Combiner.h @@ -118,12 +118,6 @@ class CombinerInfo { public: void init(); - void updateCombineColors(); - void updateCombineFBInfo(); - void updateCombineDepthInfo(); - void updateAlphaTestInfo(); - void updateTextureInfo(); - void updateRenderState(); void setCombine( u64 mux ); void destroy(); diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 8420f86c..674a3ca8 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -9,6 +9,7 @@ #include "VI.h" #include "Textures.h" #include "Combiner.h" +#include "GLSLCombiner.h" #include "Types.h" #include "Config.h" #include "Debug.h" @@ -425,7 +426,7 @@ void FrameBuffer_AttachDepthBuffer() #endif assert(checkFBO()); } - CombinerInfo::get().updateCombineDepthInfo(); + CombinerInfo::get().getCurrent()->UpdateDepthInfo(true); } #ifndef GLES2 diff --git a/GLSLCombiner.cpp b/GLSLCombiner.cpp index b1035db2..e4bddc9d 100644 --- a/GLSLCombiner.cpp +++ b/GLSLCombiner.cpp @@ -621,6 +621,8 @@ void ShaderCombiner::UpdateColors(bool _bForce) { const int nDither = (gDP.otherMode.colorDither == 2 || gDP.otherMode.alphaDither == 2 || gDP.otherMode.alphaCompare == 3) ? 1 : 0; if ((m_nInputs & (1<UpdateAlphaTestInfo(); if (gDP.changed & CHANGED_SCISSOR) { @@ -827,10 +827,10 @@ void OGL_UpdateStates() } if (gDP.changed & CHANGED_FB_TEXTURE) - CombinerInfo::get().updateCombineFBInfo(); + CombinerInfo::get().getCurrent()->UpdateFBInfo(true); if ((gDP.changed & CHANGED_RENDERMODE) || (gSP.geometryMode & G_ZBUFFER)) - CombinerInfo::get().updateCombineDepthInfo(); + CombinerInfo::get().getCurrent()->UpdateDepthInfo(true); if ((gDP.changed & CHANGED_RENDERMODE) || (gDP.changed & CHANGED_CYCLETYPE)) { @@ -957,7 +957,7 @@ void OGL_DrawTriangles() OGL_UpdateCullFace(); OGL_UpdateViewport(); glEnable(GL_SCISSOR_TEST); - CombinerInfo::get().updateRenderState(); + CombinerInfo::get().getCurrent()->UpdateRenderState(); } CombinerInfo::get().getCurrent()->UpdateColors(true); @@ -985,7 +985,7 @@ void OGL_DrawLine(int v0, int v1, float width ) OGL_UpdateCullFace(); OGL_UpdateViewport(); OGL.renderState = GLInfo::rsLine; - CombinerInfo::get().updateRenderState(); + CombinerInfo::get().getCurrent()->UpdateRenderState(); } unsigned short elem[2];