flush subnormal factors to +0 in legacy float multiply #616
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!616
Loading…
Reference in a new issue
No description provided.
Delete branch "RileyW/Darner:pr/legacy-subnormals"
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?
Not yet run in-game on this Darner branch (synthetic DXIL/census unit tests run on this revision; previously verified on RTX 3080 SM86 in a downstream fork).
What it changes
The problem on main: read from code (crates/darner-shader/src/emit/lower.rs:4785, Lower::legacy_mul).
RDNA2 default FP32 mode flushes subnormals below f32::MIN_POSITIVE to zero before evaluating legacy float products (v_mul_legacy_f32, v_mac_legacy_f32, v_mad_legacy_f32), so subnormal times inf and subnormal times NaN yield +0.0.
On DXIL hosts that preserve FP32 denormals (such as NVIDIA), comparing with pred::OEQ against 0.0 misses subnormal factors. Under rdna::LEGACY, not_zero also skipped the guard for subnormal constants.
How it was tested
bfb6055(based onc8258f9)Checklist
Checked for overlap
[pr-fix][shaders] flush subnormal factors to +0 in legacy float multiplyto flush subnormal factors to +0 in legacy float multiplyTest needed — commit
bfb60559; what to check:The problem on main: read from code (crates/darner-shader/src/emit/lower.rs:4785, Lower::legacy_mul).
RDNA2 default FP32 mode flushes subnormals below f32::MIN_POSITIVE to zero before evaluating legacy float products (v_mul_legacy_f32, v_mac_legacy_f32, v_mad_legacy_f32), so subnormal times inf and subnormal times NaN yield +0.0.
On DXIL hosts that preserve FP32 denormals (such as NVIDIA), comparing with pred::OEQ against 0.0 misses subnormal factors. Under rdna::LEGACY, not_zero also skipped the guard for subnormal constants.
Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.