Skip to content

shader, xtask, docs: add a reduced GFX10 conformance corpus - #52

Merged
simnJS merged 3 commits into
MiamiGame:mainfrom
PrivacyOnion:shader/gfx10-conformance
Nov 25, 2026
Merged

simnJS merged 3 commits into
MiamiGame:mainfrom
PrivacyOnion:shader/gfx10-conformance

Conversation

@PrivacyOnion

@PrivacyOnion PrivacyOnion commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Fixes: #14

Depends on: none

Add a GFX10 decoder conformance test against the public LLVM MC AMDGPU encodings. The test checks instruction lengths and names so that decoder changes get exercised across the instruction families represented in the corpus. Issue #14 records the agreement to keep a generated corpus as test data. Corpus agreement in #14

The checked-in corpus now has 2,472 encodings in one 82,997-byte shard, down from 31,719 encodings across three shards. It keeps one sorted representative per mnemonic, dword count, encoding family and decoder selector combination. cargo xtask gfx10-corpus --llvm-dir <DIR> verifies the hashes of the pinned input files before extracting them. Use --full --out-dir <DIR> for all 31,716 unique encodings from the active LLVM checks. Full generation requires an explicit output directory so that it cannot accidentally overwrite the checked-in reduced shard. The maintainer verified all 20 source hashes and all 2,472 retained rows, and accepted the fixture size under #14.

The conformance test checks every retained row, with zero decode errors or length mismatches across 19 encoding families. After accounting for encoding-form suffixes, the test pins nine missing opcode names and two unresolved legacy names. Follow-up issue #64 covers VOP3 VINTRP aliases, image_gather4h, the four image_sample_*cd*_g16 forms, and v_dot8_i32_i4. It also tracks which legacy MAD/MAC or FMA/FMAC forms the console decodes. XTP follows Mesa gfx1010 at the disputed opcodes, and the public LLVM GFX10.3 tests use FMA/FMAC.

Area

Shader decoder and conformance fixtures, xtask corpus generation, and developer documentation and third-party notices.

Tests

  • cargo xtask pr-check passes on my machine
  • New or changed behaviour has tests that need no game files, or I explain below why it cannot
  • Ran on a title: no
  • After merging main, cargo xtask pr-check --base upstream/main --title "shader, xtask, docs: add a reduced GFX10 conformance corpus" --skip test passed formatting, both Clippy configurations, asset policy and conventions. The workspace test step was skipped.
  • cargo test -p xtp-shader --test gfx10_conformance passed (1 test).
  • cargo test -p xtask passed (47 tests), including the new argument validation test and the replay test from main.
  • Before the merge, cargo test -p xtp-shader --lib passed (448 tests, 40 ignored), and local corpus regeneration succeeded from the 20 pinned files.

Provenance

  • I wrote all of this change myself for XTP, or it only moves code already in XTP.

  • Some of it comes from elsewhere. Each source, its licence and the files concerned are listed here, and every licence is compatible with GPL-3.0-or-later:

  • LLVM Project, tag llvmorg-19.1.7, Apache-2.0 WITH LLVM-exception. XTP extracts and reformats only the mnemonic and encoding words into crates/xtp-shader/tests/data/gfx10-llvm-mc-01.txt. crates/xtp-shader/tests/data/LICENSE-LLVM.txt carries the licence and exception, and the shard records each source hash. Pinned LLVM MC AMDGPU sources

    The inputs under llvm/test/MC/AMDGPU/ are exp-gfx10.s, gfx1011_dlops.s, gfx1013.s, gfx1030_new.s, gfx10_asm_dpp16.s, gfx10_asm_dpp8.s, gfx10_asm_ds.s, gfx10_asm_flat.s, gfx10_asm_mimg.s, gfx10_asm_mubuf.s, gfx10_asm_smem.s, gfx10_asm_sop.s, gfx10_asm_vop1.s, gfx10_asm_vop2.s, gfx10_asm_vop3.s, gfx10_asm_vopc.s, gfx10_asm_vopc_e64.s, gfx10_asm_vopc_sdwa.s, gfx10_asm_vopcx.s, and mtbuf-gfx10.s.

  • The comparison uses the existing Mesa 22.3.0 GFX10 opcode table. Its MIT notice is in crates/xtp-shader/src/gfx10/opcodes.rs.

