Commit Graph

5 Commits

Author SHA1 Message Date
741f5a5c09 tests/semantic: tie the LDS bounds-check test to the %lds index; note the wrap tests pin an approximation 2026-11-22 20:33:23 -05:00
29a8ebea85 tests/semantic: run the LDS read/write, direct, alloc and atomic add/min/max/xchg tests through the translator
test_lds_{read_write,direct,basic_alloc,atomic_add,atomic_minmax,atomic_xchg}.py built their own LDS interpreter
and only checked the shape of Gen's output, so a wrong ds_* lowering could not fail them. They now translate
hand-written compute listings with tools/rdna2spirv.py and run them in spirv_mini_interp, with hand-written
expected words and a plain-Python LDS model for seeded random sequences. basic_alloc also pins the current
allocation rule (offsets past the declared size bound-check instead of growing the array); the old file modelled
the earlier rule.
2026-11-22 15:49:36 -05:00
15f5b2fbc0 Fix what the round-41 merges broke
- tests/semantic: BaseVertex/BaseInstance read 0 in the wave interpreter; the LDS MockGens follow
  SHADER-309 (lds_bound, lds_access, lds_atomic); abs emission tests load their operand, since
  SHADER-315 folds scalar ALU on constants.
- test_translate: the dynamic gather sampler is a loaded word, not s16 + 0 (SHADER-315 folds it).
- test_world_build: DDS downscale weights colours by alpha (62804d0d).
- test_fspx_shaders_stage: the fake disassembler writes the listing make_game now checks.
- xgameruntime_test: re-read the package id after clearing the LEONIDA_PACKAGE_ID override.
- docs: one row per topic again in design.md (72 topics) and README.md; one Other languages line;
  embedded_shaders.md keeps one copy of each bullet; animation.md links the heading anchor.
- tools/scripts: character_textures uses report_paths.same_report_path; stdout guard on six programs;
  LF write in vs_input_survey; the cl.exe fallback compiles winhttp_offline.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:30:33 -05:00
0726e3f26b Translator: ds_permute_b32, the forward (scatter) cross-lane permute (SHADER-90)
Each source lane on in EXEC sends its data to lane ((addr + offset) >> 2) mod 32
of its own half (like ds_bpermute_b32); a destination nobody targets gets 0, an
off destination keeps its VDST. Highest-numbered source wins a collision.
Native: per-source shuffles with a ballot guard for missing lanes; wave64
emulation: two buffer rounds and a %x_perm variable.

Tests: tests/semantic/test_ds_permute.py, GPU tests cs_w32_permute and
cs_w64x_permute. Contract row in docs/design.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 20:22:15 -05:00
aa02d3b8a1 test(semantic): add interpreter tests for LDS basic allocation and workgroup bounds 2026-11-21 19:01:57 +01:00