launcher: reuse one bounded verified DXIL snapshot #247

Closed
Valdi320 wants to merge 0 commits from upstream-pr/247 into main
Valdi320 commented 2026-11-26 16:23:53 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T16:23:53Z.


Changes

Read a content-cache DXIL entry once as a bounded regular-file snapshot; verify its digest and container before writing it to the private staging file, and return those same bytes to the caller for stage validation. Save the already validated bytes instead of rereading the output. Incrementally hash the HLSL key without allocating a concatenated copy. Share bounded file helpers with the runtime cache; identity and checksum reads are bounded and non-following. Keep existing cache keys and publication semantics.

Validation

  • Tests cover returned snapshot, oversized cache entry, linked payload or stamp, FIFO payload or identity, invalid entries and existing runtime shader validation.
  • All six no-GPU check groups and all eight Lanes GPU checks passed on RTX 4080 / GE-Proton11-14 using same-base runtime and fixture with source equality checked.
  • Synthetic structurally valid 8 MiB cached container (not executable DXIL), 25 warm reads per version: median 16.06 -> 9.65 ms, identical contents and SHA-256. Real Lanes covers normal compiled DXIL reuse. No retail performance claim.
  • Independent of #239 and #238; callers of fetch/save must be reconciled if merged together. Full GPU and AMD validation outstanding. No retail assets.
<!-- greyfinch-sync:brcly/TuxBox:issue:5513613144 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/247). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T16:23:53Z. --- ## Changes Read a content-cache DXIL entry once as a bounded regular-file snapshot; verify its digest and container before writing it to the private staging file, and return those same bytes to the caller for stage validation. Save the already validated bytes instead of rereading the output. Incrementally hash the HLSL key without allocating a concatenated copy. Share bounded file helpers with the runtime cache; identity and checksum reads are bounded and non-following. Keep existing cache keys and publication semantics. ## Validation - Tests cover returned snapshot, oversized cache entry, linked payload or stamp, FIFO payload or identity, invalid entries and existing runtime shader validation. - All six no-GPU check groups and all eight Lanes GPU checks passed on RTX 4080 / GE-Proton11-14 using same-base runtime and fixture with source equality checked. - Synthetic structurally valid 8 MiB cached container (not executable DXIL), 25 warm reads per version: median 16.06 -> 9.65 ms, identical contents and SHA-256. Real Lanes covers normal compiled DXIL reuse. No retail performance claim. - Independent of #239 and #238; callers of fetch/save must be reconciled if merged together. Full GPU and AMD validation outstanding. No retail assets.
Valdi320 commented 2026-11-26 16:40:07 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T16:40:07Z.


Integration follow-up, not a new merge request: github.com/Valdi320/TuxBox@a54533a2bb

Combined the existing four paired Wave64 optimizations with #228, #236, #238, #239, #240, #247 and #248. Resolved overlap in the launcher: content-lock wait time separately reported; large cold requests reserve capacity before waiting for a shared content lock; deferrals are not reported as failures; bounded snapshot bytes reused directly. Fast lane remains opt-in. The new interaction test passes.

Real DXC/DXV, synthetic mixed request queue (three equivalent large shaders and a small shader, two workers, three runs per mode): baseline 3 DXC calls, small and batch median 932 ms; combined without fast lane 2 calls, 845 ms; combined with fast lane 2 calls, small 33 ms and batch 754 ms. All output hashes identical across nine runs. Two deferrals correctly reported per fast-lane run. Synthetic translator stub supplies generated HLSL fixtures; no title performance claim.

Six code-check groups passed at final head. Earlier integration stage passed 31 guest controls, including presentation/4K; final D3D12 rebuild produced the same provider SHA-256, and 8 Lanes gates plus 4 XG-provider checks were rerun at final head. Private Xvfb automatically starts/restores environment, NVIDIA RTX 4080, GE-Proton11-14. XG provider reused from #248 after verifying its source equality. Native reference XG DLL unavailable; full GPU suite, AMD and retail validation outstanding. Branch is for interaction validation; individual PRs remain separately reviewable.

<!-- greyfinch-sync:brcly/TuxBox:comment:7197943487 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/247#issuecomment-7197943487). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T16:40:07Z. --- Integration follow-up, not a new merge request: https://github.com/Valdi320/TuxBox/tree/a54533a2bb5c83e23fbcad994caafea21607a975 Combined the existing four paired Wave64 optimizations with #228, #236, #238, #239, #240, #247 and #248. Resolved overlap in the launcher: content-lock wait time separately reported; large cold requests reserve capacity before waiting for a shared content lock; deferrals are not reported as failures; bounded snapshot bytes reused directly. Fast lane remains opt-in. The new interaction test passes. Real DXC/DXV, synthetic mixed request queue (three equivalent large shaders and a small shader, two workers, three runs per mode): baseline 3 DXC calls, small and batch median 932 ms; combined without fast lane 2 calls, 845 ms; combined with fast lane 2 calls, small 33 ms and batch 754 ms. All output hashes identical across nine runs. Two deferrals correctly reported per fast-lane run. Synthetic translator stub supplies generated HLSL fixtures; no title performance claim. Six code-check groups passed at final head. Earlier integration stage passed 31 guest controls, including presentation/4K; final D3D12 rebuild produced the same provider SHA-256, and 8 Lanes gates plus 4 XG-provider checks were rerun at final head. Private Xvfb automatically starts/restores environment, NVIDIA RTX 4080, GE-Proton11-14. XG provider reused from #248 after verifying its source equality. Native reference XG DLL unavailable; full GPU suite, AMD and retail validation outstanding. Branch is for interaction validation; individual PRs remain separately reviewable.
Valdi320 commented 2026-11-26 22:22:42 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T22:22:42Z.


Follow-up at ce7edf2bf2: launcher: reject wrong-stage snapshots before counting reuse. 383 tests, 27 skipped; stage mismatch rejects a structurally valid digest-matched snapshot before staging or counting it as reused. Host tooling only; no new GPU or title performance claim.

<!-- greyfinch-sync:brcly/TuxBox:comment:7204622364 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/247#issuecomment-7204622364). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T22:22:42Z. --- Follow-up at ce7edf2bf214630773db750c4597918d91e36556: launcher: reject wrong-stage snapshots before counting reuse. 383 tests, 27 skipped; stage mismatch rejects a structurally valid digest-matched snapshot before staging or counting it as reused. Host tooling only; no new GPU or title performance claim.
Valdi320 commented 2026-11-26 23:20:48 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T23:20:48Z.


Consolidated into #239 (b460d1c); the bounded snapshot, stage validation and tests are preserved and tested there. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at ce7edf2; no branch deleted.

<!-- greyfinch-sync:brcly/TuxBox:comment:7205463585 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/247#issuecomment-7205463585). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T23:20:48Z. --- Consolidated into #239 (b460d1c); the bounded snapshot, stage validation and tests are preserved and tested there. Closing this draft to make the review queue manageable, per the maintainer's request. The branch and history remain intact at `ce7edf2`; no branch deleted.

Pull request closed

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
brcly/TuxBox!247
No description provided.