AI assistance: AI coding tools wrote parts of this change: Antigravity (Gemini) the original generator and test, OpenAI Codex the review changes. The corpus was regenerated from the pinned LLVM inputs and checked locally.

Checklist

  • No game data, keys, console SDK code or headers, and nothing that circumvents DRM (asset policy)
  • No code copied from xcl or AnyPS5 (references only: read them to understand, write your own)
  • I agree to license this contribution under GPL-3.0-or-later
  • Title and every commit follow <area>: <summary>; one topic; under 400 changed lines, or the reason is above
  • Docs updated where behaviour, commands or variables changed (README, docs/)

@github-actions github-actions Bot added area/shader touches crates/xtp-shader area/xtask xtask/ size/XL 1000 or more changed lines labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown

This pull request changes 32371 lines (Cargo.lock aside). Pull requests of 1000 lines or more are reviewed only once split, or when a maintainer agreed to the size beforehand in an issue: see Size. If that agreement exists, link it in the description.

@PrivacyOnion

Copy link
Copy Markdown
Contributor Author

Note on PR size (xtp:pr-size): the hand-written Rust code is ~650 lines (xtask/src/gfx10_corpus.rs, crates/xtp-shader/tests/gfx10_conformance.rs, and an 8-line decode_one helper in gfx10/mod.rs). The remaining 31,719 lines are the generated LLVM MC GFX10 encoding corpus shards (crates/xtp-shader/tests/data/gfx10-llvm-mc-*.txt, each <= 384 KiB and passing xtask policy) requested by #14 ("kept as test data we generate ourselves"). Happy to split or trim the checked-in corpus if maintainers prefer a smaller subset!

@simnJS simnJS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking up #14; the generator and the test are clean. I checked the corpus independently: all 31,719 entries appear verbatim in the 20 LLVM files at llvmorg-19.1.7, the shards hold nothing else, and CI is green. A few things before it goes in:

  1. Provenance and licence. The shards are third-party data (Apache-2.0 WITH LLVM-exception). Please restore the PR template and tick "Some of it comes from elsewhere", listing the source (llvm-project llvmorg-19.1.7, the 20 files under llvm/test/MC/AMDGPU/), its licence and the files concerned. Please also add a short NOTICE.md section, and have the generator write into each shard header SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception, "Part of the LLVM Project, see https://llvm.org/LICENSE.txt" and "extracted and reformatted from …" (Apache-2.0 §4: attribution, licence, notice of changes).
  2. Legacy MAD/MAC entry (gfx10_conformance.rs:24): it says console silicon "keeps non-fused legacy MAD/MAC", which neither the corpus nor XTP establishes. These consoles are RDNA 2-class, and the GFX10.3 file in your corpus names these opcodes v_fma_legacy_f32 / v_fmac_legacy_f32. Please state only what is known: our table follows Mesa's GFX10 column, GFX10.3 uses these opcodes for the fused forms, and which one the console runs is open. As written, the test reads as evidence for the unfused lowering in emit/lower/valu.rs.
  3. Size: please link #14 in the description as the agreement for the corpus, as the bot asked.
  4. Nits: require_gfx10_prefix is false for every LLVM_FILES entry, so drop it or use it; a SHA-256 per fetched file would make curl regeneration verifiable.

The gaps you pinned (VOP3 VINTRP, image_gather4h, the _cd_g16 samples, v_dot8_i32_i4) are real decoder gaps; could you open a follow-up issue for them? Thanks!

@fogydes fogydes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of PR #52: GFX10 decoder conformance corpus and test

Reviewed head 6a0f02b (one commit), by reading gh pr diff 52 and
origin/main. Nothing was built or run. All CI checks on
the PR are green, including policy, conventions, clippy,
clippy-diagnostics, test and gpu-debug-layer. Nobody has reviewed it yet
(no review, no maintainer comment); the only comments are the size bot and the
author's reply to it.

