mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-14 22:24:05 +00:00
Check for kernel textures in kernel ram properly.
Textures can perfectly legitimately be in volatile ram.
This commit is contained in:
parent
da1e4a80a6
commit
15a608a6b9
@ -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];
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user