Allow round-to-zero mantissa truncation in check_rcas_views #125
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!125
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/125/head"
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?
@Holastor on GitHub · 2026-11-21 16:39 UTC · original
Holastor:fix/rcas-truncation-tolerance→main· +23 −8 · 1 files · 1 commits · closed without mergingSummary
Direct3D permits round-to-zero (truncation) when quantizing floating-point values into
DXGI_FORMAT_R9G9B9E5_SHAREDEXPtextures. On AMD RDNA 2 hardware, native UAV stores to format 67 truncatefractional mantissa steps on ties rather than rounding up and carrying into the next exponent field.
Specifically, at texel 1 (
inputs[1]), AMD hardware stores0x001ffe01(mantissas 1, 511, 7 with exponent 0)rather than carrying into exponent 1 (
0x08120000).This change introduces
RoundMode::TruncatealongsideRoundMode::NearestEvenandRoundMode::NearestHalfUpintests/ffx_rcas_views.cpp, allowing hardware stores adhering to Direct3D truncation rules to pass verification.Test Matrix
0x1002, Device0x73ff, Driver32.0.21045.11001)bvh_wave64_warp, 0 failed)offscreen_check.exe hardware --ffx-provider-looppasses withnative_trunc=317,mismatches=0,debug_errors=0.@R0Y00 on GitHub · 2026-11-21 17:16 UTC · original
Thanks for the RX 6600M measurements. #130 covers the same native RGB9E5 rounding path. Please compare the two references on your original input and report whether #130 reproduces the result before we consolidate them.
@Holastor on GitHub · 2026-11-21 17:43 UTC · original
@R0Y00 I verified the reference from #130 against the same inputs on the discrete AMD Radeon RX 6600M (vendor
1002,device
73ff, driver32.0.21045.11001).The results are identical:
native_toward_zero=317,native_half_up=0,mismatches=0).native_half_up && native_toward_zerois not triggered).Both reference formulas evaluate to
std::floor(scaled)on the non-negative clamped inputs. The implementationin #130 with the extra mixed-mode check and documentation in
docs/experiments.mdis clean and comprehensive.Happy to consolidate in favor of #130!
@R0Y00 on GitHub · 2026-11-21 18:08 UTC · original
Closing as a duplicate of merged #130. Thank you for rerunning the original inputs on the RX 6600M. Your report confirms 317 of 1,024 texels used round-toward-zero, with zero mismatches and a clean debug layer.
Pull request closed