xcl run: XCL_SHORT_MOVIES=1 ends a title's Bink videos after their first frame #676
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/681"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by pr1sm-dev on 2026-11-24T03:25:44Z.
A switch for test runs: with
XCL_SHORT_MOVIES=1a title's Bink videos end after their first frame. A retail game plays its intro through the console's Bink DLL and takes no button to skip it, so every test run waited about 40 s for it. Without the switch nothing changes; the game's files are never touched.How: the resolver wraps three exports of the game's
bink2*.dllthat the title imports. A video opened with more than one frame goes to its last frame (the DLL's ownBinkGoto) at its firstBinkNextFrame, so the title's own end-of-video test is met. Not at the open: the title registers its frame buffers after it, and a goto there read a null pointer inside the DLL.What is in it
crates/xcl/src/resolver.rs:mod short_movies(the switch, wrappers ofBinkOpenWithOptions/BinkNextFrame/BinkClose, the list of opened videos), the hook inresolve_importfor imports from a game DLL, and a unit test of the list (short_movies_step_a_video_to_its_end_once).README.md: one entry for the switch.Tested
x86_64-pc-windows-gnu. No Windows machine: everything below is under Wine.8caf783923), a retail title, 120 s,XCL_SHORT_MOVIES=1, same script and settings as the regression runs below: the log has "a video of 450 frames went to its last frame (XCL_SHORT_MOVIES)" at 46.3 s, the video was cut on screen, and the run went on and ended by itself: exit 0x0, 1156 (PresentX 1156) frames shown, 0 crashes, 0 device removals. (Fewer frames than the runs below because the time the video took is now spent on the loading screen, which presents more slowly.)resolver::unit tests under Wine, on a local tree with the sameresolver.rs(main at7ebf1b8plus other open PRs, so not this commit): 6 passed, 0 failed, 664 filtered out.BinkGotoat the open crashed inside the DLL.Regression run
scripts/linux/smoke.shof #257 (the Linux port ofscripts/smoke.ps1, not merged) under Wine, not withsmoke.ps1: I have no Windows machine. Default settings (the switch off), 120 s, scripted A / D-pad presses (XCL_PRESS_AT) in both. The game folder is mounted under a neutral name.0xc0000005reading title memory under amemcpy; the script prints no block for a run that does not reach its end). The block below is the third run. The PR's default run was made once.main:
PR:
Not tested
scripts/smoke.ps1not run.cargo test --workspace: not run (no Windows; under Wine only theresolver::tests above).Bink2Scarlett.dll(the switch matchesbink2*.dllfrom the game folder).AI use
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:00:02Z.
Test run of
8caf783923c7ac348e28622f3200cb497c5390a7on AMD RDNA4. I merged it onto currentmainf4ce27clocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 658 passed, 3 failed, 21 ignored, exit code 101; 0SKIPPEDplaced_title_textures_share_vram_and_preserve_pixels,transitions_apply_when_their_list_is_submitted,d32s8_targets_take_their_own_size_of_video_memory. These three also fail onmainf4ce27cwith no PR applied (cargo test -p xcl --lib -- --test-threads=4: 657 passed, 3 failed), so they are not from this change. The first isplaced_title_textures_share_vram_and_preserve_pixelsatcubemap extra_pages must be reused at same va; the other two arePoisonErrors from the lock it poisons (#673 addresses the cascade, #447 the cubemap check). It is intermittent: alone it passes 3 of 3, and in the parallel lib run it failed on 6 of 7 runs atf4ce27c, 2 of 6 atd852f9aand 1 of 3 at1387b4bon this machine.short_movies_step_a_video_to_its_end_oncepasses.Review: Opt-in for test runs (
XCL_SHORT_MOVIES=1); it wraps exports of the title's Bink DLL and leaves the game's files alone, and without the variable nothing changes. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Imported from ivall/xcl. Originally posted by ethandepstein-del on 2026-11-24T04:05:47Z.
Code audit + Windows MSVC / NVIDIA RTX 5080 full-suite test run on
8caf783923c7ac348e28622f3200cb497c5390a7:Review
Looks clean and well-isolated behind
XCL_SHORT_MOVIES=1:BinkOpenWithOptions/BinkNextFrame/BinkCloseonbink2*DLLs whenBinkGotoresolves inside a game DLL, leavesframes <= 1untouched, and replaces stale entries if a handle address is reused.Tested
rustc 1.100.0(MSVC), debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4: 691 passed, 0 failed, 41 ignored.resolver::tests::short_movies_step_a_video_to_its_end_once: passed.SKIPPEDGPU/D3D12 tests:gpu_geometry_wave32_prefix_count_over_a_mask/gpu_wave32_program_in_wave64_hardware(no wave64), plus 2 D3D12 debug-layer tests (no d3d12SDKLayers.dll).Not tested
scripts/smoke.ps1run withXCL_SHORT_MOVIES=1(test suite only).AI use: code review and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:35:58Z.
Regression runs for this PR's head
8caf783and for its basemaindd2ae9a, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
XCL_SHORT_MOVIES=1itself: these runs leave it unset, so this is a regression check onlyReport written with Claude Code (Claude Opus 5.5) from runs on this machine.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
Imported from ivall/xcl. Originally posted by ThiagoAlexsander on 2026-11-24T18:35:57Z.
Windows datapoint (native, not Wine):
XCL_SHORT_MOVIES=1works on the retail title.Setup: Windows 11 Pro 26300, RTX 5080 16 GB (driver 32.0.16.1088), Ryzen 7 9800X3D, 62 GB. Rust 1.100.0, release. Retail title 1.0.2.1. The build was a local tree of
mainb7aa9f3with this PR (8caf783), #541 and #1273 merged, plus an unpublished stall-dump switch of mine. It is not this PR alone.What happened: the run had
XCL_SHORT_MOVIES=1,XCL_NETWORK=0and an A press at 10 s throughXCL_PRESS_AT. The log showsBink: XCL_SHORT_MOVIES=1 – videos of bink2scarlett.dll go to their last frame after the first, thena video of 450 frames went to its last frameat 11.9 s. The video was cut on screen, and the title went on with no crash and no device removal.One observation, from a separate local experiment on an older base (
930e8b4, not a controlled comparison): the title opens the 3840x2160, 450-frame intro four times, at about 6.5, 9.6, 9.7 and 9.8 s. A local wrapper set the frame count to 1 at the open, for every movie of at least 1280x720, and loading began at about 14 s. With this PR, one of the four went to its last frame, the Rockstar logo screen stayed up, and loading began at about 30 s.So the other three handles may never get a first
BinkNextFramebefore they are closed or replaced. If that is so,Waitingnever steps them. I haven't traced it further.Not tested: this PR on its own, AMD, and a Windows regression run of this PR alone.
AI use: Claude Code (Claude Opus 5.5) built and ran this and wrote the report. Posted with my approval.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:24:38Z.
Empirical test report (
8caf7839)Hardware / environment
8caf783923c7ac348e28622f3200cb497c5390a7for PR #681.0ef1bc386), hostx86_64-pc-windows-msvc. Cargo 1.100.0. DXC 1.9.2609.5 (01b62ad47). Test profile unoptimized with debug info and incremental compilation disabled.Invoke-ArcTest.ps1. The focused run usedXCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1and held no Arc GPU mutex.Commands and results
cargo test --workspace --no-runexited 0 and compiled the workspace test binaries without executing tests. Cargo emitted a deprecation warning forAtomicU32::fetch_updatein XGameRuntime.cargo test -p xcl --lib resolver::tests::exited 0. The log records 6 passed, 0 failed, 0 ignored, 0 skipped (case-sensitive lines beginning withSKIPPED), and 666 filtered out.Observed behavior
The PR adds one test,
short_movies_step_a_video_to_its_end_once. Its assertions confirmed that the resolver's waiting state yields the final frame number on the first step of a multi-frame video and consumes the entry. A single-frame video and a video closed before its first step yield no pending action. Opening a reused handle replaces its previous frame count. The five existing resolver tests also passed. The diff adds or modifies no integration tests.Not tested
Full GPU workspace suite, live title Bink playback, and game smoke runs were omitted.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr681-focused.log and published.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:06:16Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:16Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:56:23Z.
Triage (#1607) – head
8caf783Main already has this feature: #1053 (main commit
4f4db64) addedXCL_SKIP_BINK=1inhle/bink.rs. Like this PR, it wraps the title'sbink2*.dllimports inresolver::resolve_importand ends non-looping movies at their last frame. The difference is how: main setsframe_num/last_frame_numinBinkNextFrame/BinkDoFrame*/BinkWait, where this PR calls the DLL's ownBinkGotoat the firstBinkNextFrame.The branch conflicts with main in resolver.rs. With both switches set, the same imports would be wrapped twice. If calling
BinkGotoworks better than main's header writes for some title, that would be a change tohle/bink.rsrather than a second switch.Recommendation: close (superseded by #1053 / main commit
4f4db64).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:39:10Z.
Closing as superseded: this change is already on
main(4f4db645). hle/bink.rs (added by4f4db645, merged #1053,f5136a64) wraps the bink2 imports (BinkOpen/BinkOpenWithOptions/BinkNextFrame/BinkGoto) and fast-advances non-looping movies, opt-in via XCL_SKIP_BINK; PR only differs in env var name XCL_SHORT_MOVIESTwo independent checks found this: Foniass's close list on #1607 and ours against current
main. If something here is still missing onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.
Pull request closed