Review: preserve active display field during interlaced drawing - #22
Review: preserve active display field during interlaced drawing#22Alexbeav wants to merge 5 commits into
Conversation
|
@cubic-dev-ai review this PR |
@Alexbeav I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.
Re-trigger cubic
|
Both findings are valid and fixed in 4390971. The GPUSTAT comment is restored to its register-read function. Logical perspective counting now belongs to the facade, while per-row backend metadata setup does not count another triangle. The old head fails 8 new counter assertions; the updated runtime suite passes all 69 enabled tests. The exact updated game build repeats the fresh frontend/player/ball/flipper route and exits normally at frame 6922. The accepted private product is unchanged. @cubic-dev-ai review this PR |
@Alexbeav I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.
Re-trigger cubic
|
All findings from reviews 5125053585, 5125055760, 5125091450 and 5125096465 are addressed on 5aee9c8.
The branch update requests the automatic exact-head Cubic review; no second manual review run is requested. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
Review5125143037 is valid: changing the Vulkan Y scissor in every mode broadened the correction. Commit 6fcfb8a restores the original Vulkan overlay path and applies the field mask to flat-rectangle geometry in the facade. GL and Vulkan both have wide-overlay paths that intentionally replace scissors, so row-height geometry protects both while progressive overlays keep their original dimensions. A backend fixture ignores the scissor on purpose: the prior facade fails40 field-row checks; the new source passes both parities, exactly one write per retained row, progressive full-overlay coverage and clip restoration. All69 enabled runtime tests pass. The exact fresh software/native player route result follows in the updated PR body. The branch push requests one automatic exact-head review. No duplicate manual review is requested. Exact-head retail repeats completed at frames 6923 and 6925 with actual player/ball/flipper play and normal TCP exits. The updated body also discloses the real earlier startup-loop attempt; its cause remains unestablished and it is not discarded as a harness error. The independent 1020,511 pixel case passes. No universal startup, Vulkan driver or timing acceptance is claimed. |
|
Re-scoped against the upstream revert. This change went upstream as RetroPortingToolKit#327 (merge b775d3e, 2026-09-07) and was then reverted by RetroPortingToolKit#336 (merge 2026-09-07T20:00:47Z). Matched Ape Escape retail-BIOS runs (PSX_BIOS_HLE=0, identical generated game/BIOS code, disc, config) stall hard around frames 375-376 with it, versus a normal boot and close at frame 2192 on the parent. Root cause from the revert: per-row backend submission/flushes amplify a pre-existing malformed DMA list into massive GL work. The revert restored the previous missing active-field preservation, so a replacement is still needed with two explicit requirements: bounded per-row rendering cost, and real retail BIOS boot coverage (Ape Escape, PSX_BIOS_HLE=0). Closing this review PR; any future attempt should be a new branch implementing the bounded-cost approach. |
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.
This is the required fork review; do not merge into fork main. Intended upstream: mstan/psxrecomp.
Base
155e269ba5d50fe36523846f908cf124dc1561a0; review 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; a separate readback correction addresses the measured GL synchronization cost. 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.