Repository navigation
Conversation
…the float fallback as a control ItsNotRexed#2458 made the explicit-LOD form use the T# format; its GPU checks ran in a temporary harness. cs_sample_l_int.asm keeps them in the suite: each lane samples its own texel of the R32_UINT and R32_SINT images with image_sample_l, full-width and D16, and stores the sum (100 - i) only when both widths agree. An unregistered T# that names R32_UINT reads the float fallback (the rgba8 image), whose red channel goes to the uint image. vk_store_test gains a "sample-l" mode: filled as for "load", plus the rgba8 gradient the fallback reads; it expects 100 - i in the sint image, round(x / 7 * 255) in the uint image and the untouched gradient. On an RTX 5070 Ti all 64 lanes match. With ItsNotRexed#2458's lowering reverted, the D16 samples disagree with the full-width ones in all 64 lanes (as the RTX 5070 check in ItsNotRexed#2458 saw), while the fallback control still matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Apple M2 data point. Tested head cc07124 on Apple M2 (Mac14,3), macOS 26.4 (25E246), MoltenVK 1.4.2 (direct), subgroup 4..32, llvm-mc 23.1.6, Python 3.13.18.
Build note: full build fails on AppleClang 17 at vk_pipeline_check.cpp:567 (BUILD-822, fixed by open PR #2927); GPU binaries built, so the run above is valid. Head fetched unchanged into a separate worktree; no rebase/edit/push. Synthetic shader and counts only; no game files. AI-assisted. |
|
The Radeon GPU report in #166 covers this exact head in the tested #3187/#3190 stack: all 192 texels passed, with zero Khronos core or synchronization validation violations. One test-strength note from that run: comparing each D16 sample separately would catch compensating errors that leave the current sum unchanged. AI-assisted. |
|
Strengthened in Confirmed on RTX 5070 Ti / driver 617.14 / Windows 11 build 26200:
The PR body and translator contract now describe the separate comparisons and the compensating-error control. The earlier full semantic run is explicitly labelled with its original |
|
Tested
No game files. |
|
Tested
llvm-mc 21.1.8, SPIRV-Tools via WSL forwarders, Python 3.13. Synthetic fixtures only, no game data. AI-assisted (OpenCode). |
|
Tested 7bea89f on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass
Ran against a separate PR runtime build because the PR modifies AI-assisted (OpenCode). |
|
Tested
No game files. AI-assisted (Claude Code). |
…nteger-gpu # Conflicts: # tests/test_shader_checks.py
|
Merged current Retested
Synthetic fixtures only, no game files. AI-assisted (Claude Code). |
|
Tested dc5b72e (the head with Same laptop, one GPU at a time through
215 shaders translated, 215 pass spirv-val in each run. I did not run the CPU tests of this PR. One run of each. No game files. AI-assisted (Claude Code). |
|
Tested Ran the PR’s synthetic fixture through
AI-assisted verification with synthetic inputs. |
|
Verified on Linux: merges cleanly into current main and all CPU-side checks pass — tests/test_shader_checks.py (75 tests), test_image_load_typed (21) and test_run_gpu_tests_paths green under python -I, compileall clean. The wiring is consistent end to end (check.py loop, run_gpu_tests.py mode dispatch and the TOTAL accounting all move four fixtures to five together), cs_sample_l_int.asm is a hand-written listing with its derivation in the header, and the per-lane D16-vs-full-width pre-comparison is a genuine improvement over a sum-only check. The GPU results (RTX 5070 Ti matches, sabotage injections) could not be reproduced on this CPU-only box and are taken on trust. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested
|
SHADER-627. Claimed by @erickbobd in the coordination issue, carried forward to #3381.
Depends on: #2458 (already merged into
main).#2458 fixed integer 2D
image_sample_l, but the existing GPU fixtures did not execute that path. This adds a permanent hand-written compute fixture forR32_UINTandR32_SINT, with full-width and D16 samples, plus a descriptor-miss float fallback control. It is registered in both GPU runners and documented in the translator contract.Each of the 64 lanes samples its own texel centre. The signed image must contain
100 - ionly when each D16 sample matches its own full-width counterpart; either disagreement writes0x7fffffff. UINT and SINT are compared separately so compensating errors cannot cancel in the sum. An unregistered descriptor namingR32_UINTmust read the float fallback, whose known red gradient is written to the unsigned image. The RGBA image remains unchanged. The newvk_store_test sample-lmode supplies these synthetic texels and checks all three images. This covers nearest sampling at LOD 0 with one mip.Measured again with the strengthened per-sample comparisons on NVIDIA GeForce RTX 5070 Ti, driver 617.14, Windows 11 build 26200, Vulkan SDK 1.4.363.0:
0x7fffffff)The negative control's SPIR-V still validates; the GPU readback rejects it with exit 1. The fixed fixture exits 0. This demonstrates that the fixture detects the old lowering on this GPU, rather than merely translating successfully.
Additional negative control, following the review: inject UINT D16 +1 and SINT D16 -1 after unpacking. The previous sum-only fixture missed these errors (0/64 bad), while the separate comparisons reject all 64/64 lanes. Injecting either error on its own also rejects 64/64 lanes, confirming that both comparisons are required. The float fallback and RGBA control still have 0 bad texels in every case.
Validation:
scripts/run_gpu_tests.py --require-passsuite has 154/200 passed, 46 skipped in native mode and 185/200 passed, 15 skipped withLEONIDA_W64_EMULATE=1, no failures. The skips are reported separately.tests/test_shader_checks.py: 70 tests OK;test_run_gpu_tests.py: 38 OK;test_run_gpu_tests_paths.py: 20 OK;test_image_load_typed.py: 21 run, 2 skipped, no failures.test_docs_*checks,test_text_write_line_endings.py,compileall, andgit diff --checkpass.python -m unittest discover -s tests/semantic -qatcc071245, before this fixture-only strengthening: 7,322 tests, OK (4 skipped, 1 expected failure). The full GPU runs and the 70 shader-check / 21 typed-image tests above were repeated after strengthening the comparisons.Assembler: the existing local
LLVM_MCshim uses AMD RGA 2.15'sclang -cc1as(LLVM 23.0.0git) and strips source comments; this machine has no standalone AMDGPUllvm-mc.#2225 adds float pixel-sampling fixtures through
vk_texture_test; it covers different cases but touches the same runner registration lines, so whichever lands second will need to rebase those lines.Only hand-written assembly, synthetic texels, test-runner registration and documentation are included.
AI-assisted: Claude Code implemented the original fixture and harness changes. Codex reviewed the diff, strengthened the per-sample comparisons, rebuilt the runtime, repeated the CPU/GPU checks and negative controls, and prepared this submission.