When a frame spilled over into several push buffers, Defragment freed
them and asserted if one block of their summed size couldn't be
allocated. On 32-bit devices that contiguous allocation fails where the
pieces fit, which Play reports from 32-bit ARM show at the start of a
frame. Halve the size until it fits; a smaller buffer just spills into
more buffers again, as it would have before defragmenting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reported by Joseph on Discord.
Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.
The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
* Rename LogType to Log
* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.
* Mac/ARM64 buildfix
* Do the same with the hle result log macros
* Rename the log names to mixed case while at it.
* iOS buildfix
* Qt buildfix attempt, ARM32 buildfix