From 60cf5df571dc03d326f5d7f4f7626cfdf134e798 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 19 Jan 2014 17:25:42 -0800 Subject: [PATCH] Consider the texture changed when framebuf changes. Needed to properly consider render to self (should rebind if the framebuffer is later used with a separate target.) --- GPU/Directx9/GPU_DX9.cpp | 12 +++++++++--- GPU/GLES/GLES_GPU.cpp | 16 ++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index f3bd3a217f..7dc8efe477 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -740,8 +740,10 @@ void DIRECTX9_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_REGION1: case GE_CMD_REGION2: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_CLIPENABLE: @@ -830,8 +832,10 @@ void DIRECTX9_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_FRAMEBUFPTR: case GE_CMD_FRAMEBUFWIDTH: case GE_CMD_FRAMEBUFPIXFORMAT: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_TEXADDR0: @@ -1045,8 +1049,10 @@ void DIRECTX9_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_VIEWPORTY2: case GE_CMD_VIEWPORTZ1: case GE_CMD_VIEWPORTZ2: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_LIGHTENABLE0: diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 1bd87cf69e..987e7dc2f4 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -893,8 +893,10 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) { case GE_CMD_REGION1: case GE_CMD_REGION2: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_CLIPENABLE: @@ -970,8 +972,10 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) { case GE_CMD_SCISSOR1: case GE_CMD_SCISSOR2: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; /// @@ -982,8 +986,10 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) { case GE_CMD_FRAMEBUFPTR: case GE_CMD_FRAMEBUFWIDTH: case GE_CMD_FRAMEBUFPIXFORMAT: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_TEXADDR0: @@ -1209,8 +1215,10 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) { case GE_CMD_VIEWPORTY2: case GE_CMD_VIEWPORTZ1: case GE_CMD_VIEWPORTZ2: - if (diff) + if (diff) { gstate_c.framebufChanged = true; + gstate_c.textureChanged = true; + } break; case GE_CMD_LIGHTENABLE0: