Skip to content

shader: name the opcode and both ranges when a masked arm overwrites its saved EXEC - #3927

Open
triggered02 wants to merge 1 commit into
R0Y00:mainfrom
triggered02:fix/3898-refusal-detail
Open

triggered02 wants to merge 1 commit into
R0Y00:mainfrom
triggered02:fix/3898-refusal-detail

Conversation

@triggered02

Copy link
Copy Markdown
Contributor

Refs #3898, first step as the issue scopes it: "put the opcode and registers into the refusal text and run the offline census on the 55 pipelines".

Why this is the useful first move. The refusal is the largest indirect-draw wall by calls (~46k of ~52k in one census, over 55 pipelines), and today nothing distinguishes two very different cases: a real overwrite of the mask the epilogue restores, or a register pair that is already dead after the restore — which would make the refusal a false positive. The message names neither the instruction nor the registers, so the census cannot be read either way.

Change. The refusal now carries the instruction, its destination range and the saved EXEC range, in both the vertex and pixel arm variants:

native compute +0x1c: masked vertex arm overwrites its saved EXEC: s_mov_b32 writes s8, saved EXEC is s8-9

The safety check is untouched. Only the text changes: if (width && dst < save.dst + (wave32 ? 1u : 2u) && save.dst < dst + width) still refuses exactly the same programs. Relaxing it is a separate decision that needs the census to show deadness, and that census needs the title's 55 pipelines, which I do not have here.

Verification — Debian, clang-cl 19.1.1, Windows CPython in Wine, main d2e6a4ed, compile_dxil built from this branch, run on the container the existing vertex-mask-clobber fixture builds:

$ compile_dxil <dxc-dir> <cache> gfx1013-container-vs clobber.dxbc clobber.cso
compiler_init_ms=86.1266
native compute +0x1c: masked vertex arm overwrites its saved EXEC: s_mov_b32 writes s8, saved EXEC is s8-9

The fixture assertion now pins that exact string, so the Windows job holds the detail rather than just the prefix.

What this does not establish. It does not show the overlap is dead or that relaxing the check is safe, and it makes no frame-time claim. The next step is the census grep on the 55 pipelines, which needs a host with the title data.

…its saved EXEC

R0Y00#3898 is the largest indirect-draw refusal by calls (about 46k of 52k in one
census) and nothing is known about it: the census cannot tell a real overwrite of
the mask the epilogue restores from a register pair that is already dead after the
restore, because the refusal text names neither the instruction nor the registers.

The refusal now reads, for the existing vertex-mask-clobber fixture:

  native compute +0x1c: masked vertex arm overwrites its saved EXEC: s_mov_b32
  writes s8, saved EXEC is s8-9

Both arm variants (pixel and vertex) carry the detail, and the fixture assertion
pins the exact text so the Windows job holds it.

Verified on Debian with clang-cl 19.1.1 and the Windows CPython in Wine, main
d2e6a4e: compile_dxil on the clobber container prints the line above.
The safety check itself is unchanged: this only adds the text needed to decide
whether relaxing it is justified.

Refs R0Y00#3898
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T11:08:04.397143Z ef53f3d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant