mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
7ad8519128
The plain present path copied the VRAM image into the swapchain with vkCmdBlitImage, alpha included. VRAM alpha is the PSX mask/STP bit, 0 on most pixels, and AMD's compositor honours it even with an OPAQUE compositeAlpha: parts of the window went see-through (8x8 black/white blocks of whatever sat behind it). Reported in #411. vk_renderer_present_vram/_wide now draw the displayed rect with a fullscreen triangle whose fragment shader writes alpha = 1 (new present.vert/.frag). The pass is self-contained and created lazily; if any of it fails to build, presents fall back to the old blit. Its render pass ends in TRANSFER_DST_OPTIMAL so finish_present (OSD + present barrier) is unchanged. Wide surfaces gain SAMPLED usage for it. Checked on an RX 7900 XT: intro/logo screens render correctly, no new validation-layer messages. Most of this was written by Claude Opus 5.5; I reviewed and tested it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>