mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
f5ea3b0d76
Three root-caused fixes (verified with guest-frame-aligned VRAM diffs vs the software reference + window captures; Tomba2 title now pixel-identical to software, attract within 0.62% of the GL oracle, 60.5 fps sustained): 1. Boot wedge: every GP0 pixel upload did 2 vkAllocateMemory + 2 vkQueueSubmit (driver churn, minutes-long stall, watchdog abort). Deferred batched uploads (GL model): CPU writes land in the CPU array + dirty rect; one batched upload flushes at each GPU-op entry point. 2. Shredded 3D: draws raced CPU rewrites of the persistently-mapped vertex buffer from offset 0 (69.5% pixel divergence at guest frame 3000). Sub-allocation cursors + firstVertex bases, recycled at queue-idle. 3. Semi-transparency order violations (59.5% divergence): VK still had GL's retired whole-batch STP split; ported GL's current model (ordered color pass + color-masked stencil fixup via a new pipeline dimension; semi prims isolated one-per-batch). main.cpp: Vulkan present block composes 24-bit FMV frames via gpu_display_pixel_argb + vk_renderer_present_cpu (was NULL -> guaranteed black video; on-screen verification still owed) + the no-VK-build downgrade-to-GL guard salvaged from the retired _wt-vulkan worktree. debug_server screenshot_file now syncs the VK backend (previous commit). Known follow-ups (ENHANCEMENTS.md R2): port the exact-rect upload fix from GL (VK carries the union model = same flicker class), verify FMV on-screen, cache the FMV staging image, explicit DS barrier between one-shot submits, wide compositor, SSAA validation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>