d3d12: estimate shader progress in the overlay header #570

Open
smith-3 wants to merge 2 commits from upstream-pr/570 into main
smith-3 commented 2026-11-30 04:03:04 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by smith-3 on 2026-11-30T04:03:04Z.


Change

Show an ETA beside the existing percentage when the overlay knows the shader-pack total. Estimate time to the displayed 100% from recent progress in the current session. Use the median of five recent rate samples, smooth the rate and limit changes to the number displayed. Hide the estimate while rebuilding confidence after a stall or a large change in pace.

Keep the estimate on the existing header row. English remains the default and the estimate follows the configured overlay language. The estimate covers shader progress, since the title can finish loading before requesting every program in the pack.

Validation

All 17 progress::tests passed using Wine from GE-Proton11-14. They cover the displayed total, cache bursts, sustained rate changes, stalls and phase shifts. ProjectScarlett was run with the overlay on the integration build on an RTX 4080 SUPER with a warm shader cache.

python tuxbox.py check --no-gpu on ecc598b9 completed with 10 passed, 0 failed. Dedicated GPU presentation checks are pending.

<!-- greyfinch-sync:brcly/TuxBox:issue:5558752459 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/570). Originally posted by [smith-3](https://github.com/smith-3) on 2026-11-30T04:03:04Z. --- ## Change Show an ETA beside the existing percentage when the overlay knows the shader-pack total. Estimate time to the displayed 100% from recent progress in the current session. Use the median of five recent rate samples, smooth the rate and limit changes to the number displayed. Hide the estimate while rebuilding confidence after a stall or a large change in pace. Keep the estimate on the existing header row. English remains the default and the estimate follows the configured overlay language. The estimate covers shader progress, since the title can finish loading before requesting every program in the pack. ## Validation All 17 `progress::tests` passed using Wine from GE-Proton11-14. They cover the displayed total, cache bursts, sustained rate changes, stalls and phase shifts. ProjectScarlett was run with the overlay on the integration build on an RTX 4080 SUPER with a warm shader cache. `python tuxbox.py check --no-gpu` on `ecc598b9` completed with 10 passed, 0 failed. Dedicated GPU presentation checks are pending.
brcly commented 2026-11-30 04:12:01 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:01Z.


Heads-up: main just landed a large cleanup (up to e5d2e913), so this PR needs a rebase.

  • Formatting: the whole workspace is now formatted with rustfmt (see the new rustfmt.toml).
  • Lints: every crate denies unwrap(), lossy as casts and undocumented unsafe outside tests.
  • CI: it now also runs cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.

The least painful way is to format your branch first, so the rebase only shows real changes:

git fetch origin
git checkout origin/main -- rustfmt.toml
cargo fmt --all && git commit -am "rustfmt"
git rebase origin/main

Then run python tuxbox.py check --no-gpu, which now includes the format step.

If clippy flags something new:

  • A cast: use From for widening, TryFrom for narrowing, and a mask for bit fields.
  • An unwrap(): use ?, or expect with the reason it can't fail.
  • An unsafe block: it needs a // SAFETY: comment.

CONTRIBUTING's "Code checks" section lists the commands. Thanks!

<!-- greyfinch-sync:brcly/TuxBox:comment:7268557527 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/570#issuecomment-7268557527). Originally posted by [brcly](https://github.com/brcly) on 2026-11-30T04:12:01Z. --- Heads-up: main just landed a large cleanup (up to e5d2e913), so this PR needs a rebase. - **Formatting:** the whole workspace is now formatted with rustfmt (see the new `rustfmt.toml`). - **Lints:** every crate denies `unwrap()`, lossy `as` casts and undocumented `unsafe` outside tests. - **CI:** it now also runs `cargo fmt --check`, rustdoc with warnings denied, and Miri on the providers' unit tests. The least painful way is to format your branch first, so the rebase only shows real changes: ```sh git fetch origin git checkout origin/main -- rustfmt.toml cargo fmt --all && git commit -am "rustfmt" git rebase origin/main ``` Then run `python tuxbox.py check --no-gpu`, which now includes the format step. If clippy flags something new: - **A cast:** use `From` for widening, `TryFrom` for narrowing, and a mask for bit fields. - **An `unwrap()`:** use `?`, or `expect` with the reason it can't fail. - **An `unsafe` block:** it needs a `// SAFETY:` comment. CONTRIBUTING's "Code checks" section lists the commands. Thanks!
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/570:upstream-pr/570'
git switch 'upstream-pr/570'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/570'
git switch 'upstream-pr/570'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/570'
git switch 'upstream-pr/570'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/570'
git switch 'main'
git merge --squash 'upstream-pr/570'
git switch 'main'
git merge --ff-only 'upstream-pr/570'
git switch 'main'
git merge 'upstream-pr/570'
git push origin 'main'
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!570
No description provided.