mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
5d8a0f19df
Ports the GL stale-stomp fix (R1: a union of disjoint uploads painted stale CPU-mirror pixels over live framebuffer content) to the Vulkan backend, with a VK-specific flush design: the naive per-rect port re-created the boot-wedge submit churn (2 staging allocs + 3 submits PER RECT; measured 0.7 fps at the Whoopee logo under MDEC streaming). The coalesced flush packs all rect data into ONE 1555 staging + ONE RGBA8 staging (VkBufferImageCopy bufferOffset per rect), then exactly TWO queue submits per flush: one command buffer with both N-region buffer->image copy sets, one render pass with N scissored 2-draw blits into hr. UP_RECTS_MAX=64 on VK (row-band merging coalesces MDEC macroblock streams to ~one rect per block row, so a streamed frame fits in a single flush). Verified: Tomba2 attract renders correctly on Vulkan at ~51 fps; vk_perf shows mostly zero-submit frames with occasional small bursts (was a sustained per-pixel churn wedge before the original batching fix). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>