Shaders: a vertex shader that declares a UAV says so in its flags and SFI0 (fixes #1987) #2016

Closed
github-bot wants to merge 2 commits from gh-pr/2016/head into gh-pr/2016/base
Owner

@⁠fiestorra on GitHub · 2026-11-25 03:07 UTC · original
fiestorra:fix/vertex-uav-flag → main · +66 −28 · 1 files · 2 commits · closed without merging

Fixed: the missing bit was "UAVs at every shader stage" (16) plus its feature bit (0x4), and the corpus is back to 24,785

The sentence I was missing last round was in the validator's own message, which translate was throwing away:

error: Flags must match usage. (note: Flags declared=1075314704, actual=1075380240)

actual - declared = 65536 = 1 << 16, on every one of the 868. Bit 16 of the shader flags is documented in DXIL.rst as "UAVs at every shader stage — set when a vertex, hull, domain, or geometry shader declares one or more UAVs". The write marking put a UAV into vertex programs that never had one, and the emitter never set the flag.

Declaring the flag alone is not enough: the validator then compares the container's SFI0 with the module's flags, and the next error is Container part 'Feature Info' does not match expected for module. DXC's DxilShaderFlags::GetFeatureInfo maps bit 16 to ShaderFeatureInfo_UAVsAtEveryStage = 0x0004, so that bit goes with it.

Three measured steps over the same local 1.0.2.1 archive (26,503 containers), validator SDK 10.0.26100 dxil.dll 1.9:

change Flags must match usage Feature Info validated
none (main 940d32f) 871 0 23,918
flag 16 only 0 867 23,918
flag 16 and feature 0x4 0 0 24,785

24,785 is the count the parent commit ccfb029 had, so the 868 VfxVBuffer vertex programs are back to validating and nothing else moved.

Two things came with it, because without them this would not have been findable:

  • translate --validate keeps the validator's note: line, appended to the error it already reported. The old line said "Flags must match usage" and nothing else; the note says which flag, which is the difference between four rounds of guessing and a one-line fix.
  • the flags-to-SFI0 mapping moved out of finish into feature_info, with a test that pins every bit against DXC's values (STENCIL_REF 0x200, TYPED_UAV_LOADS 0x800, UAVS_AT_EVERY_STAGE 0x4, ROVS 0x1000, WAVE_OPS 0x4000, INT64 0x8000, ATOMIC64_TYPED 0x400000, RESOURCE_HEAP 0x2000000, SAMPLER_HEAP 0x4000000, ATOMIC64_HEAP 0x10000000). That pair is what broke here, and a table is cheaper to check than a chain of ifs in a 900-line function.

Recipe: cargo test -p victory-shader --locked --lib 248 passed, 3 ignored; cargo test --workspace --locked 26 suites with the one failure main also has in a session without a desktop (lifecycle::tests::showing_a_title_window_shows_its_stand_in); clippy --workspace --all-targets with and without --all-features clean under -D warnings; rustfmt --check with the same two hunks main already has in shader.rs and no others (I reverted the two unrelated lines rustfmt wanted to reflow, so the diff carries no formatting churn).

What this does not do: it does not make the marking cheaper or change what it marks — the flag is a declaration of what the module already does. And it does not touch the 735 programs refused for "entry function performs some operation that is incompatible with the shader stage" or the 195 with "an address in an SGPR that is no root parameter"; those are separate families with their own causes.

No game data is involved: flag values, counts and error text.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 03:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016) `fiestorra:fix/vertex-uav-flag` → `main` · +66 −28 · 1 files · 2 commits · closed without merging **Fixed: the missing bit was "UAVs at every shader stage" (16) plus its feature bit (0x4), and the corpus is back to 24,785** The sentence I was missing last round was in the validator's own message, which `translate` was throwing away: ``` error: Flags must match usage. (note: Flags declared=1075314704, actual=1075380240) ``` `actual - declared = 65536 = 1 << 16`, on every one of the 868. Bit 16 of the shader flags is documented in `DXIL.rst` as **"UAVs at every shader stage — set when a vertex, hull, domain, or geometry shader declares one or more UAVs"**. The write marking put a UAV into vertex programs that never had one, and the emitter never set the flag. Declaring the flag alone is not enough: the validator then compares the container's `SFI0` with the module's flags, and the next error is `Container part 'Feature Info' does not match expected for module`. DXC's `DxilShaderFlags::GetFeatureInfo` maps bit 16 to `ShaderFeatureInfo_UAVsAtEveryStage = 0x0004`, so that bit goes with it. Three measured steps over the same local 1.0.2.1 archive (26,503 containers), validator SDK 10.0.26100 `dxil.dll` 1.9: | change | `Flags must match usage` | `Feature Info` | validated | |---|---|---|---| | none (`main` `940d32f`) | 871 | 0 | 23,918 | | flag 16 only | 0 | 867 | 23,918 | | flag 16 and feature `0x4` | **0** | **0** | **24,785** | 24,785 is the count the parent commit `ccfb029` had, so the 868 `VfxVBuffer` vertex programs are back to validating and nothing else moved. **Two things came with it**, because without them this would not have been findable: - `translate --validate` keeps the validator's `note:` line, appended to the error it already reported. The old line said "Flags must match usage" and nothing else; the note says *which* flag, which is the difference between four rounds of guessing and a one-line fix. - the flags-to-`SFI0` mapping moved out of `finish` into `feature_info`, with a test that pins every bit against DXC's values (`STENCIL_REF` 0x200, `TYPED_UAV_LOADS` 0x800, `UAVS_AT_EVERY_STAGE` 0x4, `ROVS` 0x1000, `WAVE_OPS` 0x4000, `INT64` 0x8000, `ATOMIC64_TYPED` 0x400000, `RESOURCE_HEAP` 0x2000000, `SAMPLER_HEAP` 0x4000000, `ATOMIC64_HEAP` 0x10000000). That pair is what broke here, and a table is cheaper to check than a chain of `if`s in a 900-line function. Recipe: `cargo test -p victory-shader --locked --lib` 248 passed, 3 ignored; `cargo test --workspace --locked` 26 suites with the one failure `main` also has in a session without a desktop (`lifecycle::tests::showing_a_title_window_shows_its_stand_in`); `clippy --workspace --all-targets` with and without `--all-features` clean under `-D warnings`; `rustfmt --check` with the same two hunks `main` already has in `shader.rs` and no others (I reverted the two unrelated lines rustfmt wanted to reflow, so the diff carries no formatting churn). What this does **not** do: it does not make the marking cheaper or change what it marks — the flag is a declaration of what the module already does. And it does not touch the 735 programs refused for "entry function performs some operation that is incompatible with the shader stage" or the 195 with "an address in an SGPR that is no root parameter"; those are separate families with their own causes. No game data is involved: flag values, counts and error text. Written with an AI assistant.
The write marking added on 2026-11-25 puts a UAV into programs that never had
one, and the validator recomputes the shader flags from what a module
declares: a vertex shader holding a UAV must carry ShaderFlags bit 16
("UAVs at every shader stage", DXIL.rst) or it is refused with "Flags must
match usage". Declaring the module flag is not enough on its own - the
feature part has to agree, or the next error is "Container part 'Feature
Info' does not match expected for module" - so the SFI0 bit 0x4
(ShaderFeatureInfo_UAVsAtEveryStage) goes with it.

