shader: refuse unsupported DATA_FORMAT on buffer_load_format in gfx2hlsl (Part of #1809) #1973
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1973
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1973/head"
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?
@tedin7 on GitHub · 2026-11-24 22:21 UTC · original
tedin7:x2w-frontier-1809-data-format→main· +132 −0 · 4 files · 1 commits · closed without mergingPart of #1809
Part of #870
What this unblocks:
buffer_load_format_{x,xy,xyz,xyzw}is now refused by name with its real reason (descriptorDATA_FORMATnot tracked), so the census group is classified and no wrong typed load can be emitted.Verification:
python3 -B tests/startup_gfx2hlsl_buffer_format_check.py-> PASS (9 checks fail against the previousgfx2hlsl.py, all pass with this change)python3 -B tests/startup_gfx2hlsl_tbuffer_16f_check.py-> PASS (typedtbuffer_load_format_*unchanged)git diff --check-> cleanctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_buffer_format$' -V-> not run yet, to be run on Win2025 before mergeScope: this does not lower the loads.
buffer_load_format_*has no format field; the format lives in the resource descriptor, andStage.descriptor()tracks only where descriptor words came from. Guessing a format from the destination width would give silently wrong data. Lowering needs pipeline state that supplies the descriptor words, as described in the issue. The test starts from synthetic encoded MUBUF instructions and pins each width's refusal plus the unchangedbuffer_load_dword.docs/experiments.mdrecords the finding.AI-assisted; commands listed were executed locally.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:29 UTC · original · edited 2026-11-24 22:31 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
e600cddℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@ChazY11 on GitHub · 2026-11-24 22:31 UTC · original
#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
@ChazY11 on GitHub · 2026-11-24 22:34 UTC · original
Update after #1965 merged: this PR now breaks a test on
main, by itselfMy earlier comment described the conflict when #1965 and this PR landed together. #1965 is now merged, so the conflict is no longer
hypothetical — it is
mainplus this PR alone.Verified against
main889cd3f4(git mergeclean, no conflict markers):Control, same tree without the merge:
So
mainis green today and this PR makes it red, while this PR's own check stays green.Why
Two refusals now exist for the same four mnemonics:
op_buffer_load_format_x…_xyzw(this PR, lines 1052–1070) dispatch tobuffer_format_load()before the generic path at 590 isreached, so this PR's text wins and #1965's assertion fails.
tools/startup/triage_run.pyis the second half: the classifier merged with #1965 matchesbuffer_load_format_(?:x|xy|xyz|xyzw) requires descriptor FORMAT and DST_SEL\Z, and against these two stringsthe census group would silently lose all four forms.
What fixes it, smallest first
triage regex at this text in this PR. One message, updated in all three places.
mainred — the assertion intests/startup_buffer_address_check.pyis already merged and is the one that fires.
I have also checked the other open
gfx2hlsl.pyPRs pairwise againstmain(#1978, #1969, #1952, #1946): all ten pairs and thefive-way merge are green, so this is the only collision in that file right now.
Notes
@R0Y00 on GitHub · 2026-11-24 22:44 UTC · original
Thanks for the source-built controls. #1965 is already on main and covers the same four encoded MUBUF widths, as well as the adjacent raw MUBUF and instruction-formatted MTBUF paths. It preserves the refusal group and names both FORMAT and DST_SEL. As the combined run in this thread shows, the two changes would disagree on the exact refusal and break the fixture. Closing the duplicate implementation. #1809 stays open for real bound-descriptor format and swizzle support.
Pull request closed