You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpu: a view in another format reads wrong on NVIDIA hardware (R9G9B9E5 stand-in) #55
On an NVIDIA GPU (GeForce RTX 5050 Laptop, driver 621.40), resource::tests::a_view_in_another_format_reads_what_the_gpu_wrote (crates/xtp-gpu/src/resource.rs, about line 4549 on main f74e985) fails on the hardware adapter: texel 0,0 reads 0x34000000 where 0x79010100 is wanted. It passes on WARP (XTP_TEST_ADAPTER=warp).
$env:XTP_REQUIRE_GPU='1'; cargo test -p xtp-gpu --locked resource::tests::a_view_in_another_format_reads_what_the_gpu_wrote ----exact --nocapture
Likely cause
On NVIDIA, XTP keeps R9G9B9E5 as an RGBA16F stand-in (VIctory #492, the decoding pass from docs/analysis/world-black.md section 5). The test seems to expect the native format's bits, which only WARP keeps. So either the test should read through the stand-in, decoding as the title would see it, or the view's copy or decode path differs on hardware. That is worth knowing, since this path is one of the world-black fixes.
The full hardware xtp-gpu suite otherwise passed (391 passed, this 1 failed). No game files are needed.
Thanks, this is a useful catch: the R9G9B9E5 stand-in path is one of the fixes for the dark world, so a hardware-only mismatch there matters. It is now part of the task that moves the R9G9B9E5 decode into the list that reads the view (after its writer). That work will either make the test read through the stand-in as the title sees it, or fix the copy/decode path on hardware, and it will be checked on an NVIDIA GPU, not only WARP. I'll link the fix here.
I checked current main 0af2bac before taking this further: the native-versus-stand-in expectation and reader-list decode fixes are already present. I will validate the two existing synthetic regressions on an RTX 5050 Laptop GPU, then add a narrow regression-only check of shared-exponent HDR maximum and minimum-positive values in the forced RGBA16F stand-in. The current GPU regression exercises values at or below one; the CPU conversion already covers the full encoding range.
Scope is the existing resource.rs test module only, not another production decode implementation. I will report native/stand-in host format, exact driver and results; no game data is involved. This should confirm the existing #55 fix on a second NVIDIA adapter and cover the light-data range rather than duplicate the core task.
AI assistance: Codex is preparing and independently checking the synthetic coverage.
Validation completed on the NVIDIA GeForce RTX 5050 Laptop GPU, driver 621.40 (Windows 32.0.16.2140), using synthetic inputs only. The selected test device was identified by its LUID as vendor 0x10de, device 0x2dd8.
a_view_in_another_format_reads_what_the_gpu_wrote passes on both hardware and WARP.
packed_light_is_decoded_into_an_rgba16f_stand_in also passes on both, including the new maximum 65,408, minimum positive 2^-24, zero and alpha-one cases. Forced host format is RGBA16F (10); exact source bits and expected binary16 words were checked.
Both targeted tests pass under the strict serial WARP debug layer. The full normal-thread WARP PR check passes all six steps.
The 52-line, test-only extension is PR #77, head 34444c7. It preserves the existing ordering/replay tests and makes no production decode change. An independent reviewer checked encodings, finite clear payloads, readback offsets, device identification and cleanup. Actual game-lighting improvement is not inferred from these synthetic results.
AI assistance: Codex implemented, independently reviewed and ran this validation.
Activity
simnJS commentedon Nov 25, 2026
Thanks, this is a useful catch: the R9G9B9E5 stand-in path is one of the fixes for the dark world, so a hardware-only mismatch there matters. It is now part of the task that moves the R9G9B9E5 decode into the list that reads the view (after its writer). That work will either make the test read through the stand-in as the title sees it, or fix the copy/decode path on hardware, and it will be checked on an NVIDIA GPU, not only WARP. I'll link the fix here.
fogydes commentedon Nov 25, 2026
I checked current main 0af2bac before taking this further: the native-versus-stand-in expectation and reader-list decode fixes are already present. I will validate the two existing synthetic regressions on an RTX 5050 Laptop GPU, then add a narrow regression-only check of shared-exponent HDR maximum and minimum-positive values in the forced RGBA16F stand-in. The current GPU regression exercises values at or below one; the CPU conversion already covers the full encoding range.
Scope is the existing resource.rs test module only, not another production decode implementation. I will report native/stand-in host format, exact driver and results; no game data is involved. This should confirm the existing #55 fix on a second NVIDIA adapter and cover the light-data range rather than duplicate the core task.
AI assistance: Codex is preparing and independently checking the synthetic coverage.
fogydes commentedon Nov 25, 2026
Validation completed on the NVIDIA GeForce RTX 5050 Laptop GPU, driver 621.40 (Windows 32.0.16.2140), using synthetic inputs only. The selected test device was identified by its LUID as vendor 0x10de, device 0x2dd8.
a_view_in_another_format_reads_what_the_gpu_wrotepasses on both hardware and WARP.packed_light_is_decoded_into_an_rgba16f_stand_inalso passes on both, including the new maximum 65,408, minimum positive 2^-24, zero and alpha-one cases. Forced host format is RGBA16F (10); exact source bits and expected binary16 words were checked.The 52-line, test-only extension is PR #77, head 34444c7. It preserves the existing ordering/replay tests and makes no production decode change. An independent reviewer checked encodings, finite clear payloads, readback offsets, device identification and cleanup. Actual game-lighting improvement is not inferred from these synthetic results.
AI assistance: Codex implemented, independently reviewed and ran this validation.