Warn about invalid numeric runtime settings #525

Open
github-bot wants to merge 1 commit from github-bot/gh-525 into a-publier AGit
Owner

@⁠nufu88pa on GitHub · 2026-11-27 08:45 UTC · original
nufu88pa:fix/numeric-setting-warnings → a-publier · +47 −8 · 3 files · 1 commits · open

Fixes #514.

Changes

  • Warn once when the VICTORY_AMBIENT_SETTLE time constant is invalid and report the fallback. An explicit 0 still selects legacy settling quietly.
  • Warn once when VICTORY_MOUSE_SENS or VICTORY_DSTORAGE_STAGING_MB cannot be parsed or fails existing validation. Include the supplied value and the fallback in the warning.

Verification

Built on Windows with Rust 1.98.1 and diagnostics enabled. The ambient, GameInput, and DirectStorage test groups passed (30 passed and one benchmark ignored). git diff --check passed.

The broader victory-gpu run reported six failures. Each reproduced on a-publier at 4eb6cfd in the same environment. One was in a D3D12 descriptor read and five returned Windows access-denied errors in the pipeline library and shader cache tests.

Prepared with assistance from Codex.

**@⁠nufu88pa** on GitHub · 2026-11-27 08:45 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/525) `nufu88pa:fix/numeric-setting-warnings` → `a-publier` · +47 −8 · 3 files · 1 commits · open Fixes #514. ## Changes - Warn once when the `VICTORY_AMBIENT_SETTLE` time constant is invalid and report the fallback. An explicit `0` still selects legacy settling quietly. - Warn once when `VICTORY_MOUSE_SENS` or `VICTORY_DSTORAGE_STAGING_MB` cannot be parsed or fails existing validation. Include the supplied value and the fallback in the warning. ## Verification Built on Windows with Rust 1.98.1 and diagnostics enabled. The ambient, GameInput, and DirectStorage test groups passed (30 passed and one benchmark ignored). `git diff --check` passed. The broader `victory-gpu` run reported six failures. Each reproduced on `a-publier` at `4eb6cfd` in the same environment. One was in a D3D12 descriptor read and five returned Windows access-denied errors in the pipeline library and shader cache tests. Prepared with assistance from Codex.
Report the fallback used for malformed ambient settling, mouse sensitivity, and DirectStorage staging settings. Explicit ambient zero still selects legacy settling quietly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 08:49:54 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-27 11:40 UTC · original

Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At 9857101: victory-gpu 396 passed, 0 failed, 34 ignored; victory-hle 162 passed, 0 failed, 2 ignored.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 11:40 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/525#issuecomment-7217342379) Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `9857101`: `victory-gpu` 396 passed, 0 failed, 34 ignored; `victory-hle` 162 passed, 0 failed, 2 ignored. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠gut0to on GitHub · 2026-11-27 13:20 UTC · original · reviewed

AI-assisted review: I checked this against the new invalid-setting diagnostics and the staging-size conversion. Could we validate the parsed MiB value before the later << 20 conversion? A value can parse successfully as u64 while its byte conversion discards high bits, so an oversized setting is silently accepted instead of warning and falling back to the title-requested size. A checked MiB-to-byte conversion plus boundary tests would keep the warning behavior consistent.

**@⁠gut0to** on GitHub · 2026-11-27 13:20 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/525#pullrequestreview-6088781561) · **reviewed** AI-assisted review: I checked this against the new invalid-setting diagnostics and the staging-size conversion. Could we validate the parsed MiB value before the later `<< 20` conversion? A value can parse successfully as `u64` while its byte conversion discards high bits, so an oversized setting is silently accepted instead of warning and falling back to the title-requested size. A checked MiB-to-byte conversion plus boundary tests would keep the warning behavior consistent.
@ -239,0 +240,4 @@
};
if let Some(floor) = value.to_str().and_then(|v| v.trim().parse::<u64>().ok()) {
return floor;
}
Author
Owner

@⁠gut0to on GitHub · 2026-11-27 13:20 UTC · original

A u64 MiB value can parse here but overflow when converted to bytes by << 20, silently yielding a different floor. Could this path reject values above u64::MAX / (1 << 20) and test that boundary?

**@⁠gut0to** on GitHub · 2026-11-27 13:20 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/525#discussion_r4719888164) A `u64` MiB value can parse here but overflow when converted to bytes by `<< 20`, silently yielding a different floor. Could this path reject values above `u64::MAX / (1 << 20)` and test that boundary?
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/525/head:github-bot/gh-525'
git switch 'github-bot/gh-525'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-525'
git switch 'github-bot/gh-525'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-525'
git switch 'github-bot/gh-525'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-525'
git switch 'a-publier'
git merge --squash 'github-bot/gh-525'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-525'
git switch 'a-publier'
git merge 'github-bot/gh-525'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.