Commit Graph

59 Commits

Author SHA1 Message Date
f051ae5183 d3d12/tests: fix Windows MSVC build, CopyMemory collision, copy parity guard, and --no-ftz32 probe 2026-11-29 11:41:49 -05:00
f77b4d80d0 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-28 03:05:44 -08:00
ca0827cdc2 Merge pull request #2026 from alexandersato0830/codex/gpu-runner-replay-no-cases
Reject GPU disassembly replays with no runnable tests (GPU-RUNNER-REPLAY-NO-CASES)
2026-11-28 09:04:32 +01:00
25fd8e4776 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-27 23:02:20 -08:00
e2377070d3 GPU tests: give cs_pk_mul_lo_const its 128 words, keep the exit message of a dump row
cs_pk_mul_lo_const runs 32 lanes that each store 16 bytes, 128 words, but
run_gpu_tests.py and check.py ran it without VKC_OUT_WORDS, so
vk_compute_test gave it the default 64 and lanes 16-31 wrote past the
buffer through its device address (GPU-AV:
VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819). Both runners now pass
VKC_OUT_WORDS=128 (check.PK_MUL_LO_ENV), and the fixture's Run line
says so.

run_gpu_tests.py's dump rows (the bounds group, cs_heap_init,
cs_user_sgprs) showed the printed words whenever there were any. A run
that printed the right words and then exited non-zero (validation
errors) was a FAIL that showed only the expected words. dump_result now
reports "exit N: <output>" for a non-zero exit.

Found by kevincommits in the coordination issue (#1608).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 04:36:05 -06:00
ae364461bf rdna2spirv, docs, tests: address #2239 review findings and 1080p precision check 2026-11-26 15:45:23 -08:00
cd8d9aa7a8 rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback
Lower computed v_interp_p1/p2 (I, J) pairs under --f16-interp-fallback (without --bary-fallback) without PerVertexKHR or a geometry shader by hoisting OpDPdxFine/OpDPdyFine screen-quad barycentric and attribute derivatives into uniform %entry (OpCapability DerivativeControl, guarded by an integer IEEE-754 normal determinant check) and evaluating P_0 + I*P_10 + J*P_20 per site.
2026-11-26 01:57:43 -08:00
fb5796b8ed Merge pull request #609 from TuroYT/fix/gpu-runner-tbuffer-verdict
run_gpu_tests: record the cs_tbuffer_store verdict (GPU-RUNNER-TBUFFER-VERDICT)
2026-11-25 22:27:40 +01:00
85e522c3b0 Reject GPU disassembly replays with no runnable tests 2026-11-25 12:29:41 -06:00
154e4ec034 Merge the #984 result (main + RT-PROTON-STORY-LOAD) into #939
The base is 8a242efeb, the merge of main and #984. 68 files conflicted; they were resolved in seven groups by
one rule: the same change in two forms keeps the base's form, everything only #939 has is kept, and where the
two solve one problem in two ways the base's is the frame and #939's plugs into it.

A, the Xbox proxy (d3d12_xs_device.cpp/.h, d3d12_xs.cpp, d3d12_xs_pso_stream.cpp/.h, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, device_proxy_test.cpp, queue_proxy_test.cpp): the base's files with #939's additions
ported in. Device slot 57 asks #939's NativeGraphicsFactory first and falls back to the base's
proxy_create_graphics_pipeline_from_native_code on E_NOTIMPL. Kept from #939: the providers (texture lease,
raw texture view, resource by address, constant view, descriptor mapping, depth-stencil UAV, texture pages),
the title-backed descriptor mirror, slot 13's feature answers, GPU labels on list slots 71/72. Dropped: #939's
duplicates of the boot ladder routes, its fallback window, its slot 133 stand-in.

A2 (xs_proxy_mock_test.cpp): the base's test with #939's slot 70 raw-buffer case; presentation cases follow
#939's rule that a device which ever had a handler has no queue fallback.

B1, the Vulkan device (d3d12_vulkan_device.cpp, d3d12_com.cpp/.h, shader_library.h, queue_families.h,
pipeline_cache_file.h, startup_trace.h): one lazy-pipeline mechanism, the base's; #939's pending_base_compile
and first_use_backend_pipelines dropped, prepare_on_bind and cold_graphics_compile kept. create_texture keeps
the base's signature; #939's deferred backing is folded into the base's placed-memory binder. #939's quad
lists as triangle indices.