The flags-to-feature mapping moves out of `finish` into `feature_info`, which
is what makes the pair testable, and a test pins every bit against DXC's
values.

Measured on the offline census over a local 1.0.2.1 shader archive (26,503
containers), validator = SDK 10.0.26100 dxil.dll 1.9:

  before  Flags must match usage        871, validated 23,918
  flags   Feature Info instead of it    867, validated 23,918
  both    neither                          0, validated 24,785

i.e. the 868 VfxVBuffer vertex programs that cd94d35 cost (#1987) validate
again, and the corpus is back to the parent commit's count.

`translate --validate` also keeps the validator's `note:` line now, because
"Flags must match usage" comes with "note: Flags declared=..., actual=..."
and that pair is what identifies the missing bit; without it the reason was
one line that said nothing about which flag.
The write marking added on 2026-11-25 puts a UAV into programs that never had
one, and the validator recomputes the shader flags from what a module
declares: a vertex shader holding a UAV must carry ShaderFlags bit 16
("UAVs at every shader stage", DXIL.rst) or it is refused with "Flags must
match usage". Declaring the module flag is not enough on its own - the
feature part has to agree, or the next error is "Container part 'Feature
Info' does not match expected for module" - so the SFI0 bit 0x4
(ShaderFeatureInfo_UAVsAtEveryStage) goes with it.

The flags-to-feature mapping moves out of `finish` into `feature_info`, which
is what makes the pair testable, and a test pins every bit against DXC's
values.

Measured on the offline census over a local 1.0.2.1 shader archive (26,503
containers), validator = SDK 10.0.26100 dxil.dll 1.9:

  before  Flags must match usage        871, validated 23,918
  flags   Feature Info instead of it    867, validated 23,918
  both    neither                          0, validated 24,785

i.e. the 868 VfxVBuffer vertex programs that cd94d35 cost (#1987) validate
again, and the corpus is back to the parent commit's count.

The reporting side of that fix (keeping the validator's `note:` line) is
#1767's, which is where it belongs: this change is only what the modules
declare.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:51:42 +00:00
github-bot closed this pull request 2026-11-26 04:51:42 +00:00
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-25 03:17 UTC · original

I reproduced the flags mismatch with a small synthetic vertex shader on native Linux, independently of the title corpus. I supplied an SV_Position output signature and ran the public emit_with path with a descriptor-table buffer_store_dword and write marking enabled. Linux dxv (DXC build 3f85295c) rejected the base output at 940d32f with:

Flags must match usage.
Flags declared=1073741840, actual=1073807376

At 3d6a54f the same input validated. Its SFI0 changed from 0x02000000 to 0x02000004.

I checked eight combinations in total: vertex/compute × with/without the buffer store × write marking on/off. The other seven containers were byte-for-byte identical between revisions and passed dxv on both. That includes the vertex shader with the same store and write marking off, and the compute shader with marking on. All eight passed on the PR. This checks translation and validator acceptance; there was no GPU dispatch or game input.

**@⁠Yoshi-233** on GitHub · 2026-11-25 03:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7151781166) I reproduced the flags mismatch with a small synthetic vertex shader on native Linux, independently of the title corpus. I supplied an `SV_Position` output signature and ran the public `emit_with` path with a descriptor-table `buffer_store_dword` and write marking enabled. Linux `dxv` (DXC build `3f85295c`) rejected the base output at `940d32f` with: ```text Flags must match usage. Flags declared=1073741840, actual=1073807376 ``` At `3d6a54f` the same input validated. Its `SFI0` changed from `0x02000000` to `0x02000004`. I checked eight combinations in total: vertex/compute × with/without the buffer store × write marking on/off. The other seven containers were byte-for-byte identical between revisions and passed `dxv` on both. That includes the vertex shader with the same store and write marking **off**, and the compute shader with marking **on**. All eight passed on the PR. This checks translation and validator acceptance; there was no GPU dispatch or game input.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 03:20 UTC · original

Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at 3d6a54f. victory-shader: 245 passed, 3 failed, 3 ignored; the new the_feature_bits_follow_the_shader_flags passes. The 3 are #1744's NVIDIA failures on main (the two stride_tests heap-buffer reads and gathers_at_a_level_match_the_hardware). Same as main on this hardware. Not run: a title.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 03:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7151827929) Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `3d6a54f`. `victory-shader`: 245 passed, 3 failed, 3 ignored; the new `the_feature_bits_follow_the_shader_flags` passes. The 3 are #1744's NVIDIA failures on `main` (the two `stride_tests` heap-buffer reads and `gathers_at_a_level_match_the_hardware`). Same as `main` on this hardware. Not run: a title. AI-assisted (Claude Code).
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 03:24 UTC · original

I compared this head (3d6a54f) with #1989 (0f11320) using the same Windows SDK 10.0.26100.0 x64 validator. Both fix the marked vertex case. Four synthetic cases distinguish them:

Stage and only UAV binding This PR #1989
Mesh, view-write marks (fixture from #1989) rejected validated
Vertex, dirty-page bitmap rejected validated
Geometry, view-write marks rejected validated
Geometry, dirty-page bitmap rejected validated

The three new cases are emitter tests. Starting from the copy-through vertex shader and rectangle geometry shader in emit/rect.rs, emit one atomicBinOp.i32 (OR, byte offset 0, value 1) through either view_writes_handle() or memory_dirty_handle(), then validate the finished container. All three report flags declared 0x10, actual 0x10010. The same stages without a UAV validate, as do the pixel controls with either binding.

Changing only the predicate in this branch to #1989's stage and binding conditions made all nine emitter cases and all six cases of the earlier stage fixture validate. The missing conditions are geometry/mesh stages and the memory_dirty binding. The CLI change that retains the validator's diagnostic note is separate and could be reviewed on its own.

These are validator results for synthetic shaders. They do not measure how often these cases occur in a title. AI-assisted.

**@⁠Dathinel** on GitHub · 2026-11-25 03:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7151883064) I compared this head (`3d6a54f`) with #1989 (`0f11320`) using the same Windows SDK 10.0.26100.0 x64 validator. Both fix the marked vertex case. Four synthetic cases distinguish them: | Stage and only UAV binding | This PR | #1989 | | --- | --- | --- | | Mesh, view-write marks (fixture from #1989) | rejected | validated | | Vertex, dirty-page bitmap | rejected | validated | | Geometry, view-write marks | rejected | validated | | Geometry, dirty-page bitmap | rejected | validated | The three new cases are emitter tests. Starting from the copy-through vertex shader and rectangle geometry shader in `emit/rect.rs`, emit one `atomicBinOp.i32` (OR, byte offset 0, value 1) through either `view_writes_handle()` or `memory_dirty_handle()`, then validate the finished container. All three report flags declared `0x10`, actual `0x10010`. The same stages without a UAV validate, as do the pixel controls with either binding. Changing only the predicate in this branch to #1989's stage and binding conditions made all nine emitter cases and all six cases of the earlier stage fixture validate. The missing conditions are geometry/mesh stages and the `memory_dirty` binding. The CLI change that retains the validator's diagnostic note is separate and could be reviewed on its own. These are validator results for synthetic shaders. They do not measure how often these cases occur in a title. AI-assisted.
Author
Owner

@⁠AgneyaK on GitHub · 2026-11-25 03:37 UTC · original

A full-corpus run, so reviewers can compare this with #1989, which fixes the same regression (#1987). Offline translate --validate over the title 1.0.2.1's shader pack, release build, Windows 11 26300, validator DXC 1.9.2602 (the serviced SDK 10.0.26100.0 copy here).

vertex + pixel validated compute mesh Flags must match usage
main 940d32f 13,350 of 14,217 1,961 of 2,696 8,694 of 8,765 867
this PR (3d6a54f) 14,217 of 14,217 1,961 of 2,696 8,694 of 8,765 0
#1989 (0f11320) 14,217 of 14,217 1,961 of 2,696 8,694 of 8,765 0

The same counts and the same remaining refusals (735 compute, 71 mesh) as #1989. On this corpus the two are interchangeable; the difference is in the code (stage predicate, mesh handling, tests).

AI use: Claude Code (Claude Opus 5.5) ran the builds and wrote this; counts only, no game data.

**@⁠AgneyaK** on GitHub · 2026-11-25 03:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7152084615) A full-corpus run, so reviewers can compare this with #1989, which fixes the same regression (#1987). Offline `translate --validate` over the title 1.0.2.1's shader pack, release build, Windows 11 26300, validator DXC 1.9.2602 (the serviced SDK `10.0.26100.0` copy here). | | vertex + pixel validated | compute | mesh | `Flags must match usage` | |---|---|---|---|---| | `main` `940d32f` | 13,350 of 14,217 | 1,961 of 2,696 | 8,694 of 8,765 | 867 | | this PR (`3d6a54f`) | **14,217 of 14,217** | 1,961 of 2,696 | 8,694 of 8,765 | **0** | | #1989 (`0f11320`) | 14,217 of 14,217 | 1,961 of 2,696 | 8,694 of 8,765 | 0 | The same counts and the same remaining refusals (735 compute, 71 mesh) as #1989. On this corpus the two are interchangeable; the difference is in the code (stage predicate, mesh handling, tests). AI use: Claude Code (Claude Opus 5.5) ran the builds and wrote this; counts only, no game data.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 03:37 UTC · original

Two things before this lands, because there are now two open PRs for the same bit (#1989 and this one):

1. Mesh shaders are still missed. Your condition keeps && self.mesh.is_none(), so a mesh program that declares the view-write UAV does not get the flag. Dathinel's fixture on 940d32f (Windows SDK 10.0.26100 validator, the same engine as the corpus run):

synthetic shader main this predicate #1989
Vertex, view marks enabled fails passes passes
Mesh, view marks enabled fails still fails (Flags declared=0x40000010, expected 0x40010010) passes

graphics && !self.pixel (drop mesh.is_none(); graphics is threads.is_none() || mesh.is_some()) makes all six of their cases pass. I hit the same trap in #1977 — that is why I closed it in favour of #1989.

2. The feature_info table is worth keeping. Mapping the flags to their SFI0 bits in one place instead of the chain of if arms is the better shape, and translate.rs printing the validator's declared/actual note is what let you find this at all. I would keep both even if the flag condition ends up identical to #1989's.

Corpus confirmation from this machine, for the body: 940d32f 23,918 validated / 868 Flags must match usage; the fix makes it 24,785 / 0 (+867, 0 lost), RX 7800 XT, Windows 10, SDK dxil.dll 1.7.

**@⁠Calvix2k** on GitHub · 2026-11-25 03:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7152095053) Two things before this lands, because there are now two open PRs for the same bit (#1989 and this one): **1. Mesh shaders are still missed.** Your condition keeps `&& self.mesh.is_none()`, so a mesh program that declares the view-write UAV does not get the flag. Dathinel's fixture on `940d32f` (Windows SDK 10.0.26100 validator, the same engine as the corpus run): | synthetic shader | main | this predicate | #1989 | |---|---|---|---| | Vertex, view marks enabled | fails | passes | passes | | **Mesh, view marks enabled** | fails | **still fails** (`Flags declared=0x40000010`, expected `0x40010010`) | passes | `graphics && !self.pixel` (drop `mesh.is_none()`; `graphics` is `threads.is_none() || mesh.is_some()`) makes all six of their cases pass. I hit the same trap in #1977 — that is why I closed it in favour of #1989. **2. The `feature_info` table is worth keeping.** Mapping the flags to their `SFI0` bits in one place instead of the chain of `if` arms is the better shape, and `translate.rs` printing the validator's `declared/actual` note is what let you find this at all. I would keep both even if the flag condition ends up identical to #1989's. Corpus confirmation from this machine, for the body: `940d32f` 23,918 validated / 868 `Flags must match usage`; the fix makes it 24,785 / 0 (+867, 0 lost), RX 7800 XT, Windows 10, SDK `dxil.dll` 1.7.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 05:03 UTC · original

Trimmed back to the fix itself: the note handling moved to #1767, and the queue is conflict-free

This pull request no longer touches apps/victory/src/translate.rs. The validator's note: line — which is what made #1987 solvable — is now kept by validator_reason in #1767, which is where the reason-building lives, and my comment there has the detail:

validator: error: Flags must match usage. (note: Flags declared=1074790416, actual=1074855952)

So what is left here is only what the modules declare: the shader flags for a vertex program that holds a UAV, the SFI0 feature bit that has to agree with it, and the feature_info table with its test. The measured effect is unchanged (871 → 0 on Flags must match usage, 23,918 → 24,785 validated, the parent commit's count).

The point of trimming it: keeping the note here as well made #1767 and this conflict in translate.rs in either merge order, for two lines of duplicated code. With it there and not here, I re-ran the merge of all seventeen of my open pull requests onto main 940d32f and every one merges cleanly, in any order I tried — which is the state I wanted the queue in.

Re-checked after the change: cargo test -p victory-shader --locked --lib 248 passed, 3 ignored; clippy --workspace --all-targets with and without --all-features clean under -D warnings; rustfmt --check on shader.rs shows the same 2 hunks main already has and no others.

No game data is involved: flag values, counts and file names.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 05:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7153415941) **Trimmed back to the fix itself: the note handling moved to #1767, and the queue is conflict-free** This pull request no longer touches `apps/victory/src/translate.rs`. The validator's `note:` line — which is what made #1987 solvable — is now kept by `validator_reason` in **#1767**, which is where the reason-building lives, and my comment there has the detail: ``` validator: error: Flags must match usage. (note: Flags declared=1074790416, actual=1074855952) ``` So what is left here is only what the modules declare: the shader flags for a vertex program that holds a UAV, the `SFI0` feature bit that has to agree with it, and the `feature_info` table with its test. The measured effect is unchanged (871 → 0 on `Flags must match usage`, 23,918 → 24,785 validated, the parent commit's count). The point of trimming it: keeping the note here as well made **#1767 and this conflict in `translate.rs`** in either merge order, for two lines of duplicated code. With it there and not here, I re-ran the merge of all seventeen of my open pull requests onto `main` `940d32f` and **every one merges cleanly, in any order I tried** — which is the state I wanted the queue in. Re-checked after the change: `cargo test -p victory-shader --locked --lib` **248 passed, 3 ignored**; `clippy --workspace --all-targets` with and without `--all-features` clean under `-D warnings`; `rustfmt --check` on `shader.rs` shows the same **2 hunks `main` already has** and no others. No game data is involved: flag values, counts and file names. Written with an AI assistant.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 05:15 UTC · original

The trimmed head still has && self.mesh.is_none() in the flag condition, so the mesh case from Dathinel's fixture still fails:

synthetic shader main this head #1989
Mesh, view marks enabled fails still fails (Flags declared=0x40000010, expected 0x40010010) passes

graphics is already threads.is_none() || mesh.is_some(), so dropping that one clause is the whole change: if graphics && !self.pixel && has_uavs. If there is a reason mesh programs should stay out — a validator limitation or a mesh pipeline that refuses the flag — please say so and I will stop bringing it up; otherwise it is the last correctness gap in this fix, and #2027 inherits it because its branch is stacked on this commit.

Not blocking the nicer feature_info table: that part is good and I hope it lands either here or in #1767.

**@⁠Calvix2k** on GitHub · 2026-11-25 05:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7153592335) The trimmed head still has `&& self.mesh.is_none()` in the flag condition, so the mesh case from Dathinel's fixture still fails: | synthetic shader | main | this head | #1989 | |---|---|---|---| | Mesh, view marks enabled | fails | **still fails** (`Flags declared=0x40000010`, expected `0x40010010`) | passes | `graphics` is already `threads.is_none() || mesh.is_some()`, so dropping that one clause is the whole change: `if graphics && !self.pixel && has_uavs`. If there is a reason mesh programs should stay out — a validator limitation or a mesh pipeline that refuses the flag — please say so and I will stop bringing it up; otherwise it is the last correctness gap in this fix, and #2027 inherits it because its branch is stacked on this commit. Not blocking the nicer `feature_info` table: that part is good and I hope it lands either here or in #1767.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:17 UTC · original

Automated triage for the maintainers.
Proposed close.

This duplicates open PR #1989, which fixes the same regression (#1987) more completely and merges cleanly. Both set UAVS_AT_EVERY_STAGE (bit 16) and the matching SFI0 bit 0x4 in crates/victory-shader/src/emit/shader.rs (Shader::finish). The difference is the condition. This head's condition excludes mesh and geometry stages (self.mesh.is_none() && self.gs.is_none()) and does not count the memory_dirty binding. #1989 uses graphics && !self.pixel && has_uavs, with memory_dirty included. Dathinel's and Calvix2k's validator runs on this PR show the mesh, geometry and dirty-bitmap cases still rejected here (Flags declared=0x40000010, expected 0x40010010) and passing with #1989. On the title corpus both give the same counts.

The feature_info table and its test are a reasonable cleanup. They could come back as a small follow-up on top of #1989 once it lands.

This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 09:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7158127827) <!-- victory-triage v1 head=ad50733a2c9c1d80a571fdda1a43e473b97fbbac verdict=proposed-close at=2026-11-25T09:17:53Z --> Automated triage for the maintainers. **Proposed close.** This duplicates open PR #1989, which fixes the same regression (#1987) more completely and merges cleanly. Both set `UAVS_AT_EVERY_STAGE` (bit 16) and the matching `SFI0` bit 0x4 in `crates/victory-shader/src/emit/shader.rs` (`Shader::finish`). The difference is the condition. This head's condition excludes mesh and geometry stages (`self.mesh.is_none() && self.gs.is_none()`) and does not count the `memory_dirty` binding. #1989 uses `graphics && !self.pixel && has_uavs`, with `memory_dirty` included. Dathinel's and Calvix2k's validator runs on this PR show the mesh, geometry and dirty-bitmap cases still rejected here (`Flags declared=0x40000010`, expected `0x40010010`) and passing with #1989. On the title corpus both give the same counts. The `feature_info` table and its test are a reasonable cleanup. They could come back as a small follow-up on top of #1989 once it lands. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 22:46 UTC · original

