dxbc: name the first differing VS/PS signature element #581

Closed
csj0oe wants to merge 1 commit from upstream-pr/581 into main
csj0oe commented 2026-11-30 07:48:47 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-30T07:48:47Z.


What

About twenty PSOs a run are rejected with slot 86 pipeline stage failure ... linked=false, and the only clue is vkd3d's Input signature element ... not compatible, which does not say which pair or which field.

  • Adds tuxbox_dxbc::packing_mismatch: the first shared semantic whose register, mask or component type differs, described as producer and consumer, with the component type named (float32/uint32/sint32).
  • Logs one line per rejected pair: slot 86 link mismatch VS=<hash> (prepared) PS=<hash> (original): TEXCOORD0 producer reg 2 mask 0x3, consumer reg 3 mask 0x7.
  • Diagnostics only: has_packing_mismatch keeps its predicate, refactored onto the same helpers.

Tests

  • runtime/dxbc/src/tests/raster.rs::names_the_first_differing_semantic_of_a_rejected_pair, plus a duplicate-semantic row.
  • tests/diagnostics.rs pins the log line so clipping cannot hide the pair.
  • cargo test -p tuxbox-dxbc --features native-bindings: 121 passed.

Not run

No GPU behaviour changes, so no GPU suite exercises it; the line itself has not been observed in a real run yet and will appear on the next one. NVIDIA not applicable.

<!-- greyfinch-sync:brcly/TuxBox:issue:5561196577 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/581). Originally posted by [csj0oe](https://github.com/csj0oe) on 2026-11-30T07:48:47Z. --- ## What About twenty PSOs a run are rejected with `slot 86 pipeline stage failure ... linked=false`, and the only clue is vkd3d's `Input signature element ... not compatible`, which does not say which pair or which field. - Adds `tuxbox_dxbc::packing_mismatch`: the first shared semantic whose register, mask or component type differs, described as producer and consumer, with the component type named (`float32`/`uint32`/`sint32`). - Logs one line per rejected pair: `slot 86 link mismatch VS=<hash> (prepared) PS=<hash> (original): TEXCOORD0 producer reg 2 mask 0x3, consumer reg 3 mask 0x7`. - Diagnostics only: `has_packing_mismatch` keeps its predicate, refactored onto the same helpers. ## Tests - `runtime/dxbc/src/tests/raster.rs::names_the_first_differing_semantic_of_a_rejected_pair`, plus a duplicate-semantic row. - `tests/diagnostics.rs` pins the log line so clipping cannot hide the pair. - `cargo test -p tuxbox-dxbc --features native-bindings`: 121 passed. ## Not run No GPU behaviour changes, so no GPU suite exercises it; the line itself has not been observed in a real run yet and will appear on the next one. NVIDIA not applicable.
brcly commented 2026-11-30 09:49:50 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T09:49:50Z.


Thanks. I checked the premise against our last long boot before deciding:

  • It has 18 rejected pairs, each logged twice as slot 86 pipeline stage failure … linked=false.
  • vkd3d's line for each already names the element and the fields, for example Input signature element COLOR0 (reg 0, mask 0x4) not compatible with COLOR0 (reg 1, mask 0x1) and TEXCOORD7 (reg 1, mask 0x8) … (reg 2, mask 0x1).

So the information this adds is mostly there already. What's new is having the two hashes on the same line, and the component type. That's handy, but it doesn't move the fault itself. As with the other diagnostics-only changes (#567 and #568), I'd rather not merge a log line on its own.

What the logs do show is where the fault is: every rejected pair is a prepared VS with an original PS, and linked=false. The vertex shader was translated for a different pixel shader, or with no pixel shader at all, and then paired with this one without relinking. A PR that finds why these pairs skip the link step, and makes them link (or prepares the VS for the PS it's actually paired with), would be very welcome. If you need this helper to find that, keep it locally, and add it to the fix if it's useful as a permanent check there.

<!-- greyfinch-sync:brcly/TuxBox:comment:7274743037 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/581#issuecomment-7274743037). Originally posted by [brcly](https://github.com/brcly) on 2026-11-30T09:49:50Z. --- Thanks. I checked the premise against our last long boot before deciding: - It has 18 rejected pairs, each logged twice as `slot 86 pipeline stage failure … linked=false`. - vkd3d's line for each already names the element and the fields, for example `Input signature element COLOR0 (reg 0, mask 0x4) not compatible with COLOR0 (reg 1, mask 0x1)` and `TEXCOORD7 (reg 1, mask 0x8) … (reg 2, mask 0x1)`. So the information this adds is mostly there already. What's new is having the two hashes on the same line, and the component type. That's handy, but it doesn't move the fault itself. As with the other diagnostics-only changes (#567 and #568), I'd rather not merge a log line on its own. What the logs do show is where the fault is: every rejected pair is a **prepared** VS with an **original** PS, and `linked=false`. The vertex shader was translated for a different pixel shader, or with no pixel shader at all, and then paired with this one without relinking. A PR that finds why these pairs skip the link step, and makes them link (or prepares the VS for the PS it's actually paired with), would be very welcome. If you need this helper to find that, keep it locally, and add it to the fix if it's useful as a permanent check there.
csj0oe commented 2026-11-30 10:10:27 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-30T10:10:27Z.


Closing, agreed. Reporting why a prepared-VS/original-PS pair skipped linking is not the fix; the fix is making the pair link. Keeping the helper locally until there is a pairing change to carry it. Branch kept.

<!-- greyfinch-sync:brcly/TuxBox:comment:7275229509 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/581#issuecomment-7275229509). Originally posted by [csj0oe](https://github.com/csj0oe) on 2026-11-30T10:10:27Z. --- Closing, agreed. Reporting why a prepared-VS/original-PS pair skipped linking is not the fix; the fix is making the pair link. Keeping the helper locally until there is a pairing change to carry it. Branch kept.
NickStallman commented 2026-11-30 10:21:23 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T10:21:23Z.


@brcly we looked at why these pairs aren't linked, in our own logs, and in ours it isn't a skipped link step. Three runs (RTX 5090, f482572a plus PRs), 32 rejected pipelines logged in each, the same in all three (the log stops at 32):

Kind Count
VS only, prepared, no pixel shader 11
VS prepared, PS "original" 11
MS prepared, PS "original" 10
  • "Original" there means "has no translation": the stream still carries the console bytes. For all 21 pairs, the pixel program is one main's translator refuses (our survey on e5d2e913, joined by digest): pixel wave ops, a divergent wave reduction, a heap stride in a pixel shader, image_get_lod on a heap texture, a dynamic soffset. None of the 21 has a pixel program that translates. link_on_demand and link_mesh both require a translated pixel stage, so no link can fix them; each needs its refusal removed.
  • The "Input signature element … not compatible" lines (113 or so per run) aren't next to any rejected pipeline. We read them as pairs the link retry recovers; that's an inference, not a count per pipeline.
  • The VS-only kind is a real pairing gap in our logs: the block that translates a stream against its root only runs with both a vertex and a pixel stage, so a depth-only vertex shader keeps its root-less translation and the driver rejects it (Failed to remap SRV). We have a design for that one and want a capture of the roots first (a run tonight).

I can't say whether your 18 pairs are the same: whether the pixel digests in them have a refusal recorded would settle it.

<!-- greyfinch-sync:brcly/TuxBox:comment:7275477784 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/581#issuecomment-7275477784). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T10:21:23Z. --- @brcly we looked at why these pairs aren't linked, in our own logs, and in ours it isn't a skipped link step. Three runs (RTX 5090, f482572a plus PRs), 32 rejected pipelines logged in each, the same in all three (the log stops at 32): | Kind | Count | |---|---:| | VS only, prepared, no pixel shader | 11 | | VS prepared, PS "original" | 11 | | MS prepared, PS "original" | 10 | - **"Original" there means "has no translation":** the stream still carries the console bytes. For all 21 pairs, the pixel program is one main's translator refuses (our survey on e5d2e913, joined by digest): pixel wave ops, a divergent wave reduction, a heap stride in a pixel shader, `image_get_lod` on a heap texture, a dynamic `soffset`. None of the 21 has a pixel program that translates. `link_on_demand` and `link_mesh` both require a translated pixel stage, so no link can fix them; each needs its refusal removed. - **The "Input signature element … not compatible" lines** (113 or so per run) aren't next to any rejected pipeline. We read them as pairs the link retry recovers; that's an inference, not a count per pipeline. - **The VS-only kind is a real pairing gap** in our logs: the block that translates a stream against its root only runs with both a vertex and a pixel stage, so a depth-only vertex shader keeps its root-less translation and the driver rejects it (`Failed to remap SRV`). We have a design for that one and want a capture of the roots first (a run tonight). I can't say whether your 18 pairs are the same: whether the pixel digests in them have a refusal recorded would settle it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!581
No description provided.