B2, the D3D12 tests (d3d12_existing_heap, a8_dimensions, pipeline_cache_seed, title_va, rect_list,
shader_library, loader_tls_index0, draw, compute, xmem_placed, shader_library_corpus): the base's tests where
both carry the same case, #939's cases added (rebound tables, linear texture map, large vertex batch,
executable shaders, default A8 views).

C, the backend (vulkan_replay.h, vulkan_backend.h, vulkan_bindless.h, vulkan_scratch.h, vulkan_present.h,
rect_list_geometry.h, vk_test_device.h, vk_pipeline_check.cpp, vk_store_test.cpp, bindless_sizing_test.cpp,
replay_texture_barrier_test.cpp): the base's prepare_draw and lazy compute, its #1055 release rule and its
rectangle generator; #939's rectangle variants, GPU quad index expansion, 1D/3D and depth-stencil UAVs, the
label fence on the base's submit.

D, memory, services, presentation (xmem.cpp/.h, xg_xs.cpp, xg_xs_test.cpp, title_va_alias.h and its test,
main.cpp, frame_pacer.h, xbox_present.cpp/.h; xgameruntime_offline.cpp for one comment): the base's xmem with
#939's label hooks, file-backed sections and pin_mapped_data; both texture computers in xg_xs.cpp, the base's
answering first; --first-run-ui kept without host speech in its profile.

E, build, tools, docs (runtime/CMakeLists.txt, make_game.py, tools/rdna2spirv.py, tools/shader_disasm.py,
scripts, tests, docs; docs/README.md and tests/test_exe_shaders_stage.py beyond the conflicts): the base's
v_dot4 decode, #281's disassembler form and tests/semantic/test_fspx_dot4_op_sel_disasm.py dropped; the
base's executable-shader step with #939's cache fix; 366 registered tests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:26:00 -05:00
e55b3be88a tests: fail when a subgroup warning precedes a dispatch error 2026-11-24 11:43:12 -05:00
aa8be9aef2 Integrate the offline first-run UI runtime with current main and the published renderer fixes
Use the tagged pipeline variants and indexed quad expansion from #722 and #682 with the shared shader cache. Retain title-backed index uploads, cross-queue scratch sharing, amd64 console return conventions and the PC/console caller discriminator. The local shader build indexes native containers and includes the executable's embedded stages.
2026-11-24 21:26:25 +08:00
db19bbd345 runtime: connect native pipelines and title resources to the offline first-run UI
Build on the public frame-loop integration in #321. Carry the texture-view and depth work from #213 and #261, the layout provider from #461, the responsive window from #526, and the rectangle generator from #682. Integrate the Xbox constant-buffer row addressing measured in #513 and the draw-time rectangle selection in #722. Keep all fixtures synthetic.

The Windows GPU path resolves title-owned shader objects, retires geometry uploads per submission, materializes texture views on use, maps linear surfaces, and delivers completed GPU label writes. A first-run UI launch selects the tested settings for these paths.
2026-11-24 21:19:30 +08:00
7b94777c62 run_gpu_tests: record the cs_tbuffer_store verdict (GPU-RUNNER-TBUFFER-VERDICT)
The cs_tbuffer_store branch of run_suite computed its verdict and never
appended it to results, so a failing test was missing from the summary
(a filtered run reported no runnable test at all). The branch now records
the verdict like its neighbours. A Skip still shows as SKIP.
2026-11-24 10:53:23 +01:00
b35b222df1 Keep the GPU helper verdict ahead of the device banner 2026-11-24 14:02:53 +08:00
0e4dd78f82 tests: GPU fixture cs_imgload_d16_tfe, the d16 form of cs_imgload_tfe
Under d16 one component fills one VGPR and the tfe status follows it, so vdata is v[7:8] / v[11:12]. Same 1000 seeds and the same check as cs_imgload_d16 (vk_store_test load-d16, saturation row included). Suggested by nnonno91, who ran this companion on gfx1036 and an RTX 5090.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:45:09 -03:00
9c4c5f92a8 tests: GPU fixture cs_imgload_tfe for the tfe status VGPR on image_load (SHADER-1266)
No GPU fixture set tfe or lwe, so run_gpu_tests.py never reached the
status write a SHADER-1266 fix adds. cs_imgload_tfe is cs_imgload with
tfe on both image_loads: each status VGPR is seeded with 1000 and added
into the stored sum, so a stale status moves every texel by 2000 while a
correct one (0, every texel resident) gives cs_imgload's result, checked
by vk_store_test's unchanged load mode.

