Commit Graph

25 Commits

Author SHA1 Message Date
59ce2c87b0 Merge origin/main into carry/pr-65
tools/rdna2spirv.py: main's d16 "destination is also read" check (now
DST_ALSO_READ, plus buffer_load_format_d16_hi_x) gains the PR's flat_load_
prefix. docs/design.md: main's 8/16-bit global row is kept and the PR's
"Flat memory" row follows it.

Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:23:56 +01:00
56e5b9a3f0 tools/ab_control_flow.py: validate out/harness/names upfront and guard spvasm reads 2026-11-26 20:49:35 +08:00
3a84ae7aa8 tools/ab_control_flow: handle UTF-8-SIG/CRLF inputs, subprocess encoding and atomic outcomes.tsv 2026-11-25 21:10:56 +08:00
cd77fe0119 ab_control_flow: reject bool metadata, validate entries in supported_pixel_shaders, catch RecursionError 2026-11-23 22:37:12 +01:00
fbe718a460 ab_control_flow: leave flat_atomic out of the A/B sweep too
Review on #8823 (wavehs): NEEDS listed flat_store but not flat_atomic, which
writes memory as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:33:16 -03:00
f797e73085 rdna2spirv: translate FLAT loads and stores as global accesses
flat_load_* / flat_store_* with a 64-bit VGPR address emit the global_*
code with `off` (Gen.global_mem / Gen.global_sub). An address outside the
LDS and private apertures is a global access on RDNA2; the aperture bases
(src_shared_base / src_private_base) are refused, so no translated program
builds an aperture address from them. A non-zero instruction offset, the
FLAT atomics and a 32-bit address stay Unsupported. The first-read analysis
counts a FLAT d16 load's vdst, the interp copy analysis and ab_control_flow
treat flat_store like global_store.

CPU-checked by tests/semantic/test_flat_mem.py; contract row in
docs/design.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:32:58 -03:00
08c1aa634a Compare individual MRT readbacks in the control-flow A/B runner (#6707)
Squash-merged after diff review of PR #6707 - Compare individual MRT readbacks in the control-flow A/B runner
2026-11-23 10:03:29 -06:00
66f557b0c1 ab_control_flow: bad paths and missing SPIR-V tools are one-line errors, not tracebacks (#3409)
Squash-merged after diff review of PR #3409
2026-11-23 09:53:40 -06:00
51931245d5 docs: point 15 more tools at their --help usage line (#5535)
Squash-merged after review of PR #5535 - docs: point 15 more tools at their --help usage line
2026-11-23 08:09:32 -06:00
3db7563f9f Merge pull request #3409 from kapitche
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:28 -05:00
782d151c47 ab_control_flow: check the index shape and read selected inputs before creating output 2026-11-22 20:32:49 -05:00
4e0fbda112 ab_control_flow: bad shaders folder, names file, output path or missing SPIR-V tools is a one-line error 2026-11-22 17:19:06 -05:00
e34b0c7b78 Merge current upstream main into sampled descriptor indexing fix 2026-11-23 08:01:46 +10:00
95e38c4e13 Merge pull request #3161 from Marco Luzzaro 2026-11-22 15:15:18 -05:00
945520f479 Merge pull request #2872 from Vonsek 2026-11-22 15:12:46 -05:00
c901fda139 Merge upstream main into sampled descriptor indexing fix 2026-11-23 06:06:06 +10:00
7d2081b635 Fail control-flow comparisons with no candidates 2026-11-22 20:33:45 +01:00
fdffac4983 Declare dynamic sampled descriptor indexing in translated SPIR-V 2026-11-23 05:08:57 +10:00
e29de14d50 fix(tests): exclude buffer atomics from control-flow A/B selection
Automatic comparison is intended for shaders that do not write memory. Returning a value does not make buffer atomics read-only.
2026-11-22 19:33:52 +01:00
7b97da4fa2 fix(tests): reject incomplete control-flow A/B readbacks
Two truncated frames could compare equal and hide a harness failure in the shader A/B report.
2026-11-22 18:11:15 +01:00
ec9b6cf22b tools: text reports are written with LF line ends on every platform (BUILD-468)
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly
listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/,
make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source
with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention.

AI-assisted (Claude), on behalf of dev-ewann.
2026-11-22 14:20:30 +00:00
f698bf2206 tools: a path outside the console's code page no longer crashes a tool's output
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").

tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:27:00 +00:00
97e0b626a5 ab_control_flow.py: --count, --runs and --timeout must be at least 1
select_candidates() checks `len(picked) >= count` after appending, so
--count 0 or a negative count still picked (and ran) one shader.
--runs 0 rendered nothing and classified every shader as "dispatch form
failed to run", and --timeout 0 gave the harness no time at all. The
three options are now positive whole numbers (argparse errors before
the output folder is made), and select_candidates() refuses a count
below 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:03:07 +01:00
699ba02aa8 test(tools): extract control-flow A/B selection and outcome helpers 2026-11-22 00:50:52 +01:00
987e8471ee Fix RDNA2 wave masks and flat inputs
Preserve whole-wave mask operations, saved EXEC values and flat
pixel inputs when generating SPIR-V. Keep a dispatch-loop fallback
alongside structured control flow and share the descriptor probe.

Add reproducible GPU fixtures for these cases and exercise the
control-flow and mask analyses in CI.
2026-11-21 16:56:54 +02:00