Repository navigation
Conversation
…n the CPU path DecodeDisplayBuffer's 4-byte loop computed the tiled offset itself and only knew the linear and PS5 64 KiB layouts, so a PS4 Display2D scanout (DisplayTilingGcn) was read with the PS5 formula and came out scrambled. The half-float loop and DisplayBufferOffset already go through texelOffset, which handles all three; the 4-byte loop now does too. The path only runs when a flip has no pending image to blit (the first flip, or with APS5_STORE_AT_LABEL / APS5_EAGER_WRITEBACK set). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @ntamas94. boykopovar#6977 is now a draft integration branch, and its own work is split into boykopovar#9429 to boykopovar#9433 (details). The maintainers asked that the branch not land anything without its own review, so could you open this upstream against AI-assisted: yes (Claude Code) 🤖 Generated with Claude Code |
|
Opened upstream as boykopovar#9673 against AI-assisted: yes (Claude Code) 🤖 Generated with Claude Code |
What
DecodeDisplayBuffer's 4-byte loop worked out the tiled offset inline and only knew the linear (tilingMode == 1) and PS5 64 KiB layouts. A PS4 Display2D scanout (DisplayTilingGcn) fell into the 64 KiB branch and came out scrambled. The half-float loop andDisplayBufferOffsetalready go throughtexelOffset, which handles all three layouts, so the 4-byte loop now calls it too. For the linear and 64 KiB casestexelOffset(buffer, x, y, 4)gives the same offsets as the removed code.The CPU decode only runs when a flip has no pending image to blit: the first flip, or with
APS5_STORE_AT_LABEL=1/APS5_EAGER_WRITEBACK=1. That is why the default path looks fine and the knobs showed a broken image. The Display2D retile of the render target was correct; only this read was wrong.Note:
texelOffsetbuilds the GCN layout for every texel, so a 1080p CPU decode takes about 116 ms, against 9.4 ms for the old (wrong) 64 KiB formula. The half-float loop pays the same cost today. I left it as it is because this path only runs on the first flip or with the debug knobs.Tested
Windows 11 (10.0.26200), WinLibs GCC, Release.
GcnDisplaycase inlinear_display_buffer: it fills a 1920x1024DisplayTilingGcnbuffer throughDisplayBufferOffsetand checks that every decoded pixel lands at its linear position. It fails before the change and passes after.linear_display_bufferandvideo_out_hdr_presentpass.APS5_STORE_AT_LABEL=1: before, the frames were scrambled; now the title screen, level0, level11 and the KiP intro and tutorial screens render correctly.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code