Skip to content

Recompiler: D16 format loads of UNORM / SNORM data round once to nearest - #2027

Open
upipibi wants to merge 2 commits into
xcl-dev:mainfrom
upipibi:fix/d16-norm16-single-round
Open

upipibi wants to merge 2 commits into
xcl-dev:mainfrom
upipibi:fix/d16-norm16-single-round

Conversation

@upipibi

@upipibi upipibi commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Known: this PR's D16 normalization uses a 64-bit divide (d16_fmt in dxil/lower_mem.rs, norm16_rep in recomp/emit.rs), so every shader with a D16 load declares Int64 (SFI0 0x8000) in both backends. A 32-bit fix with tests is on upipibi/xcl branch fix/d16-norm16-no-int64 (af15e87, one commit on #2027's head; RTX 3070: gpu_buffer_d16 2/2 with XCL_DIRECT_DXIL=0 and =1, lib suite 1170 passed, 0 failed; a no-GPU test checks that the Int64 flag is clear for all 20 UNORM / SNORM D16 buffer and tbuffer loads). It isn't pushed here because a push needs a new title smoke pair, which I can't make.

Part of #2026 (XCL-BT-020's third item, #1488). The image half follows in a second PR.

A D16 buffer format load packed a UNORM / SNORM channel with f32tof16 of the decoded f32. That's two roundings, and on D3D12 the second one rounds toward zero. RDNA2 rounds code / (2^w − 1) once, to nearest even. So about half of all codes came back one unit in the last place low: 16_UNORM 0x0801 gave 0x2800, where RDNA2 gives 0x2801.

Overlap with #2360 (#1607 group D102): both round UNORM / SNORM codes to f16 once, to nearest. This PR also truncates the other non-integer channels to f16 (f16_rtz), where #2360 rounds them to nearest. NWProgramming00 measured buffer_load_format_d16_x on an RDNA2 gfx1036 (#1607 comment): the hardware truncates 32_FLOAT (6,011 of 6,011 values), and rounds normalized codes once to nearest.

