mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 17:29:06 +02:00
Merge pull request #22625 from hrydgard/ios-frametests
Fix two frame dump batch problems found by frametests --ios
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -84,6 +84,17 @@ void *MemArena::CreateView(s64 offset, size_t size, void *base) {
|
||||
|
||||
void MemArena::ReleaseView(s64 offset, void* view, size_t size) {
|
||||
vm_address_t addr = (vm_address_t)view;
|
||||
if (reserved_size != 0 && addr >= reserved_mem && addr + size <= reserved_mem + reserved_size) {
|
||||
// Put the reserved pages back instead of unmapping. A hole would let another thread's allocation
|
||||
// (Metal maps its command buffer memory at any free address) land in it, and ReleaseViewSpace()
|
||||
// would then unmap that too.
|
||||
kern_return_t retval = vm_map(mach_task_self(), &addr, size, 0, VM_FLAGS_FIXED | VM_FLAGS_OVERWRITE, MACH_PORT_NULL, 0, false,
|
||||
VM_PROT_NONE, VM_PROT_ALL, VM_INHERIT_DEFAULT);
|
||||
if (retval == KERN_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
WARN_LOG(Log::MemMap, "Couldn't restore the reservation under a view at %p (%d)", view, (int)retval);
|
||||
}
|
||||
vm_deallocate(mach_task_self(), addr, size);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -57,7 +57,9 @@ GPUCommon::GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw) :
|
||||
Reinitialize();
|
||||
gstate.Reset();
|
||||
gstate_c.Reset();
|
||||
gpuStats.ResetFrame();
|
||||
// Including the flip count, which framebuffer ages are measured in. Otherwise a frame dump replayed after
|
||||
// another in the same process (headless) renders differently from one replayed alone.
|
||||
gpuStats.Reset();
|
||||
|
||||
PPGeSetDrawContext(draw);
|
||||
ResetMatrices();
|
||||
|
||||
Reference in new issue
Block a user