Closing: main already has this, test included

Main's a1a2077 ("Shaders: vertex, geometry and mesh programs with UAVs say so in their flags") sets flags::UAVS_EVERY_STAGE for exactly the programs this branch covered, and carries the same test name (uavs_outside_pixel_and_compute_programs_are_declared). Rebasing this branch on top of it leaves an empty diff, so there is nothing to review here.

What I keep from it: the measurement that made it worth doing (5,046 programs refused with "Flags must match usage", 26 more mesh and vertex programs that only use UAVs from the heap and must not be declared). If that count is still useful to whoever touches the marking next, it is in the branch's history.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 22:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2016#issuecomment-7176780302) **Closing: main already has this, test included** Main's `a1a2077` ("Shaders: vertex, geometry and mesh programs with UAVs say so in their flags") sets `flags::UAVS_EVERY_STAGE` for exactly the programs this branch covered, and carries the same test name (`uavs_outside_pixel_and_compute_programs_are_declared`). Rebasing this branch on top of it leaves an empty diff, so there is nothing to review here. What I keep from it: the measurement that made it worth doing (5,046 programs refused with "Flags must match usage", 26 more mesh and vertex programs that only use UAVs from the heap and must not be declared). If that count is still useful to whoever touches the marking next, it is in the branch's history. Written with an AI assistant.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2016
No description provided.