mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Apply the D3D11 loco roco fix identically to the other backends
To make centralization easier, and this should be a problem for the other backends as well.
This commit is contained in:
parent
2ebba56758
commit
97058b4db7
3 changed files with 24 additions and 6 deletions
|
@ -493,9 +493,15 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage
|
|||
break;
|
||||
}
|
||||
|
||||
// If size reaches 1, stop, and override maxlevel.
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw == 1 || th == 1) {
|
||||
maxLevel = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > 0 && gstate_c.Supports(GPU_SUPPORTS_TEXTURE_LOD_CONTROL)) {
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw != 1 && tw != (gstate.getTextureWidth(i - 1) >> 1))
|
||||
badMipSizes = true;
|
||||
else if (th != 1 && th != (gstate.getTextureHeight(i - 1) >> 1))
|
||||
|
|
|
@ -576,9 +576,15 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
|
|||
break;
|
||||
}
|
||||
|
||||
// If size reaches 1, stop, and override maxlevel.
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw == 1 || th == 1) {
|
||||
maxLevel = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > 0 && gstate_c.Supports(GPU_SUPPORTS_TEXTURE_LOD_CONTROL)) {
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw != 1 && tw != (gstate.getTextureWidth(i - 1) >> 1))
|
||||
badMipSizes = true;
|
||||
else if (th != 1 && th != (gstate.getTextureHeight(i - 1) >> 1))
|
||||
|
|
|
@ -503,9 +503,15 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
|
|||
break;
|
||||
}
|
||||
|
||||
// If size reaches 1, stop, and override maxlevel.
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw == 1 || th == 1) {
|
||||
maxLevel = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i > 0 && gstate_c.Supports(GPU_SUPPORTS_TEXTURE_LOD_CONTROL)) {
|
||||
int tw = gstate.getTextureWidth(i);
|
||||
int th = gstate.getTextureHeight(i);
|
||||
if (tw != 1 && tw != (gstate.getTextureWidth(i - 1) >> 1))
|
||||
badMipSizes = true;
|
||||
else if (th != 1 && th != (gstate.getTextureHeight(i - 1) >> 1))
|
||||
|
|
Loading…
Add table
Reference in a new issue