wave64_halves: v_sat_pk_u8_i16 keeps its high half (SHADER-SATPK-HALVES) #508

Open
github-bot wants to merge 6 commits from github-bot/gh-508 into main AGit
Owner

@⁠milk4sale on GitHub · 2026-11-24 06:36 UTC · original
milk4sale:shader-satpk-halves → main · +439 −5 · 14 files · 6 commits · open

Claimed in the coordination issue as: SHADER-SATPK-HALVES

Depends on: #338

What and why

#265 added v_sat_pk to _FULL32_V16_PREFIXES in tools/wave64_halves.py, so _preserves_dst treats v_sat_pk_u8_i16 as a full 32-bit write. partial_write also read the op's first type, u8, as an 8-bit result. #338 translates the op and writes the two saturated bytes with write_lo16, which keeps the high half in the _e32, _e64 and DPP forms. With both merged, a high half that depends on the lane lost its taint, and a wave64 VS/PS/GS passed as tier A, or tier B through readlane-uniform, although its export changes when the wave is cut into two 32-lane halves. NolanCotter reported this in #14.

This change removes v_sat_pk from the tuple, so the op falls to the _i16 rule, and makes partial_write say partial for it. Per encoding:

  • _e32 (VOP1 0x62), _e64 (VOP3 0x1e2) and DPP keep the high half.
  • SDWA keeps the rest only with a BYTE/WORD dst_sel and UNUSED_PRESERVE; dst_sel:DWORD, UNUSED_PAD and UNUSED_SEXT write the whole register. This was already right.
  • llvm-mc 23.1.4 rejects op_sel on the _e64 form for gfx1030.

References. Neither compiler says the high half is kept on GFX10, and the cited references don't either:

  • Mesa ACO's instr_is_16bit is false for the op before GFX11. It is not in the list, and can_use_opsel falls through to get_gfx11_true16_mask, which lists it next to v_cvt_f16_f32 for GFX11+ only (aco_ir.cpp, Mesa 99abc485).
  • LLVM's VOP1Inst_t16 is the plain VOP1 instruction on GFX10, with the true16 forms GFX11+ only. GCNSubtarget::zeroesHigh16BitsOfDest does not list the op (LLVM e2b0a1e1).

The rule here follows what the translator emits. If RDNA2 turns out to zero the high half, calling the op partial is still the safe side: it costs tier A at most, never exactness. The RDNA2 behaviour is not measured. The contract row in docs/design.md says so.

#338's own v_sat_pk_u8_i16 row cited ACO instr_is_16bit for the kept high half, which the halves row contradicts (review on this PR). This branch rewords that row: the keep is the translator's choice (write_lo16), not measured on RDNA2, with a pointer to the halves row's references. If #338 rewords the row first, take #338's wording when merging. #338's translator comment and the test_alu_sat_pk_u8_i16.py docstring cite ACO the same way; they are left to #338, where this was raised.

The halves analysis runs only for wave64 VS/PS/GS, never for compute or under --wave64-emulate (halves_analysis in rdna2spirv.py). So the GPU fixtures are ps_w64_* ones run by w64_graphics.py, not cs_*:

  • ps_w64_a_sat_pk_hi, tier A: the four encodings that keep the high half, a different high half per pixel, and both halves of SRC0 saturating below 0 and above 255 across the target. Every word is a function of the pixel, so a 32-only GPU checks all of them.
  • ps_w64_c_sat_pk_hi, tier C: the high half is the lane id. It is pinned to tier C, lane-id, in tests/test_wave64_halves_fixtures.py. On a GPU it needs both subgroup sizes, or W64G_REF.