Registered next to cs_imgload in check.py and run_gpu_tests.py, and in
the two unit tests that list the vk_store_test fixtures. Red on main
until a SHADER-1266 fix lands; green with #8771's change on an RTX 4060.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:51:28 -03:00
86a7807dd4 Barycentric fallback on by itself on AMD's Windows driver for gfx90c (#5933) (#6828)
Squash-merged after diff review of PR #6828
2026-11-23 10:42:42 -06:00
ced4057a98 TEST-468/469: GPU test tools request shaderInt64 only when a module declares Int64; vk_bindless_test honours LEONIDA_VK_DEVICE (#2647)
Squash-merged after diff review of PR #2647
2026-11-23 09:35:16 -06:00
3735209c12 TEST-1147: record the FMA mode in shader metadata and honor it in check.py (#5094)
Squash-merged after review of PR #5094 - TEST-1147: record the FMA mode in shader metadata and honor it in check.py
2026-11-23 08:10:46 -06:00
12a7c6b0e7 Merge pull request #4617 from Lucas
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:16:28 -05:00
33531bda5b Merge pull request #4262 from gabsilvs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:54 -05:00
da502d4e48 Merge main 7b7d73f8: keep both check imports (failure, run_readback)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 05:43:17 +02:00
37e66e90ba GPU tests: preserve wave32 process failures on narrow subgroups 2026-11-22 22:12:41 -05:00
87da932770 run_gpu_tests: an unsupported: reason wins over the generic wave64 skip
For a whole-wave dump a missing OpFmaKHR was reported as "no 64-wide compute
subgroup" on a device that does have one, because the wave64 rule ran before
the reason the program printed. Read the "unsupported:" line first; without
one the old text stays.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpL5aWzXuYTbhn6b52
2026-11-22 21:35:01 -03:00
b9a8aca16a GPU tests: skip a draw when any stage needs OpFmaKHR the device lacks
docs/testing.md says a module that needs OpFmaKHR exits 77 (a SKIP) on a
device without VK_KHR_shader_fma, but only the fragment module was checked
in vk_harness, and vk_texture_test, vk_sampler_test and vk_bindless_test
never refused the vertex module (vs_ids carries FMAKHR). Under
LEONIDA_FMA=khr such a pair failed vkCreateGraphicsPipelines with -13 and
run_gpu_tests.py reported a FAIL.

ShaderFma::accepts_file() checks one module file. vk_harness (vertex module,
VKH_MESH_COMPUTE module), vk_texture_test, vk_sampler_test and
vk_bindless_test use it for every stage; vk_sampler_test also enables the
feature when the device has it, like the others. judge_cs_dump treats exit 77
with an "unsupported:" line as a skip for the non-wave64 dumps too
(cs_w32_new_ops).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpL5aWzXuYTbhn6b52
2026-11-22 21:19:17 -03:00
e8c9155965 Merge remote-tracking branch 'origin/main' into run-gpu-tests-exit-status-in-fail-line
# Conflicts:
#	tests/test_run_gpu_tests.py
2026-11-23 00:05:29 +02:00
5816b2404d Merge pull request #3786 from DanielDeGiorgio 2026-11-22 17:03:47 -05:00
efa9dc1c5c Merge pull request #2886 from Jolymmiles
# Conflicts:
#	docs/testing.md
2026-11-22 17:00:01 -05:00
d4d8c9c3a9 run_gpu_tests: a test program that dies puts its exit status in the FAIL line
Nineteen rows show the last output line of a test program that judges itself
(cs_wavemask, cs_lds, cs_exec64, cs_bvh, cs_bvh32, the vk_store_test,
vk_texture_test and vk_bindless_test rows). A program that died before its
verdict had only printed its device or extension line, or nothing, so the row
read "FAIL  ps_tex" or "FAIL  cs_sample_lz_int_d16  device: ..." (#3174).

verdict_line() keeps the last line for exit 0 and uses check.py's failure()
otherwise: "exit -11: device: ...", "exit 3221225477: no test output". The
texture-constant rows no longer report "4096 pixels differ" for a frame that
was never read. Pass/fail and the suite's exit code do not change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 23:37:05 +02:00
99fb9e372a TEST-837: Require fresh GPU test readbacks 2026-11-22 22:36:56 +01:00
c4eaab94c9 Merge pull request #1518 from Henrique Vinagre 2026-11-22 15:09:42 -05:00
777d218770 vk_compute_test: run 32-lane tests where the size is fixed but not requirable (MoltenVK)
MoltenVK reports subgroups 4..32 and requiredSubgroupSizeStages 0, so VKC_SUBGROUP_SIZE=32 printed "not available"
and the 32-lane compute tests skipped. The translator emits SPIR-V 1.5, where varying subgroup sizes are not allowed,
so Vulkan fixes SubgroupSize at the device's subgroupSize (32 there). vk_compute_test now runs a probe shader
(cs_wave_probe.comp, embedded) with the test's local size and flags first, checks every invocation's lane, subgroup
number and ballot width, and runs the test if they match. If they don't, the test fails (exit 1) instead of being
skipped. Full subgroups are requested where local size X is a multiple of maxSubgroupSize. Devices whose default
isn't the requested size keep printing "not available".
2026-11-23 00:04:20 +04:00
2426df3d5e GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV 2026-11-22 18:34:11 +00:00
c64494b9fe Merge pull request #2411 from TurboSosiska304 2026-11-22 13:15:07 -05:00
da3f01cee7 gpu tests: skip a fixture whose wave size the device cannot pin
cs_barrier_loop is a wave32 fixture (subgroup_size 32 in index.json): its
expected words are four waves of 32 lanes. run_gpu_tests.py pinned the size
through VKC_SUBGROUP_SIZE but, unlike check.py, judged the dump when
vk_compute_test reported "compute subgroup size: 32 not available" and ran it
at 64 lanes anyway. A device with 64..64 compute subgroups (GCN3/GCN4 on RADV)
therefore reported a failure that is really an unpinnable wave size: 139/180
passed with 1 failed, where check.py reported 0 failed on the same work folder.

Reuse check.py's unpinned_subgroup_skip for cs_barrier_loop only. The other
pinned dumps are still judged at the device's own width, which is how cs_store
and the cs_w32_* fixtures keep being tested on a 64-only device (skipping all
of them cost 12 passes: 128/180).

RX 570 (gfx803, RADV Mesa 26.2.6, Vulkan 1.4.354), commit 4947579:
run_gpu_tests 139/180 passed, 41 skipped, 0 failed; check.py 0 failed.
2026-11-22 19:54:22 +03:00
94d7bfddae Merge pull request #2184 from AvantBras 2026-11-22 11:42:34 -05:00
1180c0b4a4 Merge pull request #2136 from Vonsek 2026-11-22 11:42:07 -05:00
fc52e96723 Tests: let focused GPU runs require a pass (TEST-364) 2026-11-22 17:13:19 +01:00
21d01a9570 fix(tests): enforce the GPU timeout for texture cases
The texture harness needs a shader working directory, so two branches launched it directly and bypassed the configured deadline. Pass the working directory through the shared launcher so those cases time out and the suite can continue.
2026-11-22 17:04:37 +01:00
e3cfc7f010 GPU runners: run the f16 interpolation tests under the bary fallback when the f16 fallback is on
run_gpu_tests.py skipped ps_interp_f16_high and ms_f16_pack whenever
LEONIDA_BARY_FALLBACK was set, and check.py skipped ps_interp_f16_high the
same way. The skip predates --f16-interp-fallback: --bary-fallback alone has
no PerVertexKHR inputs, so the f16 halves can't be interpolated. With
--f16-interp-fallback as well, which run_gpu_tests.py turns on by itself on a
device without fragmentShaderBarycentric (the usual reason for the bary
fallback), the pixel shader reads the decoded halves its producer exports,
and both tests run. Skip only when the bary fallback is on without it.

On llvmpipe (Mesa 26.0.8, no VK_KHR_fragment_shader_barycentric) with
LEONIDA_BARY_FALLBACK=1, both tests went from SKIP to PASS. Under the bary
fallback alone they would still fail (f16 halves off by 0.984), so that skip
stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:34:55 +00:00
5f76cc2b27 Merge pull request #1680 from abilliontokens 2026-11-22 08:38:21 -05:00
cfcc1de491 GPU runners: ps_ij_computed SKIPs, not FAILs, without PerVertexKHR inputs
Follow-up to #1545 (SHADER-177). Under --bary-fallback and --f16-interp-fallback the translator refuses a
computed I/J pair, so ps_ij_computed has no .spv, and both runners reported "missing .spv" instead of SKIP:
9018411c's bary skip in run_gpu_tests sits inside the PIXEL_VERTEX branch (ps_ij_computed is not in it) and
after the missing-.spv check, check.py's skip came after its .spv check too, and neither knew the f16
fallback, which run_gpu_tests turns on by default where PerVertexKHR doesn't compile (MoltenVK). Both runners
now skip it first, under either fallback; a missing .spv without a fallback is still a failure.
tests/test_run_gpu_tests.py covers both runners.

Co-authored-by: crastinator <qvaras@proton.me>
2026-11-22 05:11:19 -08:00
67c8ffe45c fix(shader): query dimensions from 2D array image views
Array resource queries need the array at the descriptor index so the third component reports the view's layer count. Check the returned dimensions through a draw against the existing 12-layer texture.
2026-11-22 13:33:58 +01:00
1cf18b0c12 run_gpu_tests: reject malformed or non-finite pixel readbacks (TEST-29)
662752cc made check_bary, check_grad and check_wqm fail a short or NaN
frame. The other pixel checks could still pass one:

- read_raw_rgba32f / read_raw_u32 dropped a trailing partial pixel, so a
  readback ending mid-pixel still looked like a full frame; it now reads
  as no frame.
- check_uniform_branch (ps_uniform_branch, ps_scc_mask32) took any frame
  length and a NaN barycentric i passed both range tests.
- check_flat raised ValueError on an empty readback and could pass NaN UVs.
- check_bitmask_perm passed a frame of any length with one good pixel.
- check_clip_half let NaN through on the covered half.

All of them now go through frame_problem(). The UniformBranchCheck
fixtures repeat their rows over a full 64x64 frame instead of 3 pixels.

Tested on an RTX 4070 SUPER (Windows 11, NVIDIA 32.0.16.2101):
run_gpu_tests.py 105/133 passed, 28 skipped, 0 failed before and after
(same per-test results); with LEONIDA_W64_EMULATE=1 133/133 before and
after. tests/semantic 1178 OK; the new tests fail on the old runner.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:36:29 +03:00
71eea4a73e GPU tests: vk_bindless_test and vk_image_fuzz skip below 144 push constant bytes (TEST-149)
Both harnesses create a pipeline layout with the 144-byte translated
user-data block and never checked maxPushConstantsSize, so on a
128-byte device (Intel Arc, some AMD drivers) they failed validation
instead of skipping, although every pixel was exact. Each now prints
"unsupported: need 144 push constant bytes, device has N" and exits
77 before creating anything, as vk_texture_test does since 0c84bff;
the range uses the same constant.

run_gpu_tests.py already reported ps_tex's 77 as SKIP; image_fuzz.py
skipped it with a fixed message and now quotes the harness's
unsupported line. CPU tests cover both runners' 77 path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:52:32 -06:00
d1a7bb96d2 check.py: request 32 lanes for the wave32 lane-mask dumps, as run_gpu_tests.py does (#774)
check.py ran cs_wqm_w32, cs_w32_lane_wrap, cs_w32_permute and cs_bpermute32
without VKC_SUBGROUP_SIZE, so on a device whose range is 8..32 (Intel ANV) the
driver could pick a narrower size and the two runners judged different words.
check.py now requests 32 for them; run_gpu_tests.py requests it even without
index.json.

vk_compute_test prints whether a VKC_SUBGROUP_SIZE request is honoured
("compute subgroup size: N" or "... N not available"), and both runners skip
these dumps when 32 can't be pinned instead of reporting wrong words. Output
from an older vk_compute_test is judged as before.
2026-11-21 23:53:02 -07:00
acbb574bca Fail a GPU test filter that selects only inputs 2026-11-21 22:30:27 -07:00
067d3e8b97 test_run_gpu_tests: the small-push-constant test's fake run_cmd takes gpu
#862's TextureTestOnASmallPushConstantDevice fake translator didn't accept the gpu= keyword #835 added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:53:04 -05:00
524bb1fb7b Merge pull request #862 from sanuk369 2026-11-21 23:15:35 -05:00