Verdict: needs changes

The Rust is good and the test is meaningful. Three things stop me recommending
approval as it stands:

  1. the licence handling is incomplete for Apache-2.0 data that the PR itself
    labels as Apache-2.0 (finding 1);
  2. at 32,378 changed lines, the PR is size/XL, and issue #14 contains no prior
    agreement to that size (finding 2); and
  3. one of the eleven "explained differences" has an explanation that is
    unsupported and probably wrong, so the test pins what may be a real decoder
    error as correct (finding 3).

None of these is a rewrite. Items 1 and 3 are small edits; item 2 is a decision
for the maintainer, and I give a concrete way to cut the corpus to about 7 %
of its size without losing the properties the test checks.

Licensing and provenance (the main question)

Where the corpus comes from. From LLVM's public MC assembly tests,
llvm/test/MC/AMDGPU/*.s, tag llvmorg-19.1.7, 20 named files
(xtask/src/gfx10_corpus.rs:27-48). The generator reads the FileCheck lines
(// GFX10: <asm> ; encoding: [0x..,...]) and stores only mnemonic plus the
encoded dwords in hex. It is not from a disassembler, not from AMD documents,
and there is no console SDK, no driver dump and no game material anywhere. I
sampled the corpus (1,757 distinct mnemonics, 31,719 lines, one to five
dwords per line) and grepped it for title, SDK and console names: nothing.
docs/asset-policy.md is not touched by it, and the CI policy check passes
(.txt files under 512 KiB, no long hex runs, because words are spaced).
The list includes gfx1013.s and gfx1011_dlops.s; these are ordinary public
LLVM test files (anyone can read them upstream), and the issue asked for "LLVM
MC gfx10 tests" without naming files.

Licence. LLVM is "Apache License v2.0 with LLVM Exceptions". Apache-2.0 is
compatible with GPL-3.0-or-later (one way: Apache code can go into a GPLv3
work), and CONTRIBUTING.md lists Apache-2.0 as acceptable. The issue and
docs/analysis/shader.md S6 both name this source and licence as approved. So
the choice of source is correct.

What is missing.

  • The corpus is a derivative of Apache-2.0 material, and the PR labels it as
    such (# Source license: Apache-2.0 WITH LLVM-exception. in each shard,
    xtask/src/gfx10_corpus.rs:120). Apache-2.0 section 4 asks anyone who
    redistributes a Work or Derivative Work to give recipients a copy of the
    licence, and to keep the copyright and attribution notices. The shard header
    names the licence only; it carries no copyright holder ("The LLVM Project"),
    no URL of the upstream repository, no pointer to a licence text, and the
    repository has no copy of the licence (git ls-tree origin/main has only
    LICENSE (GPL) and NOTICE.md). NOTICE.md has a section on references that
    are not copied and says third-party material "keeps its own notices", but it
    does not mention LLVM.
  • Honest caveat: the encodings and mnemonics are facts about hardware, and a
    hex-only extract of them is thin, so a copyright claim over them would be
    weak. That is not a reason to leave the PR's own Apache label without its
    conditions; the cheap fix below removes the question.
  • The PR's Provenance section states the source tag and the licence in one
    clause but does not follow the template's "Some of it comes from elsewhere"
    form (each source, its licence, the files concerned, ticked box). The body
    replaced the template. CI conventions passes anyway.
  • The test's header and KNOWN_NAME_DIFFERENCES comments also cite "Mesa
    22.3.0 aco_opcodes.py" as the origin of the existing opcodes.rs table.
    That is existing code and out of scope, but it is why the table (MIT) and
    these comments agree, and the final licence note should say so too.
  • I could not check that the checked-in corpus equals what the generator would
    produce from the tag (no network, no build). The PR records no hash of the
    source files, so a reviewer cannot confirm either (finding 5).
  • The claim of independence from xcl is plausible: xcl's checked agreement
    uses 23,812 encodings (docs/analysis/shader.md section 5.1) and this corpus
    has 31,719 from a different, explicitly parsed file list, with its own parser.
    I cannot prove it from the diff alone; the author's tick and the different
    numbers are what I have.

Fix for finding 1: add crates/xtp-shader/tests/data/LICENSE-LLVM.txt
(the Apache-2.0 text with the LLVM exception, copied verbatim from upstream
llvm/LICENSE.TXT at the pinned tag, under the 512 KiB policy limit), give
each shard header a second line "Derived from the LLVM Project
(https://github.com/llvm/llvm-project, tag llvmorg-19.1.7), Copyright (c)
LLVM Project contributors; modified: reduced to mnemonic and encoding words,
deduplicated and sorted; see LICENSE-LLVM.txt", extend the generator's header
string to emit it, add one paragraph to NOTICE.md, and re-do the PR's
Provenance with the template's "comes from elsewhere" list (source, licence,
20 files). If the policy check rejects the licence file's type, it needs an
entry in xtask/src/policy.rs with a reason; that is a mechanical edit the
maintainer should expect.

Findings, by severity

High

  1. Apache-2.0 conditions not met for the corpus (see above). Files:
    crates/xtp-shader/tests/data/gfx10-llvm-mc-0{1,2,3}.txt:1-3,
    xtask/src/gfx10_corpus.rs:117-124 (the header), NOTICE.md.
    Fix as described.

  2. PR size is size/XL without prior agreement. 31,719 of the 32,378 lines
    are generated data; the hand-written part is about 650 lines. The size bot
    already said this, and CONTRIBUTING.md ("Size") says XL is reviewed only
    once split or when a maintainer agreed to it beforehand in an issue. Issue
    #14 says "kept as test data we generate ourselves" but no size, and no
    maintainer reply agrees to 32k lines. The author offered to trim.
    Is it justified? Not at this size, for what the test checks. The test checks
    only the decoded opcode name and dword length (gfx10_conformance.rs:~120-210).
    Those depend on the opcode and a few mode bits, not on operand values, but
    the corpus contains every operand variant LLVM tests (for example 14
    buffer_atomic_add lines that differ only in offset and register fields):
    there are only 2,227 distinct (mnemonic, dword count) pairs among 31,719
    lines (7 %)
    .
    Fix options, in my order of preference:
    (a) keep one representative per (mnemonic, dword count), and also keep any
    line whose first word has a different value in the decoder-relevant bits
    (the literal/DPP/SDWA/NSA selectors: src0 in {0xff, 0xf9, 0xfa, 0xe9, 0xea} for VOP, the 0xff source for VOP3/SOP, w & 0x6 for MIMG, bit 25
    of MUBUF, bit 21 of MTBUF word 1, which gfx10/mod.rs reads), giving
    roughly 3-4k lines in one shard; (b) split the PR (generator and test with
    the small corpus first); (c) ask the maintainer in issue #14 to agree to the
    size. The generator keeps the full dump for anyone who wants it
    (--llvm-dir), so nothing is lost. Whichever is chosen must be agreed in
    the issue before merge.

Medium

  1. The explanation of the legacy MAD/MAC difference is unsupported and
    probably wrong.
    gfx10_conformance.rs:24-39: the test says XTP's name
    v_mad_legacy_f32/v_mac_legacy_f32 is right because "GFX10.1 / Xbox
    Series silicon keeps non-fused legacy MAD/MAC" at VOP3 0x140 and VOP2
    0x006, while "GFX10.3 PC reused" them for FMA/FMAC. No source is given for
    the console claim. Xbox Series is an RDNA 2 part, the family gfx1030_new.s
    (in this very corpus) describes with FMA at those opcodes; the claim that
    the console behaves like GFX10.1 contradicts that, and the test file's own
    header says the table "targets Xbox Series / Scarlett silicon" while it is
    generated from Mesa 22.3.0's GFX10 (gfx1010) table. If the console decodes
    0x140 as FMA, XTP names it wrongly, and this test now hides the error
    (and 6 corpus lines). If the author learned the console behaviour from
    non-public material, that conflicts with the asset policy and the
    no-xcl-reading statement. Fix: either cite a public source (an LLVM or
    Mesa commit, an AMD ISA document) in the comment, or rewrite the comment as
    "unresolved: XTP follows Mesa's GFX10.1 table; GFX10.3 and later (LLVM
    gfx1030_new.s) name these opcodes v_fma_legacy_f32/v_fmac_legacy_f32;
    which one the console decodes is not established here" and open a follow-up
    issue. Do not call it explained.

  2. Eleven pinned differences are not equally "explained", and one set is a
    real decoder gap.
    The issue's acceptance is "100 % agreement or each
    difference explained", and the listing is honest and self-checking (a stale
    entry fails the test, gfx10_conformance.rs:265), which I like. But
    v_interp_p1_f32_e64, v_interp_p2_f32_e64, v_interp_mov_f32_e64
    (44 lines, the biggest group) are valid VOP3 instructions the decoder returns
    no name for, because opcodes.rs does not alias VOP3 0x200..=0x202 to
    VINTRP (gfx10/mod.rs:name, Vop3 arm). The PR calls it "not aliased"; a
    shader using attribute interpolation with modifiers would hit it. Likewise
    image_gather4h, the four image_sample_*cd*_g16 forms and
    v_dot8_i32_i4 are missing opcodes. The author avoided opcodes.rs to
    dodge the in-progress _g16/a16 work (that was the maintainer's request
    in the issue, so fine), but each gap needs a follow-up issue, and the
    _g16 entries will start failing the stale check as soon as the core team's
    change lands (intended, but tell them). Fix: list the follow-ups in the PR
    description.

Low

  1. Generator reproducibility and provenance. xtask/src/gfx10_corpus.rs:

    • fetch_llvm_file (:104) shells out to curl for 20 URLs with no hash
      check, so the output depends on whatever the tag serves; the header says
      llvmorg-19.1.7 (:120) even when --llvm-dir points at a different
      checkout (:~65), which can mislabel a corpus. Fix: store a SHA-256 per
      source file in LLVM_FILES, verify after reading either way, and emit the
      hashes in the header (or refuse --llvm-dir content that does not match).
    • The LLVM_FILES flag is documented as "require_gfx10_prefix" but every
      entry is false, so the parameter and the bool plumbing is dead
      weight (:27-48, parse_llvm_mc, is_gfx10_prefix). Either use it for
      the shared multi-architecture files (are there any in the list? the
      comment says so; there is none) or remove it.
    • is_gfx10_prefix (:206-242): the exclusion list uses substring checks
      (contains("GFX9") and so on) and then accepts anything that
      contains("GFX10"), so a prefix like NOT-GFX10 or GFX10-NOT would be
      taken as positive. None appear in the 20 files I can reason about, but
      the function is fragile; match whole tokens split on -/,.
    • Only one parser unit test (:~300, three positive and two negative
      lines); no test for shard splitting, determinism or first_mnemonic
      edge cases (a CHECK line without an inline mnemonic takes the last
      source line's, which is right for LLVM's layout but can mislabel when an
      alias was used in the source).
    • The generator writes into the repository by default; that is intended
      here (checked-in test data) and is not a policy problem.
  2. decode_one leaves a public production API for a test.
    gfx10/mod.rs (+8 lines): it ignores bytes after the first instruction
    and duplicates decode's multiple-of-4 check. Fine and minimal, which
    the issue asked for; add a doc line that trailing bytes are ignored and that
    literals and extra dwords are part of the instruction, since the test relies
    on both.

  3. Docs. docs/analysis/shader.md S6 still reads as open work and the new
    cargo xtask gfx10-corpus command (flags --llvm-dir, --out-dir) is
    documented only in --help. One line in docs/dev/START_HERE.md and
    updating S6's status would satisfy the conventions rule "docs updated where
    commands change".

Is the test meaningful, or can it pass vacuously?

It is meaningful. In particular:

  • Every corpus line must decode without error, to the same dword count as
    LLVM
    (gfx10_conformance.rs:~190-205), which genuinely tests the decoder's
    length logic (literals, DPP8/DPP16/SDWA, NSA address dwords for MIMG, the
    s_setreg_imm32 form) because the corpus passes the full encoded dwords.
  • Names are compared after removing _e32/_e64/_dpp/_sdwa (:145-153), and a
    None name from the decoder is a mismatch unless the difference table says
    None for that exact base mnemonic.
  • The difference table is checked for staleness (:265) and the corpus must
    exceed 30,000 entries (:158), which also catches a deleted shard (removing
    any one shard leaves at most 24,504 entries, under the floor) and the 19 families are
    asserted to be exercised (:268-292), so an empty or truncated corpus cannot
    pass.
  • Reading is strict: a bad hex field, an empty line of words or an unreadable
    shard panics.

Weaker points, none blocking: the test checks names and lengths only, not
operands or the encoding family (so v_add_f32_e64 decoding as VOP2 would
pass); 32-bit VINTRP (Encoding::Vintrp) is not exercised at all (no
LLVM line uses it; the test comment admits it); a known difference with None
passes for every encoding of that mnemonic, not only the ones documented; and
the "30,000" floor is a constant that must be hand-edited whenever the corpus
is regenerated smaller (it will break option 2(a) above, which is easy to fix
by reading the count from the shard header instead).

CI time

I could not run it. The author reports 0.09 s for the test; reading three
files of about 1 MB in total and 31.7k small decodes should stay far under a
second even in debug. The test job took 2 m 57 s on this PR, the same as on
other PRs. The generator is not part of CI.

What I did not do

No build, no test run, no GitHub comment, no check that the corpus equals
fresh generator output (no network). The numbers about the corpus come from
counting lines in the PR diff.


Review drafted with Claude Code; findings checked against the PR head by reading the code.

@github-actions github-actions Bot added the conflict conflicts with its base branch label Nov 25, 2026
@github-actions

Copy link
Copy Markdown

This pull request now conflicts with its base branch. Please rebase it on main (or merge main into it) and resolve the conflicts; the conflict label goes away by itself once it merges cleanly.

Check GFX10 instruction names and lengths against a pinned LLVM MC corpus. Keep representative decoder selectors, verify source hashes, and carry the LLVM attribution and licence.

Track missing opcode names and the unresolved legacy MAD/MAC names as separate expectations.
@PrivacyOnion
PrivacyOnion force-pushed the shader/gfx10-conformance branch from 6a0f02b to 2a130b3 Compare November 25, 2026 12:00
@PrivacyOnion PrivacyOnion changed the title shader, xtask: add GFX10 decoder conformance corpus and test shader, xtask, docs: add a reduced GFX10 conformance corpus Nov 25, 2026
@PrivacyOnion

Copy link
Copy Markdown
Contributor Author

simnJS

  1. Provenance and licence. The PR description restores the template and identifies the source tag, all 20 input files, and the affected fixture files. Each shard now carries the SPDX identifier, LLVM attribution, a description of the extraction, and a licence pointer. The licence and exception are in tests/data/LICENSE-LLVM.txt, and the root notice identifies the LLVM data and existing Mesa opcode table.
  2. Legacy MAD/MAC. The test now pins these names as unresolved. XTP follows Mesa's gfx1010 table, while LLVM GFX10.3 calls VOP3 0x140 and VOP2 0x006 FMA and FMAC. The corpus leaves the console behavior open.
  3. Size. The description links Shader decoder conformance against a public RDNA encoding corpus #14 as the agreement to add a corpus. The checked-in data now has 2,472 encodings in one shard, down from 31,719 encodings in three. The reduced PR is still size/XL under the line-count rule.
  4. Generator. Removed the unused flag and added SHA-256 verification for all 20 files on both input paths. The verified hashes appear in each shard.

Follow-up issue #64 covers the nine missing names and the open legacy-opcode question.

fogydes

  1. Licence. Added the Apache-2.0 licence and LLVM exception beside the fixture, and updated the generated header, root notice and provenance section.
  2. Size. Implemented option (a). The sorted corpus keeps one representative per mnemonic, dword count, encoding family and decoder selector combination. That includes the second-word literal positions in VOP3/VOP3P, the MTBUF split opcode bit, and the MIMG NSA count. The conformance test checks every retained row. --full writes every unique encoding from the active LLVM checks.
  3. Legacy MAD/MAC. Replaced the console claim with the Mesa gfx1010 and LLVM gfx1030 names and moved the question of console semantics into the follow-up.
  4. Decoder gaps. Separated the nine missing names from the two unresolved legacy names. The follow-up lists VOP3 VINTRP aliasing, image_gather4h, the four image_sample_*cd*_g16 forms, and v_dot8_i32_i4. The stale-pin check will flag the MIMG entries as the corresponding names are implemented.
  5. Generator. The source hashes are checked before parsing either local or fetched bytes. Prefix matching uses whole tokens, the unused flag is gone, and tests cover prefix rejection, mnemonic parsing and inline aliases, deterministic reduction, selector positions, and shard boundaries.
  6. Single-instruction decode. The doc comment now states the input length requirement and describes literals, extra dwords and trailing dwords.
  7. Docs. Updated S6 to describe the implemented conformance test and added the generator and its flags to the developer guide.

@github-actions github-actions Bot added area/docs docs/, Markdown policy changes the rules, licence or automation: a maintainer reviews labels Nov 25, 2026
@simnJS

simnJS commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the thorough rework. Everything from my review is addressed, and #64 covers the gaps. I fetched the 20 files at llvmorg-19.1.7: every hash matches, and all 2,472 rows appear in them.

Before approval:

  1. Please merge main: xtask/src/main.rs conflicts with the new Replay command (keep both). CI hasn't run on this head yet.
  2. Nit: --full without --out-dir overwrites the checked-in shard. Could it require --out-dir?

The size is fine from our side, since most of it is the pinned conformance data under #14. During review, please push new commits rather than force-pushing.

@PrivacyOnion PrivacyOnion mentioned this pull request Nov 25, 2026
8 of 9 tasks
Keep both the replay and GFX10 corpus commands in xtask.
Reject the command before it can overwrite the reduced fixture.
@PrivacyOnion

Copy link
Copy Markdown
Contributor Author

Thanks for checking the 20 LLVM inputs and all 2,472 rows.

  1. Merged main in 9ec724f and kept both xtask replay and xtask gfx10-corpus in the command definitions and dispatch.
  2. In 91d7ecf, gfx10-corpus --full now requires --out-dir <DIR>. The parser rejects the command before it can write the checked-in shard. A unit test covers the error, the default reduced command, and full generation with an explicit directory.

Both changes are new commits on top of the reviewed head.

Local formatting, both Clippy configurations, asset policy, commit conventions, and both focused test suites passed.

@github-actions github-actions Bot added overlap another open PR changes the same files and removed conflict conflicts with its base branch labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown

Other open pull requests change the same files. Check that they do not do the same work, and agree with their authors on which lands first: the other one will then need a rebase.

Pull request Files changed by both
#68 crates/xtp-shader/src/gfx10/mod.rs

This comment is kept up to date automatically and removed when the overlap ends.

@simnJS simnJS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Both points are done: Replay and Gfx10Corpus coexist, and --full now requires --out-dir, with a parser test. One optional nit: the full-shard header (gfx10_corpus.rs:291) still says gfx10-corpus --full, which no longer runs on its own.

Note on #68: whichever of the two lands second must remove the nine KNOWN_DECODER_GAPS pins, and the stale-pin check will flag them.

Approving; I'll merge once test is green.

@simnJS
simnJS merged commit 848ab58 into MiamiGame:main Nov 25, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs docs/, Markdown area/shader touches crates/xtp-shader area/xtask xtask/ overlap another open PR changes the same files policy changes the rules, licence or automation: a maintainer reviews size/XL 1000 or more changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shader decoder conformance against a public RDNA encoding corpus

3 participants