Check for kernel textures in kernel ram properly.

Textures can perfectly legitimately be in volatile ram.
This commit is contained in:
Unknown W. Brackets 2014-03-01 16:11:56 -08:00
parent da1e4a80a6
commit 15a608a6b9
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ static const u32 textureAlignMask16[16] = {
static inline 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_GetUserMemoryBase())
if (texaddr < PSP_GetKernelMemoryEnd())
return gstate.texbufwidth[level] & 0x1FFF;
u32 bufw = gstate.texbufwidth[level] & textureAlignMask16[format];

View File

@ -1027,7 +1027,7 @@ void TextureCacheDX9::SetTexture() {
}
}
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetUserMemoryBase()) {
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetKernelMemoryEnd()) {
ERROR_LOG_REPORT(G3D, "Texture with unexpected bufw (full=%d)", gstate.texbufwidth[0] & 0xffff);
}

View File

@ -1060,7 +1060,7 @@ void TextureCache::SetTexture(bool force) {
}
}
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetUserMemoryBase()) {
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetKernelMemoryEnd()) {
ERROR_LOG_REPORT(G3D, "Texture with unexpected bufw (full=%d)", gstate.texbufwidth[0] & 0xffff);
}