Shaders: 16-bit vertex inputs are refused #1511

Open
opened 2026-11-24 18:39:45 +00:00 by Bloh09 · 3 comments
Bloh09 commented 2026-11-24 18:39:45 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by Bloh09 on 2026-11-24T18:39:45Z.


Shaders: 16-bit vertex inputs are refused

load_input returns "a 16-bit input" for a signature element with half set (the fetch shader's attributes). Pixel interpolation already unpacks 16-bit inputs to 32-bit host values; the vertex path does not.

The host signature already declares these 32-bit (SigElement.half). The fetch result on the console is the 16-bit value in the low half of the VGPR (one per dword). Packed (two per dword) is a later slice: VsInput has no pack flags.

Synthetic test, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6588857121 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/1512). Originally posted by [Bloh09](https://github.com/Bloh09) on 2026-11-24T18:39:45Z. --- Shaders: 16-bit vertex inputs are refused `load_input` returns "a 16-bit input" for a signature element with `half` set (the fetch shader's attributes). Pixel interpolation already unpacks 16-bit inputs to 32-bit host values; the vertex path does not. The host signature already declares these 32-bit (`SigElement.half`). The fetch result on the console is the 16-bit value in the low half of the VGPR (one per dword). Packed (two per dword) is a later slice: `VsInput` has no pack flags. Synthetic test, no game files.
Bloh09 commented 2026-11-24 19:04:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Bloh09 on 2026-11-24T18:39:53Z.


Taking this, PR today.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140962909 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/1512#issuecomment-7140962909). Originally posted by [Bloh09](https://github.com/Bloh09) on 2026-11-24T18:39:53Z. --- Taking this, PR today.
Marvisak commented 2026-11-25 11:05:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:24:01Z.


Automated triage for the maintainers.

In scope. On main (940d32f), load_input in crates/victory-shader/src/emit/lower.rs refuses a signature element with half set ("a 16-bit input"); its shortcut: note says vertex inputs are not unpacked while pixel inputs are. The change is open as PR #1519 from the same author, so review goes there.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159641114 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/1512#issuecomment-7159641114). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T10:24:01Z. --- <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T18:39:53Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. In scope. On `main` (`940d32f`), `load_input` in `crates/victory-shader/src/emit/lower.rs` refuses a signature element with `half` set ("a 16-bit input"); its `shortcut:` note says vertex inputs are not unpacked while pixel inputs are. The change is open as PR #1519 from the same author, so review goes there. --- _Generated by [Claude Code](https://claude.ai/code)_
pes7 commented 2026-11-26 16:05:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-26T15:22:56Z.


Different 16-bit problem, same family — worth saying so that nobody waits on the wrong fix.

#2936 (b1ec6e0) widens the packed colour formats the host has no equivalent for: B5G6R5, B5G5R5A1, B4G4R4A4 → BGRA8 in pc_format, "the one function resources, views, twins and pipeline target formats all go through". The failure it fixed was a removal rather than a refusal: the device went away with DXGI_ERROR_INVALID_CALL on a typed UAV of B5G5R5A1 and on a B4G4R4A4 render target. With it, the title reaches gameplay (2 555 draws a frame).

That is a resource format widening. This issue — a 16-bit vertex input the translator refuses — is untouched by it: the vertex fetch path still has to unpack the 16-bit components into the attribute, and #1519 ("unpack 16-bit vertex inputs into the low half") and #1512's own scope are where that lives.

Related, also separate: #1946 (a null UAV for packed 16-bit formats D3D12 refuses) is the descriptor side of the packed-colour change and merges next to descriptor/host.rs rather than in it; #2636 decodes packed 16-bit UNORM diagnostic targets, which is how a widened target is read back for comparison.

So: packed colour formats are handled in #2936, packed vertex inputs here are still open.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7196187925 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/1512#issuecomment-7196187925). Originally posted by [pes7](https://github.com/pes7) on 2026-11-26T15:22:56Z. --- Different 16-bit problem, same family — worth saying so that nobody waits on the wrong fix. #2936 (`b1ec6e0`) widens the **packed colour** formats the host has no equivalent for: `B5G6R5`, `B5G5R5A1`, `B4G4R4A4` → `BGRA8` in `pc_format`, "the one function resources, views, twins and pipeline target formats all go through". The failure it fixed was a removal rather than a refusal: the device went away with `DXGI_ERROR_INVALID_CALL` on a typed UAV of `B5G5R5A1` and on a `B4G4R4A4` render target. With it, the title reaches gameplay (2 555 draws a frame). That is a *resource format* widening. This issue — a 16-bit **vertex input** the translator refuses — is untouched by it: the vertex fetch path still has to unpack the 16-bit components into the attribute, and #1519 ("unpack 16-bit vertex inputs into the low half") and #1512's own scope are where that lives. Related, also separate: #1946 (a null UAV for packed 16-bit formats D3D12 refuses) is the descriptor side of the packed-colour change and merges next to `descriptor/host.rs` rather than in it; #2636 decodes packed 16-bit UNORM diagnostic targets, which is how a widened target is read back for comparison. So: packed *colour* formats are handled in #2936, packed *vertex inputs* here are still open.
Sign in to join this conversation.
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
Marvisak/VIctory#1511
No description provided.