startup: explain formatted MUBUF descriptor refusals #1958
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1965"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by avt0m4t48 on 2026-11-24T22:15:16Z.
Refs #1809. Give all four non-D16 formatted MUBUF load widths a refusal that identifies the required descriptor
FORMATandDST_SELfields. Preserve the existing refusal group in startup triage. The documented request-to-binding trace locates the descriptor words and explains what a future lowering needs. No format is inferred from the number of output registers.python3 -B tests/startup_buffer_address_check.py controlsfails on the original translator at the first encoded formatted request and passes with the change. The encoded requests use one synthetic descriptor table and the same address for the formatted refusals, raw MUBUF control and instruction-formatted MTBUF control.python3 -B tests/startup_translator_check.py, the documentation check andgit diff --checkpassed. The agent also ran all 70 Linux workflow Python scripts successfully, with 24 individual optional skips. Windows CTest and GPU execution remain unverified.Source-built inputs only. AI-assisted using Codex.
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T22:29:11Z.
Ran the control and broke the refusal three ways
Windows 11 build 26300.9974, device-free:
is not lowered_xand drops_xyzwfrom the tuplebuffer_load_format_xyzonlyThe third is the one I did not expect to be covered: the triage classifier is a separate file (
tools/startup/triage_run.py), andnarrowing its alternation means three of the four widths would fall out of the
buffer_* instructiongroup while the translatorstill refuses them. The control notices, so the refusal text and the classifier are kept in step by a test rather than by
convention.
The claim I checked and could not find a case for
The description says "No format is inferred from the number of output registers." That is the right rule, and the danger is
concrete: a
buffer_load_format_xwhose destination happens to bev[4:7]must still be refused, because treating fourdestination registers as
xyzwwould silently read the wrong descriptor fields.The controls I can see exercise
tbuffer_load_format_xyzw v[8:11](line 255) and the refusals for the four widths, but I did notfind a case pairing an
_x/_xymnemonic with a wider destination. If it is there and I missed it, ignore this; if not, it is theone case that would catch a future "infer from the destination" shortcut:
What is good here
FORMAT,DST_SEL) and their word(V# word 3), so a reader of the triage report knows which fields to supply rather than only that the form is missing.
reason the regex was touched at all.
only that they are needed.
What this does not establish
Nothing about a draw: the refusals are text-level, and the "future lowering needs these fields" sentence is a plan, not a
measurement. Windows CTest and GPU execution are unverified here, as the description states.
Verdict
Reviewed. Three behaviours pinned, including the triage classifier staying in sync; one case I would add for the no-inference
rule.
Notes
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T22:31:22Z.
#1965 and this PR are green alone and red together — textually clean merge, broken test
Both change the refusal for the same four mnemonics (
buffer_load_format_{x,xy,xyz,xyzw}), and both are Part of #1809. I mergedboth heads onto current
main(889cd3f4) locally:gitis happy because the two edits are on different lines — but two refusals now exist for the same instruction:and this PR's dispatch wins, because
op_buffer_load_format_x…_xyzw(lines 1052–1070) route tobuffer_format_load()before theolder generic path at 590 is reached. Running #1965's own control on the merged tree:
This PR's check still passes (
startup_gfx2hlsl_buffer_format_check.py→ PASS), so whichever lands second decides whethermainisgreen.
The triage census breaks silently too
#1965 also narrows a classifier in
tools/startup/triage_run.pyto keep the refusal in the existing group:Checked against both texts:
So after this PR's text takes effect, those four refusals fall out of the
buffer_* instructiongroup and the census counts movewithout anyone editing a test.
What I would do
needs the descriptor DATA_FORMAT, which is not tracked) also states why it is missing, which is the more useful half.merge leaves
mainred.tests/startup_buffer_address_check.py controlsandtests/startup_gfx2hlsl_buffer_format_check.pyafter arebase, not just your own check — that pair is the failing combination.
I am not asking for either PR to be dropped; the point is that the two are one decision, and it is easier to take it now than after
whichever merges first.
Notes
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T22:38:33Z.
Correction: the case I suggested here cannot be constructed, so nothing is missing
In my earlier review I asked for a case pairing an
_x/_xymnemonic with a wider destination, to pin "no format is inferred fromthe number of output registers". Checking the fixture on
mainafter the merge, that state is not expressible at the encoding level:The opcode selects both the element count and the destination range, so
buffer_load_format_x v[6:9]is not a word the decodercan produce. The refusal itself does not look at the destination at all (
op_buffer_load_format_*raises unconditionally), so even ahand-written assembly form would be refused.
So the suggestion in my previous comment was a guard against a shortcut that cannot currently arise — please ignore it. The four
refusals and the triage grouping, which are the behaviours that exist, are pinned by the controls that merged.
Notes