Repository navigation
Conversation
734212e to
d15b43a
Compare
d15b43a to
c3f3403
Compare
|
Tested c3f3403 on Windows with an AMD RDNA2 iGPU and an RTX 5070: pass (first Windows and AMD runs; the PR was tested on an RTX 2060 SUPER under Linux). Windows 11 Home 10.0.26300, MSVC 14.44.35207, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8, Python 3.14.7,
ctest with AI-assisted (Claude Code). No game files. |
|
Your full-frame D16 checker covers the same improvement I opened in #1226; I missed this older claim and am closing the duplicate. One distinct issue still applies to your texture_sample_d16_test: the shader literal sampler key is (0x92, 0xc00000, 0x14500000, 0) but the helper passes four zeros after ptr_sgpr. Both sampler slots currently have identical filtering. On RTX 5080 I made only fallback slot 0 linear: binding the four zeros gave 4032/4096 wrong pixels, while binding the encoded key returned all 4096 exactly. Please use the encoded words in that call (and in the fixture usage comment). Swapping only R/G in the shader export also confirms the oracle should reject the predicted 3584 pixels. Details: #1226 (comment) . AI-assisted. |
|
Tested c3f3403 on RTX 5070, driver 621.24, Windows 11: pass. |
c3f3403 to
5b27d8c
Compare
|
@Vonsek thanks, you're right: |
|
Tested Independent Vulkan pass on Linux 7.0.0-43-generic with a GeForce RTX 5090, NVIDIA driver 595.99.02, LLVM 21.1.8, and SPIRV-Tools 2026.1. Both runners passed the four stock texture fixtures. I repeated the sampler-selection control with only fallback sampler 0 changed to linear filtering in a local harness build. The declared sampler key still matched all 4,096 pixels. Passing zeros instead produced 4,032 mismatches, confirming that the corrected key selects the intended point sampler. AI-assisted verification. |
5b27d8c to
8e62e5e
Compare
ff3c75d to
0121b00
Compare
|
Tested Runtime and test programs built from this head (MSVC 14.51, Ninja, RelWithDebInfo), native Windows
In AI-assisted (Claude Code); I checked the results. |
0121b00 to
7fe6ab7
Compare
|
Rebased on main 0db7fed (7fe6ab7). main's |
|
Tested
Every other test has the same result as on This PR is about
The five tests it adds to |
|
Tested 7fe6ab7 (merge base 98fa503) on NVIDIA GeForce RTX 5080, Linux 580.65.06: pass Tested the PR head merged with current main
Line-by-line against my main run (results that differ from main):
Not run: the full AI-assisted (Claude Code). |
CONTRIBUTING.md asks for a check in check.py for every GPU test; this one was only in run_gpu_tests.py. TEXTURE_MODES runs a shader in one of vk_texture_test's own modes, from the directory with the shaders, as run_gpu_tests.py does.
Only run_gpu_tests.py ran vk_texture_test cube; CONTRIBUTING.md asks for a check in check.py too.
Only run_gpu_tests.py drew it. Its full-frame check (445be4d) moves to check.py so both runners judge the frame the same way.
Both runners passed zeros as the S#, so the shader's (0x92, 0xc00000, 0x14500000, 0) wasn't in the descriptor table and the draw read fallback sampler 0, which only filters the same by chance. With sampler 0 made linear, zeros give 4032 wrong pixels and the shader's words none.
It looked at the center pixel's blue and alpha only, so a sample of the wrong texel passed: with U and V swapped in ps_texture_sample, 3584 of 4096 pixels are wrong and it still said PASSED. Now each pixel must be the gradient texel its UV reads.
vk_texture_test's default mode, which takes no mode argument.
7fe6ab7 to
84bb1cc
Compare
|
Rebased on main 042c5f3 (84bb1cc). vk_texture_test's default mode now sits after main's new fetch block ( |
|
Independent Windows 11 check at
Synthetic inputs only. AI-assisted validation. |
|
Tested 84bb1cc on Intel Arc A770 (DG2), Mesa ANV 25.2.8, Ubuntu 24.04 / Linux 7.0, llvm-mc 21.1.8: pass, compared with
|
|
Tested 84bb1cc on AMD Radeon RX 6800 (RDNA2 gfx1030, AMD 26.11.2, Windows 11): pass Trial merge onto
AI-assisted run (Claude Code). |
|
Tested 84bb1cc merged onto main dde82f2 on Apple M4, macOS 27.2.1, MoltenVK 1.4.2, Python 3.15.2 and 3.12.16: pass. This is the first Apple/MoltenVK run. The test programs were built from the merge, and main's from a clean dde82f2 tree.
AI-assisted. |
Claimed in #374 as: #374 (comment)
What and why
CONTRIBUTING.md asks for a check in
check.pyfor every GPU test, but four texture tests only ran inscripts/run_gpu_tests.py:ps_sample_c_lzandps_sample_c_lz_a16(from #399 and #455: theircheck.pycommitscame after those PRs' merge round, so they're here),
ps_cube_sampleandps_texture_sample_d16, and a fifth,ps_texture_sample, whose own check invk_texture_testlooked at one pixel's blue and alpha. Both runners alsodrew
ps_texture_sample_d16with the wrong S# (@Vonsek's review).Commits:
TEXTURE_MODESincheck.py: a shader run in one ofvk_texture_test's own modes, from the directory with theshaders, as
run_gpu_tests.pyruns it (rungets acwd). Starts withps_sample_c_lz(dref). Unit tests intests/test_shader_checks.py(PASSED is ok; FAILED or no PASSED fails; exit 77 skips).ps_cube_sample(cube) joins itcheck.pydrawsps_texture_sample_d16too. The full-frame checkrun_gpu_tests.pygot in 445be4d(
check_d16_texture) moves tocheck.py, unchanged, so both runners judge the frame with the same code.ps_sample_c_lz_a16(dref_a16) joinsTEXTURE_MODESvk_texture_testregisters the four words afterptr_sgpras sampler 1 in the descriptor table. Both runnerspassed zeros, but the shader builds the S#
(0x92, 0xc00000, 0x14500000, 0)ins[16:19], so its lookup missedand the draw read fallback sampler 0, which only filters the same by chance. Both runners now pass the shader's
words (
D16_SAMPLERincheck.py), the fixture's usage line too, and a unit test compares them with thes_movsin the
.asm.vk_texture_test's default mode (ps_texture_sample, run byrun_gpu_tests.py) checked the center pixel's blueand alpha only, so a sample of the wrong texel passed. Now every pixel must be the gradient texel its UV reads, all
four channels.
check.pyrunsps_texture_sampletoo:TEXTURE_MODESmaps it toNone, the default mode, which takes no modeargument
Tested
NVIDIA GeForce RTX 2060 SUPER, Linux, driver 620.70.06, llvm-mc 23.1.5, rebased on 6a6704d.
runtime/test/shaders/build.pyspirv-valruntime/test/shaders/check.pyscripts/run_gpu_tests.pyps_texture_sample: PASSED on all 4096 pixels)python -m unittest discover -s tests/semanticpython -m pytest tests --ignore=tests/semantictest_cf_ref.py(2) andtest_world_names.py(3), which fail the same way on main at 6a6704dThe skips are the wave64 tests (32-wide subgroups here) and, in
check.py, the mesh fixturesbuild.pydoesn't build.image_sample_c_lzd16 fix (d701d73 reverted),check.pyreportsps_sample_c_lzasvk_texture_test dref: FAILED, 0 pixels wrong in the f32 result and 2048 in the d16 one.vk_texture_testwhose fallback sampler 0 is linear (a local build only, as @Vonsek did on anRTX 5080): zeros give
4032/4096 mismatches; at (4,0), the shader's words4096/4096 RGBA pixels exact. With thenormal build both are exact, which is why nothing noticed.
ps_texture_sample.asm(what a translator that mixed up thecoordinates would give): the old check says
PASSED (verified center pixel rgba=(0.502, 0.502, 0.502, 1.000) ...),the new one
3584 of 4096 pixels FAILED, first at (8,0). The real shader passes on all 4096 pixels.The runs above are from my own machine.
Checklist