Tested

  • tests/semantic/test_wave64_halves_sat_pk.py with the hand-written tests/semantic/fixtures/w64_sat_pk_hi.asm: 5 OK. It runs on the strict wave interpreter as 64 lanes and as two waves of 32, covers every encoding and the readlane-uniform case, and checks operands() and partial_write per encoding.
    • On #338's head (6446e3ce7): 12 subtests fail. That head predates #265, so it has no partial-destination handling at all.
    • On #338 plus main without this change: 9 fail (e32/e64/DPP tier A instead of C, readlane tier B instead of C).
  • python -I scripts/run_semantic_tests.py tests/semantic: 467 files, 6114 tests, 0 failed (70 s, 24 jobs).
  • python -m pytest tests/test_wave64_halves_fixtures.py tests/test_w64_graphics_args.py tests/test_w64_graphics_probe.py tests/test_w64_graphics_reference.py: 22 passed. Without the fix, test_fixtures_are_classified_as_their_headers_say fails: ps_w64_c_sat_pk_hi is tier A instead of C.
  • tests/test_design_contract_rows.py, tests/test_docs_design_rows.py, tests/test_text_write_line_endings.py and tests/test_semantic_translator_use.py pass. So do python -m compileall -q make_game.py tools tests and python -I scripts/check_no_game_data.py on every added or changed file.
  • After the row rewording (232a2ce6d, docs only): the four tests above, tests/test_wave64_halves_fixtures.py and the two sat_pk semantic test files pass again, and check_no_game_data.py docs/design.md exits 0.
  • w64_graphics.py on the RTX 4070 Ti: ps_w64_a_sat_pk_hi A ok, ps_w64_c_sat_pk_hi C SKIP (32 is the only fragment subgroup size). The verdicts are the same without the fix: a 32-only GPU cannot see the classification, so the tests above catch it. NVIDIA runs the translated SPIR-V, so this confirms the translator's semantics, not the AMD instruction. The expected low half comes from the ISA pseudocode's SAT8 packing; the expected high half is the translator's rule.
  • python -I scripts/run_gpu_tests.py on the RTX 4070 Ti, #338's head against this branch, each with its own runtime build. Both: 257 shaders, 257 translated, 257 pass spirv-val.
    • Native: 197/248 passed, 49 skipped.
    • LEONIDA_W64_EMULATE=1: 229/248 passed, 17 skipped.
    • Every test has the same verdict before and after. The only failures, cs_imgload_tfe and cs_imgload_d16_tfe, fail on #338's head too. They are the pair reported on an RTX 3080 Ti in #338's review.

GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Vulkan 1.4.357, CachyOS Linux (kernel 7.3.3), pinned with VK_LOADER_DRIVERS_SELECT=*nvidia* and LEONIDA_VK_DEVICE=4070. llvm-mc 23.1.4, SPIRV-Tools v2026.4.

AI-assisted: yes (Claude Code)

Checklist

  • Based on #338's head (6446e3ce7) plus main 1c93c8697, merged in rather than rebased so #338's commit keeps its SHA. Once #338 lands, the diff is this change only.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🤖 Generated with Claude Code

