cpu: verify the five Bink frame plane allocation requests #169

Merged
Vonsek merged 1 commit from upstream-pr/170 into main 2026-11-21 18:10:13 +00:00
Vonsek commented 2026-11-21 17:54:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T17:54:38Z.


Change

Trace the five requests from one iteration of BinkAllocateFrameBuffers to the grouped descriptor builder. The translated package slice and source-built fixture expose the destination address and byte count for each enabled plane. The observer also checks that the pitch store follows the request. Refs #157.

Verification

At 39d0b64 on Windows x64 with MSVC 19.44, the new check failed on the prior DLL because the frame-plane entry was absent. The native control, its translation and the translated package loop passed all 32 enable masks at each of three frame positions. With all slots enabled the five sizes were 672, 96, 96, 672 and 672 bytes. The test compares the entire frame table after every run, including inactive slots.

cmake --build --preset dev --target cpu_bink_descriptors_lifted cpu_bink_package_descriptors
ctest --preset dev --no-tests=error -R '^cpu_bink_(package_)?(frame_planes|descriptors)$'
python -B tests/cpu/bink_frame_planes_check.py out/build/dev/cpu_bink_descriptors.dll out/build/dev/cpu_bink_descriptors_lifted.dll out/build/dev/cpu_bink_package_descriptors.dll

All four CTests passed; the direct Python comparison exited zero.

Evidence and follow-up

The MASM fixture and Python plane records are original MIT-licensed source. The local comparison binds only the append calls to an observer and supplies the frame index, cursor and pitches at loop entry. The allocator and frame decoder are outside the measured region. Build options and experiment notes.

Checklist

  • One reviewable behavior.
  • Commands and results included.
  • Disabled planes, nonzero indices and pitch-store ordering covered.
  • README and experiment notes updated.
  • No game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532397541 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/170). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T17:54:38Z. --- ## Change Trace the five requests from one iteration of BinkAllocateFrameBuffers to the grouped descriptor builder. The translated package slice and source-built fixture expose the destination address and byte count for each enabled plane. The observer also checks that the pitch store follows the request. Refs #157. ## Verification At 39d0b64 on Windows x64 with MSVC 19.44, the new check failed on the prior DLL because the frame-plane entry was absent. The native control, its translation and the translated package loop passed all 32 enable masks at each of three frame positions. With all slots enabled the five sizes were 672, 96, 96, 672 and 672 bytes. The test compares the entire frame table after every run, including inactive slots. ```powershell cmake --build --preset dev --target cpu_bink_descriptors_lifted cpu_bink_package_descriptors ctest --preset dev --no-tests=error -R '^cpu_bink_(package_)?(frame_planes|descriptors)$' python -B tests/cpu/bink_frame_planes_check.py out/build/dev/cpu_bink_descriptors.dll out/build/dev/cpu_bink_descriptors_lifted.dll out/build/dev/cpu_bink_package_descriptors.dll ``` All four CTests passed; the direct Python comparison exited zero. ## Evidence and follow-up The MASM fixture and Python plane records are original MIT-licensed source. The local comparison binds only the append calls to an observer and supplies the frame index, cursor and pitches at loop entry. The allocator and frame decoder are outside the measured region. [Build options and experiment notes](https://github.com/Vonsek/Xbox2Windows/blob/39d0b64/docs/experiments.md#frame-plane-requests-in-binkallocateframebuffers). ## Checklist - [x] One reviewable behavior. - [x] Commands and results included. - [x] Disabled planes, nonzero indices and pitch-store ordering covered. - [x] README and experiment notes updated. - [x] No game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:41:39 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:47:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T17:54:47Z.


Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T17:58:38.043598Z 39d0b64 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7066855890 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/170#issuecomment-7066855890). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T17:54:47Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"39d0b644bc153d8c9defdce783826afa59e19fb3","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-21T17:58:38.043598Z">2026-11-21T17:58:38.043598Z</relative-time> | `39d0b64` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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. </details> </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!169
No description provided.