What is in it

  • recomp/emit.rs: norm16_rep and d16_fmt in the prelude. The FormatLoad D16 channel goes through d16_fmt instead of f32tof16.

    • The code is recovered from the decoded value as round(f · (2^w − 1)).
    • code / (2^w − 1) has a binary expansion that repeats the w-bit code. So its first 32 bits, floor((code << 32) / (2^w − 1)), decide the rounding, and a tie can't happen.
    • SNORM uses |v| / (2^(w−1) − 1) and adds the sign.
    • Channels that aren't UNORM/SNORM, and DST_SEL 0/1, stay on f32tof16.
  • dxil/lower_mem.rs: the same as Lw::d16_fmt, at the three D16 format-load sites.

  • recomp/tests.rs: gpu_buffer_d16_loads_of_16_bit_norms_round_once, with 64 lanes each loading their own 16_UNORM and 16_SNORM code, against exact single rounding.

  • Second commit (b0aae2e): float channels of a D16 format load truncate with f16_rtz on both paths, instead of passing through f32tof16 / legacyF32ToF16. That conversion's rounding is the host's: it truncates on the RTX 3070 and WARP, but under vkd3d-proton it rounds to nearest (Shaders: D16 image reads of UNORM / SNORM texels are one ULP low for about half the codes Marvisak/VIctory#2006), while RDNA2 truncates (fix(shader): pack D16 image reads toward zero and saturate 32-bit integers as RDNA2 does boykopovar/AnyPS5#22750). New test gpu_buffer_d16_loads_of_32_bit_floats_truncate: 32_FLOAT values the two roundings tell apart (1 + 1.5 / 1.75 ulp, 65535, ±70000, a denormal half-way), plus -1.5 and +inf.

Tested

Regression run
Pair for the current head 0cab3ef against main 1a0bbe3, run by thehollowedone (comment, thanks): RTX 3080 Ti (621.35), stock scripts/smoke.ps1, clean release builds, 60 s offline. Pasted unedited.

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1641 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14266 MB
xcl-smoke v1
commit: 0cab3ef3b46a9b522fd8838051f2c404baa5fa62
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1639 (PresentX 1639)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14365 MB

Earlier: Toons29's pair, comment, was for b0aae2e, before the rebase onto main 5478c4a7..

Not tested

AI use

  • AI-assisted (Claude Code, Claude Opus 5.5): wrote the change, the tests and this description, and ran the tests above. Synthetic tests only; no game files.

🤖 Generated with Claude Code

A D16 buffer format load packed a UNORM / SNORM channel with f32tof16 of
the decoded f32: two roundings, the second toward zero on D3D12. RDNA2
rounds code / (2^w - 1) once to nearest even, so about half of all codes
came back one unit in the last place low (16_UNORM 0x0801: 0x2800 for
0x2801). That value's binary expansion repeats the w-bit code, so its
first 32 bits, floor((code << 32) / (2^w - 1)), decide the rounding and a
tie cannot happen. Both paths; checked against exact rounding for every
code at w = 2..16. xcl-dev#2026 (XCL-BT-020's third item).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJAutoCompare

JJAutoCompare commented Nov 25, 2026 •

Copy link
Copy Markdown

Tested

Independent Intel Arc A770 verification for #2026 on clean PR head d7bd99057d01219b23acb0ec52a68d2e11e88c77. Windows 11 Enterprise Evaluation 25H2 (26200.9974), Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 (x86_64-pc-windows-msvc), and DXC/DXIL 1.9.2609.5.

  • Prebuilt with cargo test --locked -p xcl --lib --no-run (exit 0). The test profile was unoptimized, with CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, and CARGO_PROFILE_TEST_DEBUG=0.
  • With XCL_ADAPTER=A770, XCL_REQUIRE_GPU=wave64, and XCL_DXC_DIR set to the 1.9.2609 package, ran the prebuilt lib-test executable under the shared Arc lock. For each test below, the command was & $exe gpu::recomp::tests::<name> --exact --nocapture --test-threads=1, in a separate process for each listed XCL_DIRECT_DXIL setting.
Test 0 (HLSL + DXC) 1 (direct DXIL for kernel execution)
gpu_buffer_d16_loads_of_16_bit_norms_round_once Pass Pass
gpu_typed_buffer_loads_and_stores Pass Pass
buffer_format_d16_packs_and_unpacks_halves Pass Pass
buffer_format_table_matches_llvm Pass

7 passed, 0 failed, 0 ignored, 0 skipped across seven processes. The rounding regression checked 64 UNORM and 64 SNORM output halves per backend.

  • Ran powershell -NoProfile -ExecutionPolicy Bypass -File L:/XclTooling/pr2027/reference.ps1 -Source <worktree>/crates/xcl/src/gpu/recomp/tests.rs. The reference used exact integer distances between adjacent binary16 values to check all 128 committed fixture values. It also compared a CPU model of the PR conversion against that reference for all 65,536 codes per format at five binary32 magnitude offsets (−2 through +2 ULP, clamped at zero). Each format had 327,680 comparisons and zero mismatches.

Not tested

Exhaustive GPU output, other normalized channel widths, D16 image loads, the parent commit, the full workspace suite, and retail-title smoke runs.

AI use

Codex (gpt-6.2-sol) wrote and ran the temporary reference check, ran the focused tests, and wrote this report.

Follow-up on 83d3d05

Tested

Independent STOR-WINLAB Arc A770 rerun for #2027 at 83d3d05107998927f48efe501584dacfd934c14c. GitHub showed the PR open at that exact head before and after the run. The worktree was clean and detached at the same SHA throughout testing. The existing JJAutoCompare Arc result in comment 7149616157 covers d7bd99057d01219b23acb0ec52a68d2e11e88c77. The PR discussion and reviews had no equivalent exact-head Arc result.

Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust and Cargo 1.100.0 (stable-x86_64-pc-windows-msvc, rustc 0ef1bc386), DXC and DXIL 1.9.2609.5. Cargo used the unoptimized test profile with two jobs and debug info and incremental compilation disabled.

cargo test --locked -p xcl --lib --no-run completed outside the Arc lock (exit 0). Under & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { ... }, ran the exact prebuilt command below in separate processes for XCL_DIRECT_DXIL=0 and 1, with XCL_ADAPTER=A770, XCL_REQUIRE_GPU=wave64, and the specified DXC directory.

& $exe gpu::recomp::tests::gpu_buffer_d16_loads_of_16_bit_norms_round_once --exact --nocapture --test-threads=1
Backend Passed Failed Ignored Skipped Filtered Child exit Test time
HLSL + DXC (0) 1 0 0 0 1,119 0 1.06 s
Direct DXIL (1) 1 0 0 0 1,119 0 0.47 s

Each run matched all 128 expected binary16 values across 64 UNORM and 64 SNORM inputs. The wrapper logged both settings, and the stock fixture's runner::run_code uses the direct translator without fallback when enabled. Both stderr logs show the DXC version because the fixture checks DXC availability before dispatch. The wrapper exited 0 and logged the mutex release.

Not tested

Other buffer widths or codes outside the fixture, image loads, filtered sampling, other shaders or adapters, the parent commit, the full workspace suite, and retail-title smoke runs.

AI use

T3 Code / Codex (gpt-6.2-sol) inspected the existing fixture and backend routing, ran the two tests, and wrote this report.

Raw evidence in L:/XclTooling/pr2027/run-20261125T041438211Z: environment.log, prebuild.{stdout.log,stderr.log,exit.txt}, direct-0.{stdout.log,stderr.log,exit.txt}, direct-1.{stdout.log,stderr.log,exit.txt}, and gpu-wrapper.{stdout.log,stderr.log,exit.txt}.

@raylitebull

Copy link
Copy Markdown
Member

Diff audit on d7bd990 looks strong (norm16_rep/d16_fmt in recomp/emit.rs + dxil/lower_mem.rs matches exact single rounding across all 65,536 16-bit UNORM/SNORM codes on AMD iGPU, RTX 5090, RTX 3070, and Intel Arc A770).

Remaining before merge:

  1. Rebase onto main to clear CONFLICTING/DIRTY (also drop the manual TRANSLATOR_VERSION = 9 bump in kernel.rs, as #1947 now auto-hashes gpu/dxil sources via XCL_DIRECT_DXIL_SOURCE_ID).
  2. Add paired xcl-smoke v1 blocks (main and PR) so PR description passes (or ask another contributor with a retail title to post them).

@luckyteagirl

Copy link
Copy Markdown
Contributor

Tested

  • Exact PR head 83d3d05107998927f48efe501584dacfd934c14c and main 5ce558f82a48c51d527f6035234dacbd29db3f05. Windows 11 build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M driver 30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5.
  • With XCL_ADAPTER=6800M and XCL_REQUIRE_GPU=1, cargo test --locked -p xcl --lib -j 2 gpu::recomp::tests::gpu_buffer_d16_loads_of_16_bit_norms_round_once -- --exact --test-threads=1 --nocapture passed under both XCL_DIRECT_DXIL=0 (HLSL/DXC) and =1 (direct DXIL): 1 passed, 0 failed, 0 ignored, no explicit skip in each run.
  • cargo build --locked --release -p xcl -j 2 passed for both revisions. A locally owned title completed a paired 7-second scripts/smoke.ps1 run on the RX 6800M. Each run showed one frame, with no crash or device removal. Peak process commit was 6,963 MB on main and 7,058 MB on the PR.

The two blocks below can be copied into Regression run in the PR description. A comment by itself does not satisfy XCL's description check.

main:

xcl-smoke v1
commit: 5ce558f82a48c51d527f6035234dacbd29db3f05
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 6963 MB

PR head:

xcl-smoke v1
commit: 83d3d05107998927f48efe501584dacfd934c14c
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7058 MB

Not tested

  • The short title runs logged zero draws and used default shader routing, so they do not demonstrate the D16 format-load path. The focused GPU test covers that path. I did not run the full workspace suite, longer title sessions, other adapters, or other normalized widths.

AI use

OpenAI Codex (GPT-6, exact variant not exposed in this session) ran the tests and smoke comparisons and drafted this report from their logs.

@JoaoPauluu

Copy link
Copy Markdown

A run with vkd3d-proton as the host D3D12 (DXIL → SPIR-V through dxil-spirv, then the NVIDIA Vulkan driver), so the DXIL goes through a different compiler than the native-Windows runs here: this PR's test passes.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 83d3d05 as it is (merge base with main 5ce558f), no uncommitted changes. The lib test binary runs under Wine, one test per process.
    • gpu_buffer_d16_loads_of_16_bit_norms_round_once: ok, not skipped

Not tested

  • the whole suite on this head, a retail title, native Windows, AMD.

AI use

  • Claude Code (Claude Opus 5.5) built the commit, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

d16_fmt passed float channels to f32tof16 / legacyF32ToF16, whose rounding
is the host's: it truncates on the RTX 3070 and WARP but rounds to nearest
under vkd3d-proton (Marvisak/VIctory#2006), where RDNA2 truncates
(boykopovar/AnyPS5#22750). Use f16_rtz in both paths, as the format
stores already do.

gpu_buffer_d16_loads_of_32_bit_floats_truncate loads 32_FLOAT values
that the two roundings tell apart (1 + 1.5 / 1.75 ulp, 65535, +/-70000,
a denormal half-way, -1.5, +inf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IvyNotFound added a commit to IvyNotFound/xcl that referenced this pull request Nov 25, 2026
# Conflicts:
#	crates/xcl/src/gpu/recomp/tests.rs
@Toons29

Toons29 commented Nov 25, 2026

Copy link
Copy Markdown

Regression run of b0aae2ec on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 568e7db7, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14592 MB
xcl-smoke v1
commit: b0aae2ecbb5c92bda70990ab3cb75475e869fbeb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1627 (PresentX 1627)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14597 MB

Against the limits in CONTRIBUTING.md: 104 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

@thehollowedone

Copy link
Copy Markdown
Contributor

Here is the requested scripts/smoke.ps1 pair from clean release builds of main 1a0bbe3 and PR head 0cab3ef.

RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC. The 60 s offline runs used separate copies of the same starting profile and DXIL seed, no input, PSO preload off, a 16 GiB job commit cap, and a 12 GiB system commit floor.

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1641 (PresentX 1641)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14266 MB
xcl-smoke v1
commit: 0cab3ef3b46a9b522fd8838051f2c404baa5fa62
gpu: NVIDIA GeForce RTX 3080 Ti
title: retail-private-fixture
seconds: 60
exit: 0x0
frames shown: 1639 (PresentX 1639)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14365 MB

The two D16 buffer tests also passed in separate processes with XCL_DIRECT_DXIL=0 and =1. cargo test --offline --locked -p xcl --lib gpu_buffer_d16_loads_of -- --nocapture --test-threads=1 gave 2 passed, 0 failed, 0 ignored, and 0 skips in each mode.

The smoke pair covers startup. AMD hardware, Wine, and world load were outside this test.

AI-assisted. Codex (GPT-6, exact variant unavailable) ran the tests and drafted this report.

@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #2360 solves the same problem (for #2026) in a different way: #1607, group D102. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

@raylitebull

Copy link
Copy Markdown
Member

Diff review (norm16_rep/d16_fmt in recomp/emit.rs + dxil/lower_mem.rs and f16_rtz float D16 truncation) and green CI look solid, with exact-head 0cab3ef NVIDIA and smoke runs verified.

Remaining before merge:

  1. An exact-head 0cab3ef AMD test run (previous RX 6800M and RX 9070 runs were on earlier commits 83d3d05 and b0aae2e).
  2. Confirm resolution/preference vs #2360 per the #1607 (D102) triage note.

@upipibi

upipibi commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@raylitebull On the two points:

  1. AMD run at 0cab3ef: I only have an RTX 3070, so this needs someone with a Radeon card. The earlier RX 6800M and RX 9070 runs were on 83d3d05 and b0aae2e.
  2. Against Recompiler: round normalized D16 buffer loads exactly #2360 (D102): both round a UNORM / SNORM code to f16 once, to nearest, and NWProgramming00 found both exact for every code of widths 2 to 16 (#1607 comment). They differ in the other non-integer channels. This PR truncates them to f16 (f16_rtz, in both backends). Recompiler: round normalized D16 buffer loads exactly #2360 keeps f32tof16, which rounds to nearest. NWProgramming00 measured buffer_load_format_d16_x on an RDNA2 gfx1036 with 32_FLOAT: the hardware truncates (6,011 of 6,011 values match truncation, 3,028 match round-to-nearest). Separately, SlopTart's run of Recompiler: round normalized D16 buffer loads exactly #2360 at 647932f (comment) shows DXC refusing its prelude helper, because snorm is a reserved HLSL keyword used as a parameter name there.

So on those measurements this PR matches the hardware in both parts. If the maintainers prefer one PR, #2360's UNORM / SNORM routine and this one give the same results for those codes.

AI-assisted (Claude Code, Claude Opus 5.5).

@DavidM1911

Copy link
Copy Markdown
Contributor

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

@luckyteagirl

Copy link
Copy Markdown
Contributor

RX 6800M follow-up on exact head 0cab3ef3b46a9b522fd8838051f2c404baa5fa62, as requested. The detached checkout was clean, and the remote PR head was unchanged before and after the runs. Upstream main was b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.

Tested

  • Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (RDNA2, driver 30.0.13002.13003), Rust 1.99.0 MSVC, DXC/DXIL 1.8.2502.11 from Windows SDK 10.0.26100.0.
  • I set XCL_ADAPTER=6800M and XCL_REQUIRE_GPU=1, used an isolated Cargo target with incremental compilation and test debug info disabled, and ran the following once with XCL_DIRECT_DXIL=0 and once with XCL_DIRECT_DXIL=1.
cargo test --locked -p xcl --lib -j 1 gpu::recomp::tests::gpu_buffer_d16_loads_of_16_bit_norms_round_once -- --exact --test-threads=1 --nocapture
  • HLSL/DXC and Direct DXIL each exited 0 with 1 passed, 0 failed, 0 ignored, 1201 filtered out, 0 skip markers. The fixture checks 64 UNORM and 64 SNORM results bit for bit. The fixture does not print the adapter name. Windows enumerated the RX 6800M and integrated Radeon separately, and the runner requires a DXGI adapter matching the explicit 6800M selector.

Not tested

The full workspace suite, retail smoke, other adapters, and a matching run on main were outside this run.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the focused tests, inspected the selector and logs, and drafted this report.

@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2027 at head 0cab3ef3b46a9b522fd8838051f2c404baa5fa62 (2 commits: 2a4d3c8baf8150c6e06bc87cfa6897130267e805 -> 0cab3ef3b46a9b522fd8838051f2c404baa5fa62; exact parent & merge-base: 426a5a745db4d5e4b037449ede0b70cb342f5192, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (0cab3ef3)

Command Result
cargo test --release -p xcl --lib gpu_buffer_d16_loads_of_32_bit_floats_truncate -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1201 filtered out × 3 (0.27s, 0.22s, 0.22s, 0 skipped; live RTX 4060 execution)
cargo test --release -p xcl --lib gpu_buffer_d16_loads_of_16_bit_norms_round_once -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1201 filtered out × 3 (0.31s, 0.23s, 0.23s, 0 skipped; live RTX 4060 execution)
cargo test --release -p xcl --lib buffer_format_d16_packs_and_unpacks_halves -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1201 filtered out × 3 (0.09s × 3, 0 skipped)
cargo test --release -p xcl --lib gpu::dxil:: -- --test-threads=4 (3 consecutive runs) 147 passed; 0 failed; 3 ignored; 1052 filtered out × 3 (3.11s, 3.23s, 3.16s, 0 skipped)
cargo build --release -p xcl Clean build (1m 03s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (426a5a745db4d5e4b037449ede0b70cb342f5192, same machine):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1591 (PresentX 1591)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14477 MB

PR #2027 (0cab3ef3b46a9b522fd8838051f2c404baa5fa62):

xcl-smoke v1
commit: 0cab3ef3b46a9b522fd8838051f2c404baa5fa62
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1616 (PresentX 1616)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 14473 MB

Runtime log observations (xcl.log)

  • 9203 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 449 hits, 11 misses, 11 compilations, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19663 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14472 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.

Limits of coverage

  • Both D16 format-load fixes (single-round nearest for 16-bit UNORM/SNORM and RTZ truncation for 32-bit floats) were directly exercised on desktop RTX 4060 via gpu_buffer_d16_loads_of_32_bit_floats_truncate (3/3), gpu_buffer_d16_loads_of_16_bit_norms_round_once (3/3), buffer_format_d16_packs_and_unpacks_halves (3/3), and gpu::dxil:: (147/147 × 3).
  • The 60 s retail smoke confirms zero runtime or shader-compilation regression (11 recompiled shaders, 0 failures; single-run frame/commit delta vs. parent reflects normal startup variance, not this PR); AMD/Intel host D16 hardware behavior was not tested here.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants