Preserve interlaced fields when drawing GPU primitives - #327
Conversation
|
@Alexbeav I've opened #336 to roll back this PR in commit 24c6c56, after tying the retail SCPH1001 BIOS-screen stall to
The per-row primitive resubmission/clip changes amplify an existing malformed DMA list into enormous GL work. A separate CPU/DMA ownership experiment fixes the packet race, but it needs VHD/Spot compatibility coverage, so it is not bundled into this rollback. #336 reverts only #327's five commits and preserves #326/#328. The rollback reaches Ape's title/menu and frame 11669 on retail BIOS; OpenBIOS also boots. MMX6 retail boot passes and closes normally at frame 4123. Eight focused tests pass, and the retained GL readback fixture passes all 71 checks at 1x and 4x. This temporarily restores the previous interlaced-field limitation. A replacement should avoid per-scanline backend draw/flush multiplication and include windowed retail SCPH1001 boot in validation. Full attribution and scope are recorded in #336's investigation document. |
Revert #327 interlaced row submission to restore retail BIOS boot
…e retail BIOS boot Matched Ape Escape retail SCPH1001 LLE builds identify 0661ce7 as the visible boot regression: parent 155e269 reaches game code, while 0661ce7 stalls near BIOS frame 375. Revert its four dependent follow-ups too; retain PR RetroPortingToolKit#326 readback bounds and PR RetroPortingToolKit#328 Vulkan aspect changes. The row-by-row raster dispatcher amplifies an existing malformed DMA list into massive GL work. Keep the broader CPU/DMA arbitration experiment separate for compatibility testing. Document attribution, validation, and the temporarily restored interlace limitation. Validation: full Ape target reaches title/menu and frame 11669 on retail LLE; OpenBIOS control reaches frame 3701. Eight focused tests pass; retained GL readback fixture passes 71 checks at both 1x and 4x after linking local SDL with iconv. Beads: beads-iisy; DMA follow-up: beads-eio.3.122.
When 480i drawing prohibits the active display area, raster primitives currently overwrite both row parities. A guest field-detection loop can then stay black at startup. Preserve the selected parity through native-row clipping, restore the caller clip and re-arm precision/perspective metadata on each submission. Fills, copies and transfers remain unmasked. The facade counts each original perspective triangle once, so row metadata re-arms do not inflate diagnostics. No title detection or guest code changes.
Fork review: Alexbeav#22. Cubic completed exact-head check 101479562581 with zero new issues. All earlier review jobs are terminal and findings are resolved in the final source or explicitly reconciled in the replies. The public branch is identical to this reviewed head.
Base
155e269ba5d50fe36523846f908cf124dc1561a0; tested/reviewed head6fcfb8adbdcd666a2fc8ba419dd4e2aa7ee1faaa; five focused commits; 11 changed files:docs/GPU_INTERLACED_RASTER.mdruntime/CMakeLists.txtruntime/include/gpu.hruntime/include/gpu_interlace.hruntime/include/gpu_render.hruntime/include/gpu_sw_renderer.hruntime/src/gpu.cruntime/src/gpu_render.cruntime/src/gpu_sw_renderer.cruntime/src/gpu_vk_renderer.cruntime/tests/test_gpu_interlace_render.cRuntime files implement the field rule and facade-owned counter; backend metadata setters remain side-effect-free with respect to counting, and backend wide-overlay policy remains unchanged outside field masking; the C fixture tests mode/parity, all nine primitive families, native/4x output, clip restoration, transfers and metadata consumption and logical-triangle counts; CMake registers it; the document describes the invariant and prior behavioral evidence. Source-owned synthetic data only.
Validation on this review head, Windows x64 / WinLibs GCC16.1:
ctest --test-dir <runtime-build> -R gpu_interlace_render_test --output-on-failure.dirty_text_continuation_guardsexpects an absent source fragment;release_zipexpects LF bytes on Windows;aot_overlay_discoveryfails its hardcoded MSYS gcc subprocess. Recompiler sources are unchanged by this PR. Python tests ran with PYTHONUTF8=1.PSX_RECOMP_UI=OFF, direct runtime launch into the game frontend. This is not launcher compatibility acceptance.Field selection uses the existing vertical-blank latch, not scanline-accurate timing. Row clipping can increase hardware submissions; the separate #326 addresses GL readback volume. No Vulkan-wide, netplay, full-game, all-audio or save/load acceptance is claimed. Runtime-only consumer pin update is required; no game regeneration is required by this correction.
Developed with AI assistance; validated as described (test evidence in PR body). AI writes the code and the PR, but I always test before I send something up. Happy to iterate on this process with your feedback.