Merge pull request #11933 from unknownbrackets/texcache

TexCache: Align bufw properly even for VRAM
This commit is contained in:
Henrik Rydgård 2019-03-25 08:10:32 +01:00 committed by GitHub
commit 47ce2fcbb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,7 @@ static const u32 textureAlignMask16[16] = {
u32 GetTextureBufw(int level, u32 texaddr, GETextureFormat format) {
// This is a hack to allow for us to draw the huge PPGe texture, which is always in kernel ram.
if (texaddr < PSP_GetKernelMemoryEnd())
if (texaddr >= PSP_GetKernelMemoryBase() && texaddr < PSP_GetKernelMemoryEnd())
return gstate.texbufwidth[level] & 0x1FFF;
u32 bufw = gstate.texbufwidth[level] & textureAlignMask16[format];