mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
TexCache: Cleanup BGRA flag dirtying.
This commit is contained in:
parent
818849c4b9
commit
585569c2c2
2 changed files with 9 additions and 9 deletions
|
@ -423,11 +423,7 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
|
||||||
gstate_c.skipDrawReason &= ~SKIPDRAW_BAD_FB_TEXTURE;
|
gstate_c.skipDrawReason &= ~SKIPDRAW_BAD_FB_TEXTURE;
|
||||||
|
|
||||||
bool isBgraTexture = isBgraBackend_ && !hasClutGPU;
|
bool isBgraTexture = isBgraBackend_ && !hasClutGPU;
|
||||||
|
gstate_c.SetTextureIsBGRA(isBgraTexture);
|
||||||
if (gstate_c.bgraTexture != isBgraTexture) {
|
|
||||||
gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
|
||||||
}
|
|
||||||
gstate_c.bgraTexture = isBgraTexture;
|
|
||||||
|
|
||||||
if (entryIter != cache_.end()) {
|
if (entryIter != cache_.end()) {
|
||||||
entry = entryIter->second.get();
|
entry = entryIter->second.get();
|
||||||
|
@ -1093,12 +1089,10 @@ void TextureCacheCommon::SetTextureFramebuffer(const AttachCandidate &candidate)
|
||||||
gstate_c.curTextureWidth = RoundUpToPowerOf2(gstate_c.curTextureWidth);
|
gstate_c.curTextureWidth = RoundUpToPowerOf2(gstate_c.curTextureWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gstate_c.bgraTexture) {
|
if ((gstate_c.curTextureXOffset == 0) != (fbInfo.xOffset == 0) || (gstate_c.curTextureYOffset == 0) != (fbInfo.yOffset == 0)) {
|
||||||
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.Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
||||||
}
|
}
|
||||||
gstate_c.bgraTexture = false;
|
gstate_c.SetTextureIsBGRA(false);
|
||||||
gstate_c.curTextureXOffset = fbInfo.xOffset;
|
gstate_c.curTextureXOffset = fbInfo.xOffset;
|
||||||
gstate_c.curTextureYOffset = fbInfo.yOffset;
|
gstate_c.curTextureYOffset = fbInfo.yOffset;
|
||||||
u32 texW = (u32)gstate.getTextureWidth(0);
|
u32 texW = (u32)gstate.getTextureWidth(0);
|
||||||
|
|
|
@ -568,6 +568,12 @@ struct GPUStateCache {
|
||||||
Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void SetTextureIsBGRA(bool isBGRA) {
|
||||||
|
if (bgraTexture != isBGRA) {
|
||||||
|
bgraTexture = isBGRA;
|
||||||
|
Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
u32 useFlags;
|
u32 useFlags;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue