From 266cafb82d67edb05cd932bd3f94febaf3348f40 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 1 Oct 2011 02:36:03 +0200 Subject: [PATCH] Add a call to VertexManager::Flush() when changing TC gen settings In previous revisions of Dolphin, changing texture generation settings (via GX_SetTexCoordGen for example) did not regenerate the vertex shader and flush the vertices. Adding this flush should fix texture problems in a few game, for example in Superman: Shadow of Apokolips: Before: http://i.imgur.com/mHmfb.jpg After: http://i.imgur.com/2ThES.png --- Source/Core/VideoCommon/Src/XFStructs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/VideoCommon/Src/XFStructs.cpp b/Source/Core/VideoCommon/Src/XFStructs.cpp index b4afdf3d6b..ec3975cb07 100644 --- a/Source/Core/VideoCommon/Src/XFStructs.cpp +++ b/Source/Core/VideoCommon/Src/XFStructs.cpp @@ -154,6 +154,8 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData) case XFMEM_SETTEXMTXINFO+5: case XFMEM_SETTEXMTXINFO+6: case XFMEM_SETTEXMTXINFO+7: + VertexManager::Flush(); + nextAddress = XFMEM_SETTEXMTXINFO + 8; break; @@ -165,6 +167,8 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData) case XFMEM_SETPOSMTXINFO+5: case XFMEM_SETPOSMTXINFO+6: case XFMEM_SETPOSMTXINFO+7: + VertexManager::Flush(); + nextAddress = XFMEM_SETPOSMTXINFO + 8; break;