Skip to content

fix(metal-replay): presentation replay failed on VideoOut label store (#494) - #500

Merged
RINNECODER merged 1 commit into
mainfrom
fix/metal-presentation-replay
Oct 14, 2026
Merged

RINNECODER merged 1 commit into
mainfrom
fix/metal-presentation-replay

Conversation

@RINNECODER

@RINNECODER RINNECODER commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Cause

anyps5_metal_presentation_replay failed with Native guest memory address 0x... is not borrowed (plus a 10 s queue stall message as a side effect of the aborted flip).

#494 made VideoOut store its buffer labels on flip completion (VideoOutState.cpp: AgcDriverStoreGuestLabel_nid_postfix(&cfg->bufferLabels[previous], 0)) and added MetalReplay/GuestLabelStore.cpp for the replay executables. That replay store called GuestMemory::CheckRange, which in the replay build is the borrowed-range check. The label array is VideoOut's own host memory, never part of the ranges a replay borrows, so the check threw on the first flip that replaced a frame.

First bad commit

6ef7160ef (#494, "sync: small HLE libraries from upstream ..."). git bisect between 361d4263d (good, test passes) and origin/main (bad); the parent f5f20ad1c (#495) is good. It is not caused by batching or copy-back deferral, which is why those switches did not change it, nor by #495/#496/#497/#498.

Fix

The replay label store is a plain release store, with a comment why it is not range-checked. The production Metal DirectDriver store is unchanged (its check is host-accessibility, which holds for the label array).

Evidence

  • Before: ctest -R anyps5_metal_presentation_replay fails on main (arm64 Release, Ninja, guest-replay flags from macos-metal.yml).
  • After: passes (22 s); the full 60-test guest-replay ctest set passes.

Why CI was not red

The guest-replay job did run it on main (1eee7d2ad), but the test returned exit 77 (no console session / screen locked on the self-hosted runner), which the CMake SKIP_RETURN_CODE 77 reports as Skipped: 44/60 anyps5_metal_presentation_replay ... ***Skipped 0.15 sec. A skip does not fail the job, so the regression was invisible whenever the runner screen was locked.

Codex review findings

Finding Resolution
none posted within 15 min n/a

🤖 Generated with Claude Code

…he replay executables

The replay build's guest memory check only accepts borrowed guest ranges, but
VideoOut's buffer labels live in its host-side config. The flip completion store
added in #494 therefore threw 'not borrowed' and the presentation replay failed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e301d3e-4247-4a24-ad08-6ae73e5e47d7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T18:42:06.320460Z 2344719 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@RINNECODER
RINNECODER merged commit 6299ec8 into main Oct 14, 2026
6 checks passed
@RINNECODER
RINNECODER deleted the fix/metal-presentation-replay branch October 14, 2026 18:56
RINNECODER added a commit that referenced this pull request Oct 14, 2026
anyps5_metal_presentation_replay exits 77 (ctest Skipped) when the runner has no console
session or the screen is locked, which hid a real regression (#500). CI now writes JUnit and
fails the job on any skip. CMake skip semantics are unchanged for local runs.


Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant