mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Double check upload/download are VRAM addresses.
This commit is contained in:
parent
5925fa32e8
commit
ef390c5c40
2 changed files with 9 additions and 3 deletions
|
@ -982,7 +982,7 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
|
|||
|
||||
u32 byteSize = FramebufferByteSize(vfb);
|
||||
u32 fb_address_mem = (fb_address & 0x3FFFFFFF) | 0x04000000;
|
||||
if (fb_address_mem + byteSize > framebufRangeEnd_) {
|
||||
if (Memory::IsVRAMAddress(fb_address_mem) && fb_address_mem + byteSize > framebufRangeEnd_) {
|
||||
framebufRangeEnd_ = fb_address_mem + byteSize;
|
||||
}
|
||||
|
||||
|
|
|
@ -2061,13 +2061,19 @@ bool GLES_GPU::PerformMemorySet(u32 dest, u8 v, int size) {
|
|||
bool GLES_GPU::PerformMemoryDownload(u32 dest, int size) {
|
||||
// Cheat a bit to force a download of the framebuffer.
|
||||
// VRAM + 0x00400000 is simply a VRAM mirror.
|
||||
return gpu->PerformMemoryCopy(dest ^ 0x00400000, dest, size);
|
||||
if (Memory::IsVRAMAddress(dest)) {
|
||||
return gpu->PerformMemoryCopy(dest ^ 0x00400000, dest, size);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLES_GPU::PerformMemoryUpload(u32 dest, int size) {
|
||||
// Cheat a bit to force an upload of the framebuffer.
|
||||
// VRAM + 0x00400000 is simply a VRAM mirror.
|
||||
return gpu->PerformMemoryCopy(dest, dest ^ 0x00400000, size);
|
||||
if (Memory::IsVRAMAddress(dest)) {
|
||||
return gpu->PerformMemoryCopy(dest, dest ^ 0x00400000, size);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLES_GPU::PerformStencilUpload(u32 dest, int size) {
|
||||
|
|
Loading…
Add table
Reference in a new issue