#152 added rdna2spirv.py --wave64-emulate (wave64 compute and mesh shaders exact on any
subgroup size), but the build never passed it, so 32-wide GPUs (NVIDIA, Intel) got the
native translation.
- auto (default) reads the smallest maxSubgroupSize from vulkaninfo and turns emulation on
below 64, or when vulkaninfo is missing or tells nothing (the emulated output is exact
everywhere). on and off are taken as given.
- The mode used is written to spirv/wave64_emulate.txt; a change translates again. A folder
without the file counts as off, which is how it was made.
- translate() passes the flag to every shard.
- Tests: tests/test_make_game_wave64.py (new), resume and argparse tests extended.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve a trailing NUL byte in a length-prefixed string instead of treating it as a terminator, overwrite per-resource XML files on a rerun rather than adding -0000 duplicates, and reject a source with no RBF0 start. Add tests for trailing NUL strings, non-finite floats and XML reruns.
The game's mesh entry reads v5 on the first active lane and shifts it right
by 7 to get the meshlet/group index. Seeding v5 with the bare linear group
index made that resolve to groupIndex >> 7, so every group below 128 mapped
to meshlet 0. Seed v5 per invocation as linearGroupIndex * NumThreads (PSV0,
128 in this corpus) + LocalInvocationIndex, matching the NGG vertex-ID slot
and TomBox's mesh ABI (gid.x * numThreads + gi).
Not verified on Xbox hardware.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A forwarder target is resolved through game_dir and System32, but not through shims::find, so a forwarder to xmem or d3d12_xs became an unimplemented thunk. Check the normalized module name against the shim registry first, as a direct import already does. A synthetic shim table and a forwarder-to-shim test cover it.
On a 64-wide subgroup, ds_bpermute_b32 is a subgroup shuffle with EXEC-off sources set to 0. The missing lanes
of a partial wave (a 40-thread group) aren't running at all, and SPIR-V leaves a shuffle from them undefined:
RADV returned stale registers that changed between runs, so cs_w64x_partial failed natively on an RX 6700 XT.
The shuffle result is now kept only where a ballot of the running invocations has the source lane.
Both handlers emitted shifts of 32 or more on the side of an OpSelect that is
discarded (v_perm_b32 for every selector byte; v_alignbit_b32 when the shift
is 0). SPIR-V leaves those results undefined, and the semantic interpreter
rejects them, so neither op had a value test. The shifts are now masked; the
selected result is the same for every input.
tests/semantic/test_alu_perm_alignbit.py runs both ops against plain-Python
references: every defined v_perm_b32 selector (0-7, 0x0c, above 0x0c, per
LLVM's AMDGPUISD::PERM known-bits) in every byte, and every v_alignbit_b32
shift including masking above 31. Selectors 8-11 are left untested. The
interpreter gains OpUGreaterThanEqual, which v_perm_b32 uses.
AI-assisted (Claude Code).
CONTRIBUTING.md lists the tool check as `compileall make_game.py tools tests`, but the CI step and
AGENTS.md left out tests/. The pytest-based files are skipped by the Windows test loop, so a syntax
error in them only showed up in the Linux job.