docs(debt): measure NaN texel bits through sampling and gathers on RDNA2 and NVIDIA #22727
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22727"
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?
Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-11-18T05:37:01Z.
What
A debt entry records how NaN texels come back through the sampler on RDNA2 and through AnyPS5 on NVIDIA, which differ:
image_sample_lz(point filter) on RDNA2 returns the canonical0xffc00000for any NaN texel. AnyPS5 on NVIDIA returns the texel's own NaN.image_gather4on RDNA2 returns the texel's NaN bit for bit. AnyPS5 on NVIDIA returns one canonical NaN for every NaN texel (0x7ffffffffor 32_FLOAT,0x7fffe000for 16_FLOAT).image_loadagrees everywhere, and AnyPS5 on the AMD GPU matches the hardware for all three.Only
docs/dev/debt/changes/docs-nvidia-sampled-nan-texels.mdis added; no code changes.Measurement:
tools/hw-oraclewith the default (hardware) runtime and thevulkanruntime (agc_oracle_runner), on an 8×1 2D texture with one texel per lane. The 16_FLOAT texels were 0x7c01, 0xfdee, 0x7e00, 0xfe00, 0x7fff, 0x7d23, -inf and 1.0. The 32_FLOAT texels were 0x7f800001, 0xffbfffff, 0x7fc00000, 0xffc00000, 0x7fffffff, 0x7fa46000, -inf and 1.0. Each was read byimage_load, byimage_sample_lzwith a point sampler at the texel centre, and byimage_gather4(DMASK 0x1). For 16_FLOAT:image_loadimage_sample_lzimage_gather432_FLOAT gives the same split, with NVIDIA's gather returning 0x7fffffff. -inf and 1.0 agree in every cell. The difference first showed in a differential
image_gather4sweep over formats, swizzles and masks, where it was the only NVIDIA-only difference.Tested
Windows 11 Pro 10.0.26200; NVIDIA GeForce RTX 5080 (driver 610.74) and AMD Radeon(TM) Graphics (RDNA2 iGPU, gfx1036, driver 32.0.21045.16010), AnyPS5 at
main. The fragment passestools/debt_fold.py --checkandtools/check_conventions.py. Not tested on a PS5.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T05:51:04Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this documentation change; the measured distinctions are clearly scoped to the listed GPUs, drivers, and operations.
What I ran
Reviewed head
6e70a2fec75109688cddc5341e2d8468ba0280e0. I did not run commands or tests; this change adds only a debt entry.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read
docs/dev/debt/changes/docs-nvidia-sampled-nan-texels.mdand the provided description, commit summary, manifest, and diff. The measurement results and author-reported checks were not independently verified. The description saystools/debt_fold.py --checkandtools/check_conventions.pypassed; I did not run them. No other changed files were listed in the manifest.To get this to a good state
Nothing is required.