fix(xgameruntime): reject non-finite HDR luminance values in hdr::normalize #374
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!374
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-374"
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?
@Lewandox on GitHub · 2026-11-26 13:44 UTC · original
Lewandox:fix/xgameruntime-hdr-non-finite→main· +9 −3 · 1 files · 2 commits · merged 2026-11-26 14:02 UTCSummary
Fixes
hdr::normalizeincrates/anyxboxx-xgameruntime/src/hdr.rsallowingf32::INFINITYthrough asmax_tone_map_luminance(andmax_full_frame_tone_map_luminance).Previously,
normalizecheckedmin.is_nan() || max.is_nan() || min < 0.0 || max <= min, so a reported(0.01, +inf, 400.0)bypassed all checks and returnedmax_tone_map_luminance = +infto the title's tone mapper. Similarly,full_frame == +infbypassed the fallback check.Changes
crates/anyxboxx-xgameruntime/src/hdr.rs: Use!is_finite()instead ofis_nan()formin,max, andfull_frame.f32::INFINITYandf32::NEG_INFINITYacrossmin,max, andmax_full_frame_tone_map_luminance.Verification
cargo fmt -p anyxboxx-xgameruntime -- --check— passcargo clippy -p anyxboxx-xgameruntime --no-deps --all-targets -- -D warnings— passcargo test -p anyxboxx-xgameruntime hdr::tests— all passed, 0 failed