Tests: implicit-LOD sample offset test uses s_wqm and the host's LOD #976
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/982"
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 ivall/xcl. Originally posted by vakaobr on 2026-11-24T09:52:22Z.
gpu_ps_image_sample_offset_implicit_lod_between_mipsfails on Apple's D3DMetal (macOS, CrossOver) for two reasons, neither in the code it tests. Part of #258.s_wqm, which a console shader runs before an implicit-LOD sample. On D3DMetal, quads along a diagonal of the test's triangle have helper lanes. Their u / v stay 0, so 30 pixels read mip 3 (300 where 30.25 is expected). A plain HLSLSamplewith the same offset, texture and triangle has no such pixels.CalculateLevelOfDetailon D3DMetal returns 0.2421875 for every pixel, so even correct sampling misses the 0.02 tolerance (25.22 where 26 is expected).What is in it
crates/xcl/src/gpu/recomp/tests.rs: the program starts withS_WQM_B64 exec, exec, and the expected values blend the two mips by the host's own LOD, read by a plain HLSL draw of the same triangle, texture and sampler. The tolerance and the per-mip texel check are unchanged. The test also asserts that the host LOD lies between mips 0 and 1.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<lib test exe> --exact <test> --test-threads=1 --nocapture).main6bac4b4: fails,pixel (0,0) = 25.21875, expected 26.3a6f95a(onmain9aec53d): passes.gpu_image_sample_offsetalso passes.6bac4b4, each failing the test as it should: mip 1 moved by mip 0's offset inemit.rsgivespixel (0,0) = 24.976563, expected 25.21875; withouts_wqm,pixel (14,4) = 300, expected 30.25.cargo test --workspace --no-fail-fast -- --test-threads=4: 724 passed, 0 failed, 41 ignored, the same asmain9aec53d(@Diskuss, https://github.com/ivall/xcl/pull/982#issuecomment-7128416945); NVIDIA RTX 3050 Laptop,scripts/test.ps1: 724 passed, 0 failed, 41 ignored, and the test passes on the base and at this head (@LANgmas, https://github.com/ivall/xcl/pull/982#issuecomment-7129499189); a second M5 Pro (x86_64-pc-windows-gnullvm, release): fails on9aec53dwithpixel (0,0) = 25.21875, expected 26and passes at this head (@mikebuckets171, https://github.com/ivall/xcl/pull/982#issuecomment-7129605612).Regression run
Test-only change in
tests.rs: noxcl-smokeblocks.Not tested
AI use
Imported from ivall/xcl. Originally posted by Diskuss on 2026-11-24T10:10:28Z.
Tested on AMD Radeon RX 9070 XT (RDNA4) at
3a6f95a690dfd0ab7aa7d90bd5655cb7be07d821AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32015.7029; Ryzen 7 5700X3D; 32 GB RAM; Windows 11 Pro build 26300.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build.
Tested (PR head as-is; it is 0 commits behind main
9aec53d, so no merge was needed):cargo build --workspace: OK (1 existing warning inxcllib).cargo test --workspace --no-fail-fast -- --test-threads=4: 724 passed, 0 failed, 41 ignored. The #718 flake did not appear.cargo test -p xcl --lib gpu_ps_image_sample_offset_implicit_lod -- --test-threads=1:gpu_ps_image_sample_offset_implicit_lod_between_mips1 passed, 0 failed.9aec53d(724/0/41).Not tested: retail title /
scripts/smoke.ps1(no game files), release build.Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.
Imported from ivall/xcl. Originally posted by LANgmas on 2026-11-24T10:59:00Z.
Independent validation — NVIDIA RTX 3050 Laptop (Windows D3D12)
Tested PR head:
3a6f95a690dfd0ab7aa7d90bd5655cb7be07d821PR base:
9aec53dTested in isolated worktrees at the exact baseline and PR revisions.
Hardware / environment
Focused A/B test — PASS
Test:
gpu_ps_image_sample_offset_implicit_lod_between_mipsBaseline (
9aec53d, before this PR):PR head (
3a6f95a):s_wqmand host-measured-LOD version introduces no regression on this NVIDIA configuration.The D3DMetal-specific LOD deviation reported by the author (0.2421875) was not observed on this NVIDIA adapter. This report therefore does not reproduce the original D3DMetal failure; it independently checks that the PR's cross-backend test changes remain correct on NVIDIA D3D12.
Full official test wrapper — PASS
Command:
.\scripts\test.ps1Result: 724 passed, 0 failed, 41 ignored, across 17 test binaries. Exit code 0.
The wrapper reported 2 GPU tests skipped because this adapter does not support native wave64.
One existing upstream
fetch_updatedeprecation warning was observed. No panic or device-removal event occurred.Skip and sample-data limitations
--nocapture: two debug-layer-dependent tests and one reserved-cubemap adapter capability test.XCL_SAMPLE_*variables were unset. Approximately 28 sample-gated tests returned early rather than exercising their full game-data paths. This is an estimate from source gates and observed runtimes, not a per-test exhaustive audit.Not tested
At validation time, the PR base (
9aec53d) was approximately 13 commits behind current upstream main (384f7f7). This report describes the exact PR head/base tested, not merge-time validation against current main.Interpretation
On this NVIDIA RTX 3050 configuration, the baseline test already passed, and the PR-head test also passed. The original D3DMetal-specific failure was not reproduced here. These results provide an independent NVIDIA D3D12 cross-backend check and show no regression on this adapter; they do not validate the original D3DMetal behavior or retail-game compatibility.
AI use
Devin (SWE-2 Max) assisted with test execution and result reconciliation. The contributor reviewed the results and authorized this report.
Imported from ivall/xcl. Originally posted by mikebuckets171 on 2026-11-24T11:03:49Z.
Verified on a second Apple silicon host, on the
gnullvmtarget: the test fails on the base with the LOD-shaped value you describe, and passes at this head.Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (adapter reports "AMD Compatibility Mode"), Rosetta 2, Rust 1.100.0,
x86_64-pc-windows-gnullvmwith LLVM-MinGW 20261117 (clang 23.1.6),--release --locked, test binary run under Wine, one test per process (--exact <full test path> --nocapture --test-threads=1). Base9aec53d, head3a6f95a.9aec53d: FAILED -panicked at crates/xcl/src/gpu/recomp/tests.rs:2060:13: pixel (0,0) = 25.21875, expected 26,test result: FAILED. 0 passed; 1 failed, exit0x65, 0.53 s.3a6f95a:ok. 1 passed; 0 failedin 0.50 s, exit0x0.The failing value sits below the expected 26, which is the shape an implicit LOD a little under the 0.25 the test assumes produces (the description measured 0.2421875 on its host). I did not read this host's LOD directly, so treat that as consistent with your diagnosis rather than an independent confirmation of the number. What is confirmed here is the pair that matters for merging: the test as written does not hold on this host, and at your head it passes. Which of your two changes - adding
s_wqm, or reading the host's LOD - carries the fix on this host I did not separate.Worth noting for anyone reading the #258 threads together: with #983's head (
ab7ce43) on the same base, this test still fails with the identical message attests.rs:2080(the line the atomics patch shifts), so the two PRs are genuinely independent - #983 does not touch it, and #982 does not touch the atomics tests. Both verified in one tree, base9aec53d.Not tested here: Windows (no Windows machine on this bench), and this PR's
CIjob has not run on GitHub - as with my own PRs here, a head from a fork shows only thePR checksdescription job until a maintainer approves a workflow run.Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. AI use: GPT-6 Luna built both trees, ran the test and drafted this comment; the values and line numbers are from those runs.
Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T11:56:50Z.
Test report from a second Mac, head
3a6f95aagainst its merge base9aec53d.Tested
x86_64-pc-windows-msvcwith clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (--exact --nocapture, 60 s cap).gpu_ps_image_sample_offset_implicit_lod_between_mips: base failed (pixel (0,0) = 25.21875, expected 26on this host); head passed.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:35:01Z.
Independent verification, merged onto current
main384f7f7locally (clean merge).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
cargo test -p xcl --lib implicit: 2 passed, 0 failed —gpu_ps_image_sample_offset_implicit_lod_between_mipspasses on real hardware with thes_wqmfix and host-LOD expectation.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:32:01Z.
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
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:08Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T08:26:02Z.
merge-check claim
head:
3a6f95a690Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T08:32:00Z.
merge-check
base:
d52ff48caahead:
3a6f95a690merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2875 passed, 2 failed, 51 ignored; 29 SKIPPED lines
failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base".
gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16fails on based52ff48cby itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T10:02:13Z.
merge-check claim
head:
3a6f95a690Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T10:09:32Z.
merge-check
base:
9dfbe3ea66head:
3a6f95a690merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The changed test
gpu_ps_image_sample_offset_implicit_lod_between_mipspassed.review: no blocking finding; test-only, one file, every hunk read. The test program now starts with
s_wqm, as a console pixel shader does before an implicit-LOD sample, and the expected mip weights come from the host's own LOD (a plain HLSL draw withCalculateLevelOfDetailover the same texture, sampler and coordinates) in place of the constant 0.25. The assertion is not weakened in tolerance (still 0.02), and it gains a check that the host LOD lies strictly between mips 0 and 1; what changes is that a host whose LOD differs slightly (the description names D3DMetal at 0.2421875) is compared against its own value. On this card the test passed before and after. The D3DMetal behaviour rests on the author's report.performance: none; tests only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-30T13:22:00Z.
Two
safe to mergechecks above (thank you @BBareth and @brainhay5); waiting for a merge.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:35:26Z.
Triage (#1607) – head
3a6f95aNo open or merged PR makes this test change. Main has neither the
s_wqmnor the host-LOD reference. However, main has since moved the body ofgpu_ps_image_sample_offset_implicit_lod_between_mipsinto a sharedimplicit_lod_between_mips(s_sharp)helper, which an aniso-point variant also uses. The change has to be redone in that helper (both tests get it), and the host LOD draw needs the S# that the caller passes.No problems found in the diff itself.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.