**@⁠milk4sale** on GitHub · 2026-11-24 06:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508) `milk4sale:shader-satpk-halves` → `main` · +439 −5 · 14 files · 6 commits · open Claimed in the coordination issue as: [SHADER-SATPK-HALVES](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #338 ### What and why #265 added `v_sat_pk` to `_FULL32_V16_PREFIXES` in `tools/wave64_halves.py`, so `_preserves_dst` treats `v_sat_pk_u8_i16` as a full 32-bit write. `partial_write` also read the op's first type, `u8`, as an 8-bit result. #338 translates the op and writes the two saturated bytes with `write_lo16`, which keeps the high half in the `_e32`, `_e64` and DPP forms. With both merged, a high half that depends on the lane lost its taint, and a wave64 VS/PS/GS passed as tier A, or tier B through `readlane-uniform`, although its export changes when the wave is cut into two 32-lane halves. NolanCotter reported this in #14. This change removes `v_sat_pk` from the tuple, so the op falls to the `_i16` rule, and makes `partial_write` say partial for it. Per encoding: - `_e32` (VOP1 0x62), `_e64` (VOP3 0x1e2) and DPP keep the high half. - SDWA keeps the rest only with a `BYTE`/`WORD` `dst_sel` and `UNUSED_PRESERVE`; `dst_sel:DWORD`, `UNUSED_PAD` and `UNUSED_SEXT` write the whole register. This was already right. - llvm-mc 23.1.4 rejects `op_sel` on the `_e64` form for gfx1030. References. Neither compiler says the high half is kept on GFX10, and the cited references don't either: - Mesa ACO's `instr_is_16bit` is false for the op before GFX11. It is not in the list, and `can_use_opsel` falls through to `get_gfx11_true16_mask`, which lists it next to `v_cvt_f16_f32` for GFX11+ only (`aco_ir.cpp`, Mesa `99abc485`). - LLVM's `VOP1Inst_t16` is the plain VOP1 instruction on GFX10, with the true16 forms GFX11+ only. `GCNSubtarget::zeroesHigh16BitsOfDest` does not list the op (LLVM `e2b0a1e1`). The rule here follows what the translator emits. If RDNA2 turns out to zero the high half, calling the op partial is still the safe side: it costs tier A at most, never exactness. The RDNA2 behaviour is not measured. The contract row in `docs/design.md` says so. #338's own `v_sat_pk_u8_i16` row cited ACO `instr_is_16bit` for the kept high half, which the halves row contradicts (review on this PR). This branch rewords that row: the keep is the translator's choice (`write_lo16`), not measured on RDNA2, with a pointer to the halves row's references. If #338 rewords the row first, take #338's wording when merging. #338's translator comment and the `test_alu_sat_pk_u8_i16.py` docstring cite ACO the same way; they are left to #338, where this was raised. The halves analysis runs only for wave64 VS/PS/GS, never for compute or under `--wave64-emulate` (`halves_analysis` in `rdna2spirv.py`). So the GPU fixtures are `ps_w64_*` ones run by `w64_graphics.py`, not `cs_*`: - `ps_w64_a_sat_pk_hi`, tier A: the four encodings that keep the high half, a different high half per pixel, and both halves of SRC0 saturating below 0 and above 255 across the target. Every word is a function of the pixel, so a 32-only GPU checks all of them. - `ps_w64_c_sat_pk_hi`, tier C: the high half is the lane id. It is pinned to tier C, `lane-id`, in `tests/test_wave64_halves_fixtures.py`. On a GPU it needs both subgroup sizes, or `W64G_REF`. ### Tested - `tests/semantic/test_wave64_halves_sat_pk.py` with the hand-written `tests/semantic/fixtures/w64_sat_pk_hi.asm`: 5 OK. It runs on the strict wave interpreter as 64 lanes and as two waves of 32, covers every encoding and the `readlane-uniform` case, and checks `operands()` and `partial_write` per encoding. - On #338's head (`6446e3ce7`): 12 subtests fail. That head predates #265, so it has no partial-destination handling at all. - On #338 plus `main` without this change: 9 fail (e32/e64/DPP tier A instead of C, readlane tier B instead of C). - `python -I scripts/run_semantic_tests.py tests/semantic`: 467 files, 6114 tests, 0 failed (70 s, 24 jobs). - `python -m pytest tests/test_wave64_halves_fixtures.py tests/test_w64_graphics_args.py tests/test_w64_graphics_probe.py tests/test_w64_graphics_reference.py`: 22 passed. Without the fix, `test_fixtures_are_classified_as_their_headers_say` fails: `ps_w64_c_sat_pk_hi` is tier A instead of C. - `tests/test_design_contract_rows.py`, `tests/test_docs_design_rows.py`, `tests/test_text_write_line_endings.py` and `tests/test_semantic_translator_use.py` pass. So do `python -m compileall -q make_game.py tools tests` and `python -I scripts/check_no_game_data.py` on every added or changed file. - After the row rewording (`232a2ce6d`, docs only): the four tests above, `tests/test_wave64_halves_fixtures.py` and the two `sat_pk` semantic test files pass again, and `check_no_game_data.py docs/design.md` exits 0. - `w64_graphics.py` on the RTX 4070 Ti: `ps_w64_a_sat_pk_hi` A ok, `ps_w64_c_sat_pk_hi` C SKIP (32 is the only fragment subgroup size). The verdicts are the same without the fix: a 32-only GPU cannot see the classification, so the tests above catch it. NVIDIA runs the translated SPIR-V, so this confirms the translator's semantics, not the AMD instruction. The expected low half comes from the ISA pseudocode's SAT8 packing; the expected high half is the translator's rule. - `python -I scripts/run_gpu_tests.py` on the RTX 4070 Ti, #338's head against this branch, each with its own runtime build. Both: 257 shaders, 257 translated, 257 pass spirv-val. - Native: 197/248 passed, 49 skipped. - `LEONIDA_W64_EMULATE=1`: 229/248 passed, 17 skipped. - Every test has the same verdict before and after. The only failures, `cs_imgload_tfe` and `cs_imgload_d16_tfe`, fail on #338's head too. They are the pair reported on an RTX 3080 Ti in #338's review. GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Vulkan 1.4.357, CachyOS Linux (kernel 7.3.3), pinned with `VK_LOADER_DRIVERS_SELECT=*nvidia*` and `LEONIDA_VK_DEVICE=4070`. llvm-mc 23.1.4, SPIRV-Tools v2026.4. AI-assisted: yes (Claude Code) ### Checklist - [x] Based on #338's head (`6446e3ce7`) plus `main` `1c93c8697`, merged in rather than rebased so #338's commit keeps its SHA. Once #338 lands, the diff is this change only. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The VOP1/VOP3 op saturates each signed i16 half of SRC0 to unsigned
8-bit and packs the pair into the low 16 bits of VDST, preserving the
high half (GFX9+ partial write; LLVM VOP1Inst_t16, Mesa ACO
instr_is_16bit). Neg/abs/clamp/omod are refused; _sdwa restricts to the
documented source/destination selects; _e32 rejects all modifiers.

Adds a hand-written fixture and a semantic test driving the SPIR-V
through spirv_mini_interp against a plain-Python reference (lane edge
values, SGPR/literal sources, sdwa selects, refused modifiers), the
docs/design.md contract row, and drops the op from the
fssm_crosscheck unhandled list. The two tests that used the mnemonic
as the still-unsupported canary now use v_mullit_f32.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#265 put v_sat_pk in _FULL32_V16_PREFIXES, so _preserves_dst took
v_sat_pk_u8_i16 for a whole 32-bit write, and partial_write read its first
type, u8, as an 8-bit result. The translator from #338 writes the two
saturated bytes with write_lo16, which keeps the high half in the _e32, _e64
and DPP forms, so a high half that depends on the lane lost its taint: the
shader passed as tier A (or tier B through readlane-uniform) although its
export changes when the wave is cut in two. SDWA was already right
(dst_sel/dst_unused decide).

Neither Mesa ACO nor LLVM says the high half is kept on GFX10: ACO's
instr_is_16bit is false for the op before GFX11 (only get_gfx11_true16_mask
has it), and LLVM's zeroesHigh16BitsOfDest does not list it. The rule follows
what the translator emits, and calling the op partial is the safe side if
RDNA2 zeroes the high half. The RDNA2 behaviour is not measured.

- tests/semantic/test_wave64_halves_sat_pk.py with the hand-written
  fixtures/w64_sat_pk_hi.asm: high half = lane id, 64 lanes against two
  waves of 32 on the wave interpreter, every encoding, the readlane-uniform
  case, operands()/partial_write per encoding.
- runtime/test/shaders/ps_w64_a_sat_pk_hi (tier A, judged on 32-only GPUs)
  and ps_w64_c_sat_pk_hi (tier C, pinned in test_wave64_halves_fixtures).
- docs/design.md contract row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The op's row cited Mesa ACO instr_is_16bit for the kept high half, but the
next row (the wave64 halves path) records that instr_is_16bit is false for
the op before GFX11 and that RDNA2's behaviour is not measured. Say that
write_lo16 keeps it by the translator's choice and point to that row's
references (review on #508).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:04:51 +00:00
Author
Owner

@⁠pwu2775-dev on GitHub · 2026-11-24 07:37 UTC · original · reviewed

Code read of 42344493 against main. One docs point, not blocking.

The two docs/design.md rows this PR adds disagree. The first row (v_sat_pk_u8_i16) gives Mesa ACO's instr_is_16bit as the reason the destination's high half is kept; the second row (the wave64 halves path) says that function is false for this opcode before GFX11 and that what RDNA2 does with the high half is not measured. The translator behaviour and the wave64 classification are consistent with each other and the second row is candid, but the first row's citation does not establish the hardware behaviour. Suggest rewording the first row to say the preservation is the translator's choice (unverified on RDNA2) and point to the second row.

I did not find other problems in the changed translator and tool code.

AI-assisted: review by Codex (gpt-6.1-terra); the docs point was checked against both rows before posting.

**@⁠pwu2775-dev** on GitHub · 2026-11-24 07:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#pullrequestreview-6035356795) · **reviewed** Code read of 42344493 against main. One docs point, not blocking. The two `docs/design.md` rows this PR adds disagree. The first row (`v_sat_pk_u8_i16`) gives Mesa ACO's `instr_is_16bit` as the reason the destination's high half is kept; the second row (the wave64 halves path) says that function is false for this opcode before GFX11 and that what RDNA2 does with the high half is not measured. The translator behaviour and the wave64 classification are consistent with each other and the second row is candid, but the first row's citation does not establish the hardware behaviour. Suggest rewording the first row to say the preservation is the translator's choice (unverified on RDNA2) and point to the second row. I did not find other problems in the changed translator and tool code. AI-assisted: review by Codex (gpt-6.1-terra); the docs point was checked against both rows before posting.
Author
Owner

@⁠pwu2775-dev on GitHub · 2026-11-24 07:37 UTC · original

Tested 42344493 on NVIDIA GeForce RTX 4070, driver 617.42, Windows 11 10.0.26300, MSVC (VS 2022), Vulkan SDK 1.4.363.0, Ninja RelWithDebInfo: pass for what I could run, with one gap.

  • tests/semantic/test_alu_sat_pk_u8_i16.py and test_wave64_halves_sat_pk.py: 10/10.
  • Not run: tests/test_wave64_halves_fixtures.py, tests/test_translate.py and tests/test_f16_op_sel.py import pytest, which is not installed here, so those three (two of them edited by this PR) were not exercised.
  • No GPU fixture exists for this op (--filter sat_pk matches nothing), so nothing GPU-side was checked; the docs row says the same.
  • ctest: 302/303 passed; the one failure is d3d12_execute_indirect_validation, which is the red-on-main case in #504 and fails the same way on all three PRs. I did not rerun it on main itself.
  • Full run_gpu_tests.py: 197/248 passed, 49 skipped; with LEONIDA_W64_EMULATE=1: 229/248 passed, 17 skipped, the same totals as my unmodified-main record in #534.

One docs point (not blocking): the two new docs/design.md rows disagree about the Mesa ACO citation; details in my review: #508

AI-assisted: review by Codex (gpt-6.1-terra).

**@⁠pwu2775-dev** on GitHub · 2026-11-24 07:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#issuecomment-7125199786) Tested 42344493 on NVIDIA GeForce RTX 4070, driver 617.42, Windows 11 10.0.26300, MSVC (VS 2022), Vulkan SDK 1.4.363.0, Ninja RelWithDebInfo: pass for what I could run, with one gap. - `tests/semantic/test_alu_sat_pk_u8_i16.py` and `test_wave64_halves_sat_pk.py`: 10/10. - **Not run:** `tests/test_wave64_halves_fixtures.py`, `tests/test_translate.py` and `tests/test_f16_op_sel.py` import `pytest`, which is not installed here, so those three (two of them edited by this PR) were not exercised. - No GPU fixture exists for this op (`--filter sat_pk` matches nothing), so nothing GPU-side was checked; the docs row says the same. - `ctest`: 302/303 passed; the one failure is `d3d12_execute_indirect_validation`, which is the red-on-main case in #504 and fails the same way on all three PRs. I did not rerun it on `main` itself. - Full `run_gpu_tests.py`: 197/248 passed, 49 skipped; with `LEONIDA_W64_EMULATE=1`: 229/248 passed, 17 skipped, the same totals as my unmodified-`main` record in #534. One docs point (not blocking): the two new `docs/design.md` rows disagree about the Mesa ACO citation; details in my review: https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/508 AI-assisted: review by Codex (gpt-6.1-terra).
Author
Owner

@⁠Sangonapou on GitHub · 2026-11-24 16:09 UTC · original

Tested 232a2ce6 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass for what a 32-only device can run

Runtime built at this head with scripts\build_runtime.ps1 (MSVC 19.51); shaders from runtime/test/shaders/build.py at this head (llvm-mc 23.1.6, SPIRV-Tools 2026.4); then python -I runtime/test/shaders/w64_graphics.py <spirv dir> runtime\build, exit 0. No game files.

  • The new tier A fixture passes on two 32-lane halves: ps_w64_a_sat_pk_hi A ok.
  • All tier A (10/10) and tier B (8/8) fixtures ok.
  • Tier C (13, including the new ps_w64_c_sat_pk_hi) all SKIP (tier C needs a device that can require both 64 and 32, or W64G_REF), so the tier C half of this change needs a 64-and-32 device or a W64G_REF capture.
**@⁠Sangonapou** on GitHub · 2026-11-24 16:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#issuecomment-7137205665) Tested 232a2ce6 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass for what a 32-only device can run Runtime built at this head with `scripts\build_runtime.ps1` (MSVC 19.51); shaders from `runtime/test/shaders/build.py` at this head (`llvm-mc` 23.1.6, SPIRV-Tools 2026.4); then `python -I runtime/test/shaders/w64_graphics.py <spirv dir> runtime\build`, exit 0. No game files. - The new tier A fixture passes on two 32-lane halves: `ps_w64_a_sat_pk_hi A ok`. - All tier A (10/10) and tier B (8/8) fixtures `ok`. - Tier C (13, including the new `ps_w64_c_sat_pk_hi`) all `SKIP (tier C needs a device that can require both 64 and 32, or W64G_REF)`, so the tier C half of this change needs a 64-and-32 device or a `W64G_REF` capture.
Author
Owner

@⁠milk4sale on GitHub · 2026-11-24 16:35 UTC · original

@⁠pwu2775-dev thanks, you were right that the first row's citation did not establish it. Reworded in 232a2ce6: the v_sat_pk_u8_i16 row no longer cites ACO instr_is_16bit for the kept high half. It now says the translator writes the result with write_lo16, that keeping the high half is the translator's choice and is not measured on RDNA2, and it points to the next row's references. The two rows agree now.

@⁠Sangonapou thanks for the run at 232a2ce6. The tier C half is still unrun: it needs a device that can require both 64 and 32, or a W64G_REF capture, as you say.

AI-assisted.

**@⁠milk4sale** on GitHub · 2026-11-24 16:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#issuecomment-7137916784) @⁠pwu2775-dev thanks, you were right that the first row's citation did not establish it. Reworded in 232a2ce6: the `v_sat_pk_u8_i16` row no longer cites ACO `instr_is_16bit` for the kept high half. It now says the translator writes the result with `write_lo16`, that keeping the high half is the translator's choice and is not measured on RDNA2, and it points to the next row's references. The two rows agree now. @⁠Sangonapou thanks for the run at 232a2ce6. The tier C half is still unrun: it needs a device that can require both 64 and 32, or a `W64G_REF` capture, as you say. AI-assisted.
Author
Owner

@⁠milk4sale on GitHub · 2026-11-24 20:18 UTC · original

The red windows, linux-gpu-tools and macos jobs come from main as it was when this run was created, not from this change. Their checkout step says Merge 232a2ce6d into a28927849, and a28927849 is older than two fixes:

  • windows: linking gta6rt.exe fails with __imp_WaitOnAddress, __imp_WakeByAddressSingle and __imp_WakeByAddressAll unresolved in leonida_xma2_decoder.lib. #877 (merged 16:58 UTC) adds synchronization to that library's link libraries.
  • linux-gpu-tools and macos: cs_imgload_tfe and cs_imgload_d16_tfe fail (on Linux: r32 sint (sint view): 64 bad, texel(5,3) = 2071). #892 (merged 17:15 UTC) corrected those two fixtures' expected TFE status.

This pull request touches none of the files #877 and #892 change, and it merges into current main (58be9cdf8) without conflict. Re-running the failed jobs would test the same old merge, so I'm leaving 232a2ce6d, the head tested above, as it is rather than pushing just to restart CI. I haven't found a finished run of these jobs on a main that has both fixes yet.

AI-assisted.

**@⁠milk4sale** on GitHub · 2026-11-24 20:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#issuecomment-7143346102) The red `windows`, `linux-gpu-tools` and `macos` jobs come from `main` as it was when this run was created, not from this change. Their checkout step says `Merge 232a2ce6d into a28927849`, and `a28927849` is older than two fixes: - `windows`: linking `gta6rt.exe` fails with `__imp_WaitOnAddress`, `__imp_WakeByAddressSingle` and `__imp_WakeByAddressAll` unresolved in `leonida_xma2_decoder.lib`. #877 (merged 16:58 UTC) adds `synchronization` to that library's link libraries. - `linux-gpu-tools` and `macos`: `cs_imgload_tfe` and `cs_imgload_d16_tfe` fail (on Linux: `r32 sint (sint view): 64 bad, texel(5,3) = 2071`). #892 (merged 17:15 UTC) corrected those two fixtures' expected TFE status. This pull request touches none of the files #877 and #892 change, and it merges into current `main` (`58be9cdf8`) without conflict. Re-running the failed jobs would test the same old merge, so I'm leaving `232a2ce6d`, the head tested above, as it is rather than pushing just to restart CI. I haven't found a finished run of these jobs on a `main` that has both fixes yet. AI-assisted.
Author
Owner

@⁠potatoe0100 on GitHub · 2026-11-25 10:12 UTC · original

Tested head 38623a957 merged onto main 57ba40bd6 (clean merge) on NVIDIA GeForce RTX 4060 (Ada, subgroup 32 only), driver 621.14, Windows 11 Pro 26300, VS 2022, Vulkan SDK 1.4.363.0: pass.

  • build.py on the 34 wave64 graphics fixtures: 34 translated, 34 pass spirv-val.
  • w64_graphics.py: 19 ok, 13 tier C SKIP (expected on a 32-only device), 0 failed. ps_w64_a_sat_pk_hi ok; ps_w64_c_sat_pk_hi SKIP.
  • pytest: test_alu_sat_pk_u8_i16.py 5, test_wave64_halves_sat_pk.py 5, test_f16_op_sel.py 40, test_wave64_halves_fixtures.py 10 passed. test_translate.py 707 passed, 2 failed (cs_dpp_cmp.asm, the same 2 fail on plain main).

No game files. AI-assisted (Claude Code), run for a non-developer tester.

**@⁠potatoe0100** on GitHub · 2026-11-25 10:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/508#issuecomment-7159387127) Tested head `38623a957` merged onto `main` `57ba40bd6` (clean merge) on NVIDIA GeForce RTX 4060 (Ada, subgroup 32 only), driver 621.14, Windows 11 Pro 26300, VS 2022, Vulkan SDK 1.4.363.0: pass. - `build.py` on the 34 wave64 graphics fixtures: 34 translated, 34 pass spirv-val. - `w64_graphics.py`: 19 ok, 13 tier C SKIP (expected on a 32-only device), 0 failed. `ps_w64_a_sat_pk_hi` ok; `ps_w64_c_sat_pk_hi` SKIP. - pytest: `test_alu_sat_pk_u8_i16.py` 5, `test_wave64_halves_sat_pk.py` 5, `test_f16_op_sel.py` 40, `test_wave64_halves_fixtures.py` 10 passed. `test_translate.py` 707 passed, 2 failed (`cs_dpp_cmp.asm`, the same 2 fail on plain `main`). No game files. AI-assisted (Claude Code), run for a non-developer tester.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/508/head:github-bot/gh-508'
git switch 'github-bot/gh-508'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-508'
git switch 'github-bot/gh-508'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-508'
git switch 'github-bot/gh-508'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-508'
git switch 'main'
git merge --squash 'github-bot/gh-508'
git switch 'main'
git merge --ff-only 'github-bot/gh-508'
git switch 'main'
git merge 'github-bot/gh-508'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.