Commit Graph

493 Commits

Author SHA1 Message Date
3fbc120df4 Merge pull request #1397 from whoalin1/mask-regs-data-read
rdna2spirv: a VALU data read of a lane-mask operand yields the wave's mask word
2026-12-01 12:53:35 +01:00
b3cc377020 translator: s_mov copies of EXEC keep the narrowing's tag through SGPR round-trips
Review follow-up on the mask-word gather gate (#1397): `s_mov_b32 s4,
exec_lo` under an unknown EXEC narrowing recorded nothing for s4, so the
later `s_mov_b32 exec_lo, s4` restore minted a fresh ("n", id) tag in
_exec_src_ex. mask_exec_sigs coverage then failed and the read kept this
lane's 0 / ~0 bit, while the equivalent literal `s_mov_b32 exec_lo, -1`
resolved to a constant half-state and gathered — register and literal
restores of the same runtime value disagreed.

_mov_sgpr_vals now returns an ("al", halves) alias for an EXEC source
whose half-state is an unknown narrowing, the same scheme saveexec uses:
exec_lo gives (state, None), exec_hi (None, state), exec gives each half
in its own register for b64 moves. _exec_src_ex already resolves those
aliases, so the restore reproduces the original tag and the gather stays
exact; untracked SGPR sources still mint a fresh narrowing and stay
conservative.

Tests: two semantic cases (wave32 and wave64) assert the register
round-trip gathers OpGroupNonUniformBitwiseOr identically to the literal
-1 restore; cs_exec_copy.asm (+ fixture, check.py/run_gpu_tests.py dump
entries) stores the mask word, exec_lo's own word and the literal-restore
word side by side on real hardware — PASS on RTX 4070 and Radeon
(64-wide), wave64 exec filters 9/9 on AMD.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:22:44 +00:00
d99ba5c095 Merge main: drop the macos job as main does, keep this PR's runtime.yml path filters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:24:47 +01:00
08e42a5160 Merge pull request #2691 from fiestorra/fix/paravirtual-exp2-skip
runner: skip the exact exp2 case on Apple's Paravirtual device (re-opened #2641, closed by an accidental push)
2026-11-30 17:28:44 +01:00
2afbcef3c0 runner: skip the exact exp2 case on Apple's Paravirtual device
That device's OpExp2 lands two ulps low on 2^-125, so the bit-exact fixture cannot
hold there; real Apple hardware returns the exact pattern (M5 Max, MoltenVK 1.4.2,
passes the same case), which is why this skips by device instead of widening the
check for everyone.

The skip reads the device line the harness already prints beside the subgroup line
that wide_pixel_skip reads, so it needs no new plumbing.

Written with an AI assistant.
2026-11-30 15:39:20 +01:00
f474c74b04 Merge origin/main (f9f3ec4c6) into the carry of #2174
Current main after #2566. New conflict on top of the earlier carry merge:
tools/rdna2spirv.py, _translate (straight-line and CFG paths): main passes
extra=meta_extra to _shader_meta.collect and reads the literal samplers
after it; the PR's g.note_pops_word(insns) runs right after that block,
before fit_shared_memory / needs_barrier_rounds as before.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:30:43 +01:00
ab09fd1f86 Merge main: keep --no-ftz32 and --integer-dot-fallback next to --explicit-lod-bias
tools/rdna2spirv.py: main's float-only typed implicit sample (OpImageSampleImplicitLod)
is used only without --explicit-lod-bias; with the flag the Grad path still
scales the derivatives by the S# bias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:46:44 +01:00
07905380dc ps_ssharp: probe the bias at +-0.26, not +-0.3
NVIDIA (RTX 3090, driver 610.88) moves NEAREST mip selection to level 1 at
about +0.289, inside Vulkan's 0.25..0.5 range, so a single +0.3 already read
level 1 there (found by zmasi). +-0.26 stays under that on every driver, and
the bias counted twice (+-0.52) still crosses 0.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:55:18 +01:00
ae2ef0c5cf Merge pull request #1325 from delysidemanYT1/gpu-check-subprocess-output
Shader checks: preserve subprocess diagnostics and validate probe output
2026-11-29 16:45:04 +01:00
173c5d41a6 Merge origin/main into carry/pr-2174
vk_harness: main's has_cap scan of both stages, plus needs_interlock = has_cap(fs_code, 5378) from the PR.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:51:23 +01:00
bf458bbcb3 Merge remote-tracking branch 'origin/main' into lb
# Conflicts:
#	docs/design.md
2026-11-29 04:52:45 +01:00
06e5327291 Merge origin/main into fix/rdna2spirv-f16-interp-computed-ij 2026-11-28 13:59:35 -08:00
7ef2a485e0 Merge pull request #1126 from MalexAson/fix/check-unsupported-skips
check.py: an unsupported texture-constant or partial-wave test is a skip, not a failure (TEST-CHECK-UNSUPPORTED-SKIP)
2026-11-28 22:51:58 +01:00
f84e071dc3 Merge pull request #822 from hugo0024/check-f16-fallback
tests: build.py and check.py pick the f16 interpolation fallback from the device (TEST-CHECK-F16-FALLBACK)
2026-11-28 22:51:43 +01:00
3a7dc6126b Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	.github/workflows/runtime.yml
2026-11-28 13:34:11 +01:00
c9f097eb50 Merge pull request #2419 from ProjectLeonida/fix/cvt-f16-denorm-and-clamp
rdna2spirv: preserve f16 denormals, NaN payloads, and bit-exact clamp in conversions (SHADER-CVT-F16-DENORM-AND-MODS)
2026-11-28 12:54:01 +01:00
87f12b9dcc Merge pull request #1587 from exoticLgk/fix-exp-f32-denorm
rdna2spirv: flush v_exp_f32 denormal results (SHADER-EXP-F32-DENORM)
2026-11-28 12:52:59 +01:00
11df2b0069 Merge pull request #1112 from klikso/carry/shader-f64-omods
rdna2spirv: the binary64 VALU ops take clamp and nothing else from their omod (SHADER-F64-OMODS-CARRY)
2026-11-28 12:52:22 +01:00
25fd8e4776 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-27 23:02:20 -08:00
6064cbbb49 tests: build.py and check.py pick the f16 interpolation fallback from the device (TEST-CHECK-F16-FALLBACK)
run_gpu_tests.py and make_game.py translate with --f16-interp-fallback by
themselves where tools/vk_subgroup_info.py reports per_vertex_inputs
false (MoltenVK). build.py and check.py only did so with
LEONIDA_F16_INTERP_FALLBACK=1, so the two-step form on a Mac built
ps_ij_computed and ps_interp_f16_high for PerVertexKHR inputs and
check.py reported both as failed.

Both scripts now ask the device when the variable is unset, the way they
already do for the barycentric fallback, and take 1/0 (true/false, yes/no,
on/off) as run_gpu_tests.py does. On an Apple M5 (MoltenVK 1.4.2) check.py
goes from 175 of 220 pass, 39 skipped, 6 failed to 176 pass, 40 skipped,
4 failed: ps_interp_f16_high passes and ps_ij_computed is a SKIP.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-28 12:44:46 +08:00
27524a5e5b Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk 2026-11-28 02:57:41 +01: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
df294dd8a1 rdna2spirv: preserve f16 denormals, NaN payloads, and bit-exact clamp in conversions (SHADER-CVT-F16-DENORM-AND-MODS)
Route v_cvt_f32_f16 through f16_in_bits so SDWA/DPP half selection, subnormals, neg/abs,
and IEEE=0 NaN sign/payload bits are preserved without raw UnpackHalf2x16 flush risk,
and clamp v_cvt_f16_f32 and v_div_fixup_f16 directly on rounded f16 bits via shared
clamp_f16_bits. Verified on RTX 3060 (driver 617.14, native + --wave64-emulate: fixed
first word 0x7FFFFFFF -> 0xFFC4A000 on cs_w32_cvt_f16_mods), 13/13 new semantic tests,
501-module semantic suite (6,385 passed, 0 failed), and 100/100 real corpus shaders
passing spirv-val.

AI-assisted: Codex gpt-6.2-sol + Antigravity gemini-4-neon.
2026-11-26 22:11:21 -03:00
0dcf650d1c Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/rdna2spirv.py
2026-11-27 00:51:00 +01:00
ae364461bf rdna2spirv, docs, tests: address #2239 review findings and 1080p precision check 2026-11-26 15:45:23 -08:00
6f5086f2f8 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-26 15:24:47 -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
15350f6da6 rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED)
A pixel shader with an ordered section (POPS) reads the hardware's collision word, which sits in the SGPR after the
user SGPRs and the primitive mask: collision wave id in bits 0-9, this wave's id in bits 16-25, overlap in bit 31.
The program waits until wave_id + ~collision_id is below src_pops_exiting_wave_id + ~collision_id (unsigned). The
translator orders the section with fragment-shader interlock and reads the exiting id as 0, and the word was
whatever the push constants held at that dword, usually 0. With wave id == collision id the test is
0xffffffff < 0xffffffff, never true, so a wave that reached the loop ran it until the loop guard (65,536 rounds).
The overlap test before the loop skips it whenever a lane is on in EXEC, so it is a wave (a host subgroup) with EXEC
all off there; on 32-wide subgroups that is either half of a wave64 program whose lanes are all off.

The SGPR is now the source of the program's wave-id extract (s_bfe_u32 with field 0x000a0010) when the program reads
that SGPR's entry value (shader_meta's user_sgpr_reads), and it is set at entry to 0x00010000 (no overlap, wave id 1,
collision id 0): the loop leaves after one round. A program without that extract keeps the old behaviour.

- tools/rdna2spirv.py: pops_collision_sgpr and the entry store.
- tests/semantic/test_pops_collision_seed.py: subgroups of 64 and 32 lanes, with and without the seed, and the SGPR
  search; the GPU fixture runtime/test/shaders/ps_pops_wait_loop.asm (check.py, run_gpu_tests.py) and its llvm-mc
  listing.
- tests/semantic/spirv_wave_interp.py: the interlock instructions run as no-ops (a run has no other primitive).
- runtime/test/vk_harness.cpp: a fragment shader that needs pixel interlock on a device without it is unsupported
  (77), as for barycentrics.
- docs/design.md, docs/d3d12_vulkan.md: the POPS rows.

GPU: on an RTX 4070 SUPER the fixture gives 4096 of 4096 pixels as expected; with the seed taken out every pixel's
round count is 0x00010000.

Idea from Marvisak/VIctory 7ac1f54, written anew.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
2026-11-25 19:45:31 -05:00
b145659304 Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/vk_subgroup_info.py
2026-11-25 23:54:57 +01:00
c5f1807515 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)
Extend #957's DPP VOPC compare to v_cmpx: the same lane selection, with the
result written to EXEC. v_cmpx prints no destination, so src0 is its first
operand. Only the forms where every lane writes its bit are taken, as for
v_cmp. 78 pipeline-library pixel shaders of 1.0.2.1 were refused for it; all
78 now translate and pass spirv-val.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:00 +01:00
0bae6f545a Merge main into wave64-partial-wave-zero
scripts/run_gpu_tests.py: main added cs_w32_wrxchg2_ext and
cs_w32_wrxchg2st64 to the same name list; keep main's list and add
cs_w64x_partial_swizzle to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:37:28 -05:00
d96b3a8644 Merge pull request #857 from ohshitwaddup/tests/gpu-wrxchg2-b32
tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)
2026-11-25 22:28:36 +01:00
631a538320 ps_ssharp_o: the S# mip fields on image_sample_lz_o / image_sample_o under the texel-offset fallback (SHADER-EXPLICIT-LOD-BIAS-MVK)
The last --explicit-lod-bias path without GPU coverage: with
LEONIDA_TEXOFF_FALLBACK=1 the implicit offset sample is a Grad sample whose
derivatives the flag scales. A SKIP without the fallback, since vk_sampler_test
enables no VK_KHR_maintenance8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:38:26 +01:00
721a3b85ae Merge main into wave64-partial-wave-zero
Conflict in scripts/run_gpu_tests.py: the dump-test name list gained
cs_w64x_cmp_sdst on main and cs_w64x_partial_swizzle here; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:37:20 -05:00
ff2e459123 vk_sampler_test --cube/--3d/--dref; ps_ssharp_cube, ps_ssharp_3d, ps_ssharp_c: the S# mip fields on cube, 3D and depth-compare samples (SHADER-EXPLICIT-LOD-BIAS-MVK)
GPU coverage for the rest of --explicit-lod-bias's forms. vk_sampler_test gains
a mode for a 6-layer cube (images_arr), a 128x128x2 volume (images_3d) and a
D32 texture (0.25 / 0.75 per level) with the S#'s compare function; the 2D
default is unchanged. check.py's SAMPLER_FIXTURES names each shader's mode and
judges ps_ssharp_c as compare results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:21:58 +01:00
98b22aee0b ps_ssharp_ld, ps_ssharp_b: the S# mip fields on image_sample_l, _d and _b, judged by SAMPLER_CASES (SHADER-EXPLICIT-LOD-BIAS-MVK)
GPU coverage for the --explicit-lod-bias paths ps_ssharp doesn't run: the Lod
of image_sample_l, the 2^bias Grad scale of image_sample_d and the bias of
image_sample_b. check.py's SAMPLER_FIXTURES runs all three with the same cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:58:22 +01:00
1d19671ebd rdna2spirv: --explicit-lod-bias applies the S# LOD bias in the shader where MoltenVK drops the sampler's (SHADER-EXPLICIT-LOD-BIAS-MVK)
MoltenVK 1.4.2 drops VkSamplerCreateInfo::mipLodBias from both explicit and
derivative-LOD samples, so ps_ssharp's S# LOD_BIAS cases fail on every Mac.
With the flag the translator adds the S# bias (word 2 [13:0], signed 5.8) to
explicit LODs and to _b biases, as a Bias operand on implicit samples, and as
a 2^bias scale of Grad derivatives. tools/vk_subgroup_info.py reports
explicit_lod_bias for MoltenVK's driver ID, and run_gpu_tests.py, build.py
and make_game.py turn the flag on from it. ps_ssharp gains +-0.3 cases, which
fail when the bias counts twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:16:05 +01:00
7884142013 check.py: fmt_all_test docstring counts the fixture as it is (DOC-FMT-ALL-DOCSTRING)
The docstring still described cs_fmt_all before b5b650186 grew it:
"28 loads ... 15 stores ... 316 words in all". The fixture has 32
typed loads (29 buffer_load_format_xyzw + 3 tbuffer_load_format_xyzw),
20 buffer_store_format_xyzw, and len(FMT_ALL_WORDS) is 336, as the
.asm header, the comment above FMT_ALL_WORDS and docs/design.md
already say. Only the three numbers change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 09:51:29 +01:00
eb39d2765e rdna2spirv: flush v_exp_f32 denormal results 2026-11-25 05:33:06 +01:00
0819cfec80 Merge main (3ff2a2adc) into the #939 merge
Fourteen commits main gained after #968: #413, #1114, #1090 and #1491. Two conflicts, both in the shader check lists: scripts/run_gpu_tests.py imports both sides' cases, and tests/test_shader_checks.py counts eight cases next to COMPUTE (main's cs_w32_salu_ext) and #939's IMAGE_STORE_CASES table in place of main's fixed seven store shaders.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 21:23:42 -05:00
a9761ab2f9 tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)
docs/design.md's ds_wrxchg2_rtn_b32 row names cs_w32_new_ops as its fixture, and that fixture
compares only the first returned word and data1 in LDS. Four things the row states were therefore
never checked on a GPU: the second returned word, data0, the st64 step, and vdst aliasing the data
VGRs. The row's own note also records the non-st64 step indirectly only on gfx1100.

Two branchless fixtures, one lane each (32 lanes on one LDS address would race):

  cs_w32_wrxchg2_ext   both offsets on one dword: the first exchange returns the old word and the
                       second returns data0, not the word the first wrote; a neighbouring LDS word
                       is untouched; with vdst aliased onto the data VGPRs the data is read before
                       the result is written, so vdst gets the old pair and LDS the new one.
  cs_w32_wrxchg2st64   the st64 unit is 64 dwords: base 0x80 with offsets 1/2 addresses 0x180 and
                       0x280. 0x84/0x88 (where a 4-byte step would land) and 0x140/0x2c0 (one step
                       either side of the real elements) are seeded and must come back untouched,
                       which is what pins the stride rather than assuming it.

Both are registered in check.py (CS_DUMPS, WAVE32_DUMPS, WAVE32_LANE_DUMPS) and
scripts/run_gpu_tests.py, and judge all eight words in hex.

Measured on a Radeon RX 6900 XT (RDNA2, GFX1030, RADV Mesa 26.2.4, Nobara Linux 44), main d0da7da:
  build.py          283 shaders: 283 translated, 283 pass spirv-val
  check.py          217 of 222 pass, 3 skipped, 2 failed
  run_gpu_tests.py  233/251 passed, 16 skipped, 2 failed (native and LEONIDA_W64_EMULATE=1 alike)
  --filter wrxchg2  2/2 PASS both modes, every word exact (16/16)
The two failures in the full runs are cs_imgload_tfe and cs_imgload_d16_tfe, the pre-existing
SHADER-1266/#31 pair, unchanged by this commit.

No game files, nothing online. AI-assisted (Hermes Agent).
2026-11-25 08:53:57 +07:00
871e4b8b99 Merge pull request #1090 from milk4sale/test-w64-sdst-pair-gpu
tests: a GPU fixture and whole-corpus counts for one-register wave64 mask destinations (TEST-W64-SDST-PAIR-GPU)
2026-11-24 20:50:01 -05:00
8a57b3b1d3 Merge pull request #1114 from milk4sale/gpu-test/salu-ext
tests: GPU readback for 38 scalar ALU ops on run-time operands (GPU-SALU-EXT)
2026-11-24 20:49:40 -05: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
8f498bed96 rdna2spirv: the f64 VALU ops keep only clamp, not their omod
RDNA2 ignores the VOP3 output modifier of the f64 VALU arithmetic and rounding
ops while f64 denormals are kept, which is the MODE this translator models. I
measured it with tools/hw_oracle raw kernels on a gfx1036 iGPU (the Radeon
iGPU of a Ryzen 7 7800X3D, Windows driver 31.0.24002.92, code object v5),
wave32 and wave64 identical, over the four combinations of MODE.IEEE and
denorm_mode_16_64. mul:2 / mul:4 / div:2 changed nothing for v_add_f64,
v_rcp_f64, v_rsq_f64, v_sqrt_f64, v_trunc_f64, v_ceil_f64, v_floor_f64 and
v_rndne_f64 while f64 denormals were kept, applied only with MODE.IEEE off and
the denormals flushed, and clamp applied in every one of those runs. The two
f64 call sites that still forwarded a full modifier list now hand
clamp_mods_f64 only the clamp they act on, and the rows that described the
scaling for those ops are corrected to what the hardware does.

This is SHADER-721, the binary64 counterpart of the f16 omod row (#4542,
"an f16 destination ignores omod"). The row for v_add_f64 records the sweep and
how it was confirmed and keeps the LLVM VOP3 citation main already had; the
rcp/rsq/sqrt and rounding rows keep the measurements others contributed (the
v_sqrt_f64 ulp errors, @timelery's sweep of the four rounding ops) and only
change the sentence about the omod. One contradiction is removed on the way:
main's rounding row said the translator applies the modifiers "as those rows
do" while the code applied them to ops whose own row says they are ignored.

Ops with their own rows are left exactly as they are - v_cvt_f64_i32/u32,
v_cvt_f32_f64, v_frexp_mant_f64, v_div_fixup_f64 and v_ldexp_f64 keep what
their rows measure. The same rule probably reaches the first three as well, and
tests/semantic/test_alu_ldexp_f64.py already knows it for ldexp; I raised that
in #5256 as a finding instead of folding unmeasured ops into this change.

Counted over the whole corpus, not a sample: 216 v_add_f64 in 5 of the 26,503
listings, none carrying an omod or a clamp, and no f64 mnemonic in the corpus
carries one, so no game shader changes behaviour here. The two translated
fixtures that do carry a modifier move to the unmodified result, which is what
the sweep predicts: cs_f64_add now reads 0x0 0x3ff40000.

Expectations follow the rule in tests/semantic/test_valu_add_f64.py,
tests/semantic/test_f64_round.py, tests/test_f64_output_modifiers.py,
tests/test_f64_transcendentals.py and the two fixtures with their runners.
tools/f64_diff.py keeps its f64-omod case as a known divergence and
tests/test_f64_diff.py now expects it to mismatch the ISA reference rather than
match it: the reference applies the omod the ISA text describes, the translator
no longer emits it, and that case is the one MODE in which the hardware does
apply it. ps_f64_mods, cs_f64_add and ps_f64_round pass on an NVIDIA RTX 4090
(driver 32.0.16.2124) and on the gfx1036 iGPU above, 3/3 on both; cs_f64_add
reads the same words on Intel UHD 630 / Mesa ANV at this head (@gertify).
2026-11-25 00:45:11 +00:00
1bedab24c3 Merge pull request #1000 from Okachamie/gpu-pin-exit-status
Merging.

**Why merged:** GPU-PIN-EXIT-STATUS: in check.py and run_gpu_tests, a helper that exits non-zero is always a failure, never a subgroup-pin SKIP, so a crashing helper can't hide as a skip. KernelSmoker approved it after an RTX 3090 GPU run, and the author compared it against #125.

**Why it's good:** run_gpu_tests, shader_checks and run_gpu_tests_paths: 177 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 0f98d193c. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-24 18:22:17 -05:00
2376e7d56b Merge pull request #1063 from milk4sale/gpu-test/frexp-ldexp
tests, rdna2spirv: GPU readback for frexp and ldexp, and their neg/abs sources move the sign bit (GPU-FREXP-LDEXP, SHADER-FREXP-LDEXP-SIGN-MODS)
2026-11-25 00:20:58 +01:00
0c3acdc030 Merge main into gpu-test/salu-ext
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 16:31:08 -06:00
89f6c264ed Merge main into test-w64-sdst-pair-gpu
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 16:31:08 -06:00
2eb49b1a6f Merge main into gpu-test/frexp-ldexp
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 16:31:07 -06:00