diff --git a/GPU/Common/FramebufferCommon.cpp b/GPU/Common/FramebufferCommon.cpp index dfd6525b52..b12397ed1e 100644 --- a/GPU/Common/FramebufferCommon.cpp +++ b/GPU/Common/FramebufferCommon.cpp @@ -676,6 +676,7 @@ void FramebufferManagerCommon::UpdateFromMemory(u32 addr, int size, bool safe) { RebindFramebuffer(); } + // TODO: Necessary? gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE); } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 67938838d9..1da1a7aa15 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -272,6 +272,9 @@ void TextureCacheCommon::SetTexture(bool force) { TexCacheEntry *entry = nullptr; gstate_c.SetNeedShaderTexclamp(false); gstate_c.skipDrawReason &= ~SKIPDRAW_BAD_FB_TEXTURE; + if (gstate_c.bgraTexture != isBgraBackend_) { + gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE); + } gstate_c.bgraTexture = isBgraBackend_; if (iter != cache_.end()) { @@ -759,6 +762,11 @@ void TextureCacheCommon::SetTextureFramebuffer(TexCacheEntry *entry, VirtualFram // We need to force it, since we may have set it on a texture before attaching. gstate_c.curTextureWidth = framebuffer->bufferWidth; gstate_c.curTextureHeight = framebuffer->bufferHeight; + if (gstate_c.bgraTexture) { + gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE); + } else if ((gstate_c.curTextureXOffset == 0) != (fbInfo.xOffset == 0) || (gstate_c.curTextureYOffset == 0) != (fbInfo.yOffset == 0)) { + gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE); + } gstate_c.bgraTexture = false; gstate_c.curTextureXOffset = fbInfo.xOffset; gstate_c.curTextureYOffset = fbInfo.yOffset; diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index 5058603a7b..3528542299 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -694,7 +694,7 @@ void GPU_GLES::Execute_VertexType(u32 op, u32 diff) { if (diff & (GE_VTYPE_TC_MASK | GE_VTYPE_THROUGH_MASK)) { gstate_c.Dirty(DIRTY_UVSCALEOFFSET); if (diff & GE_VTYPE_THROUGH_MASK) - gstate_c.Dirty(DIRTY_RASTER_STATE | DIRTY_VIEWPORTSCISSOR_STATE); + gstate_c.Dirty(DIRTY_RASTER_STATE | DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_FRAGMENTSHADER_STATE); } } @@ -717,7 +717,7 @@ void GPU_GLES::Execute_VertexTypeSkinning(u32 op, u32 diff) { } } if (diff & GE_VTYPE_THROUGH_MASK) - gstate_c.Dirty(DIRTY_RASTER_STATE | DIRTY_VIEWPORTSCISSOR_STATE); + gstate_c.Dirty(DIRTY_RASTER_STATE | DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_FRAGMENTSHADER_STATE); } void GPU_GLES::Execute_Bezier(u32 op, u32 diff) {