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:
Henrik Rydgard committed 2017-04-01 21:17:58 +02:00
1 parent 2ebba56758
commit 97058b4db7
3 files changed
+24 -6

No files matched your search

+8 -2
View File
@@ -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))