63 open PRs call resource::track with three arguments and break cargo test once merged (since 6638098) #801

Open
opened 2026-11-26 04:13:59 +00:00 by github-bot · 7 comments
Owner

@⁠DeerSilver on GitHub · 2026-11-24 11:10 UTC · original

6638098 ("Shaders: per-lane descriptors chosen by control flow", merged with #566 on 2026-11-24 at 09:53) added a fourth parameter to victory_shader::resource::track:

pub fn track(p: &Program, layout: &[RootParam], stage: HwStage, lanes: Option<&Structured>)

main itself builds and passes (342 passed / 6 ignored at ffe310e). But 63 open PRs added new calls with the old three arguments. When this was filed, each of them broke cargo test --workspace once merged:

error[E0061]: this function takes 4 arguments but 3 arguments were supplied
   |     resource::track(&p, &native.layout, native.stage)
   |     argument #4 of type `Option<&structure::Structured>` is missing

The fix in each PR is to pass the fourth argument at the call the PR adds. main's own tests pass Some(&st) (the structured program); None keeps the old behaviour the test was written against. I checked None on 7 of these PRs (#200, #171, #166, #165, #142, #265, #160): with it, each PR's tests pass on an RTX 5060 and Clippy is clean.

The risky ones: GitHub shows these as mergeable, because there is no text conflict. CI was added at 08:55 and only runs when an author pushes again, so when this was filed none of them showed a red check.

Updated 2026-11-24, 17:56 UTC, with the check below run on each PR's current head.

Still adding a three-argument call (4):

  • #101 at 9fbd7e9
  • #694 at efd02d5 (two calls)
  • #705 at ee037b0
  • #391 at a3f219e, now a draft

Fixed since this was filed (11):

Each of the 11 merges cleanly onto ffe310e and passes cargo check --locked -p victory-shader --tests. I also re-ran the full tests on the RTX 5060 for #265, #655 and #683: they pass with no local change. #164 had the same problem and was fixed earlier, at e469b7c.

The CI run on the other mergeable PRs found more build breaks of the same kind, from other signature changes on main.

The other 48 already conflict with main. When their authors rebase, git won't flag the old call, so it needs fixing by hand at the same time:

#69, #91, #92, #109, #116, #138, #145, #156, #157, #162, #189, #192, #193, #223, #226, #231, #233, #269, #292, #294, #298, #305, #306, #309, #317, #320, #328, #329, #332, #342, #383, #385, #395, #404, #498, #499, #526, #542, #551, #576, #586, #645, #650, #660, #667, #704, #709, #710

How I found them: no build, just a diff check. For each open PR head, the lines it adds under crates/victory-shader/src (diffed against its merge base with main) were searched for a track( call that ends at the stage argument. One match (#667) splits the call over several lines, and I checked it by hand. A PR author can check their own branch the same way:

git diff origin/main...HEAD -- crates/victory-shader/src | grep -E '^\+.*\btrack\(' | grep -vE 'Some\(|None\)|lanes'

No game files involved. AI-assisted (Claude Code).

**@⁠DeerSilver** on GitHub · 2026-11-24 11:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/801) `6638098` ("Shaders: per-lane descriptors chosen by control flow", merged with #566 on 2026-11-24 at 09:53) added a fourth parameter to `victory_shader::resource::track`: ```rust pub fn track(p: &Program, layout: &[RootParam], stage: HwStage, lanes: Option<&Structured>) ``` `main` itself builds and passes (342 passed / 6 ignored at `ffe310e`). But **63 open PRs added new calls with the old three arguments**. When this was filed, each of them broke `cargo test --workspace` once merged: ``` error[E0061]: this function takes 4 arguments but 3 arguments were supplied | resource::track(&p, &native.layout, native.stage) | argument #4 of type `Option<&structure::Structured>` is missing ``` **The fix in each PR** is to pass the fourth argument at the call the PR adds. `main`'s own tests pass `Some(&st)` (the structured program); `None` keeps the old behaviour the test was written against. I checked `None` on 7 of these PRs (#200, #171, #166, #165, #142, #265, #160): with it, each PR's tests pass on an RTX 5060 and Clippy is clean. **The risky ones: GitHub shows these as mergeable**, because there is no text conflict. CI was added at 08:55 and only runs when an author pushes again, so when this was filed none of them showed a red check. *Updated 2026-11-24, 17:56 UTC, with the check below run on each PR's current head.* Still adding a three-argument call (4): - #101 at `9fbd7e9` - #694 at `efd02d5` (two calls) - #705 at `ee037b0` - #391 at `a3f219e`, now a draft Fixed since this was filed (11): - #142 at `26bdec9` - #160 at `5ce85c5` - #165 at `cee01b4` - #166 at `b81071c` - #171 at `9dc6a7e` - #177 at `b7300eb` - #200 at `93f052e` - #265 at `964e3ad` - #457 at `08b681c` - #655 at `1bd52dc` - #683 at `81fb96e` Each of the 11 merges cleanly onto `ffe310e` and passes `cargo check --locked -p victory-shader --tests`. I also re-ran the full tests on the RTX 5060 for #265, #655 and #683: they pass with no local change. #164 had the same problem and was fixed earlier, at `e469b7c`. The [CI run on the other mergeable PRs](https://git.gtahub.st/github/Marvisak--VIctory/issues/1184) found more build breaks of the same kind, from other signature changes on `main`. **The other 48 already conflict with `main`.** When their authors rebase, git won't flag the old call, so it needs fixing by hand at the same time: #69, #91, #92, #109, #116, #138, #145, #156, #157, #162, #189, #192, #193, #223, #226, #231, #233, #269, #292, #294, #298, #305, #306, #309, #317, #320, #328, #329, #332, #342, #383, #385, #395, #404, #498, #499, #526, #542, #551, #576, #586, #645, #650, #660, #667, #704, #709, #710 **How I found them:** no build, just a diff check. For each open PR head, the lines it adds under `crates/victory-shader/src` (diffed against its merge base with `main`) were searched for a `track(` call that ends at the stage argument. One match (#667) splits the call over several lines, and I checked it by hand. A PR author can check their own branch the same way: ```sh git diff origin/main...HEAD -- crates/victory-shader/src | grep -E '^\+.*\btrack\(' | grep -vE 'Some\(|None\)|lanes' ``` No game files involved. AI-assisted (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:59 +00:00
Author
Owner

@⁠muhammed-aksoy on GitHub · 2026-11-24 11:21 UTC · original

I hit the same E0061 error when integrating the tested heads of #683 (0b48633) and #705 (4efabc4) on main at ffe310e. Passing None as the fourth argument preserved the existing resource-tracking behavior of their synthetic tests:

let res = resource::track(&p, &native.layout, native.stage, None).unwrap();

The two call sites are in emit/mod.rs (#683) and emit/lower.rs (#705). Exact fixture patch

At combined head 17e9259, the Windows all-targets/all-features check passed and the serial workspace suite reported 363 passed, zero failed, and six ignored with the Windows SDK DXIL validator available. These are combined integration results, with no separate per-PR or title-level measurement.

**@⁠muhammed-aksoy** on GitHub · 2026-11-24 11:21 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7129982792) I hit the same E0061 error when integrating the tested heads of #683 (0b48633) and #705 (4efabc4) on main at ffe310e. Passing `None` as the fourth argument preserved the existing resource-tracking behavior of their synthetic tests: ```rust let res = resource::track(&p, &native.layout, native.stage, None).unwrap(); ``` The two call sites are in `emit/mod.rs` (#683) and `emit/lower.rs` (#705). [Exact fixture patch](https://github.com/muhammed-aksoy/VIctory/commit/0993ac22b089fc8b2c646acda9954668739646a8) At combined head `17e9259`, the Windows all-targets/all-features check passed and the serial workspace suite reported 363 passed, zero failed, and six ignored with the Windows SDK DXIL validator available. These are [combined integration results](https://github.com/muhammed-aksoy/VIctory/pull/1), with no separate per-PR or title-level measurement.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-24 11:33 UTC · original

An upstream compatibility option for #801 is to restore resource::track(p, layout, stage) as a wrapper for track_with_structure(p, layout, stage, None). Main's callers that already supply the fourth argument use the explicit track_with_structure name and keep passing exactly the same option.

I checked local merges of #142, #160, and #200 onto ffe310e. Each produced E0061 before the wrapper and passed cargo check --locked -p victory-shader --tests with the patch and the PR's three-argument call intact. The patch applies cleanly to local merge trees for all 15 PRs originally listed as clean here.

The current heads of #177 and #265 have already moved to four arguments. Such calls need the explicit name after this change. I checked #164 and #265 with that one-line migration and both passed the shader test build check.

On patched main, 102 shader library tests passed with the VALU and waterfall hardware groups filtered out. The CLI check and Clippy for the shader tests and CLI also passed with warnings denied.

AI-assisted. Tested on Windows with the repository's synthetic tests.

Compatibility patch on ffe310e
diff --git a/apps/victory/src/translate.rs b/apps/victory/src/translate.rs
index 4ea1f14..44100ba 100644
--- a/apps/victory/src/translate.rs
+++ b/apps/victory/src/translate.rs
@@ -337,7 +337,7 @@ fn translate(
                 // failure is listed after the resources' and I/O's.
                 let structured = structure::structure(&program);
                 let lanes = structured.as_ref().ok();
-                let res = match resource::track(&program, &p.layout, p.stage, lanes) {
+                let res = match resource::track_with_structure(&program, &p.layout, p.stage, lanes) {
                     Ok(r) => {
                         tally_resources(&p, &r, t);
                         Some(r)
diff --git a/crates/victory-shader/src/emit/lower.rs b/crates/victory-shader/src/emit/lower.rs
index c5fbd80..955238c 100644
--- a/crates/victory-shader/src/emit/lower.rs
+++ b/crates/victory-shader/src/emit/lower.rs
@@ -6972,7 +6972,7 @@ mod tests {
         };
         let p = ir::build(&native.code, false, 256).unwrap();
         let st = structure::structure(&p).unwrap();
-        let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+        let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
         let io = io::raise(&p, &native).unwrap();
         lower(&Parts {
             native: &native,
@@ -7022,7 +7022,7 @@ mod tests {
         };
         let p = ir::build(&native.code, wave64, 256).unwrap();
         let st = structure::structure(&p).unwrap();
-        let res = resource::track(&p, &native.layout, native.stage, Some(&st))?;
+        let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st))?;
         let io = io::raise(&p, &native).unwrap();
         lower(&Parts {
             native: &native,
@@ -7123,7 +7123,7 @@ mod tests {
             .any(|i| i.name() == "v_perm_b32"));
 
         let st = structure::structure(&p).unwrap();
-        let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+        let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
 
         let io = io::raise(&p, &native).unwrap();
 
diff --git a/crates/victory-shader/src/emit/mod.rs b/crates/victory-shader/src/emit/mod.rs
index 89652da..a5d145f 100644
--- a/crates/victory-shader/src/emit/mod.rs
+++ b/crates/victory-shader/src/emit/mod.rs
@@ -208,7 +208,7 @@ pub fn translate(container: &[u8]) -> Result<HostShader, ShaderError> {
     // Structurisation first: tracing per-lane descriptors needs it (its
     // failure is reported after the earlier stages').
     let st = structure::structure(&p);
-    let res = resource::track(&p, &native.layout, native.stage, st.as_ref().ok())?;
+    let res = resource::track_with_structure(&p, &native.layout, native.stage, st.as_ref().ok())?;
     let io = io::raise(&p, &native)?;
     let st = st?;
     emit(&c, &native, &p, &st, &io, &res)
@@ -469,7 +469,7 @@ mod tests {
         let c = Container::parse(&bytes).unwrap();
         let p = ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap();
         let st = structure::structure(&p).unwrap();
-        let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+        let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
         let io = io::raise(&p, &native).unwrap();
         let out = emit(&c, &native, &p, &st, &io, &res).unwrap();
         // dxil.dll, where there is one, checks the flags against the module.
@@ -511,7 +511,7 @@ mod tests {
         };
         let p = ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap();
         let st = structure::structure(&p).unwrap();
-        let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+        let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
         let io = io::raise(&p, &native).unwrap();
         let container = crate::dxbc::build(&[]);
         let c = Container::parse(&container).unwrap();
@@ -672,7 +672,7 @@ mod tests {
             let p = crate::ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap();
             let st = crate::structure::structure(&p).unwrap();
             let res =
-                crate::resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+                crate::resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
             let io = crate::io::raise(&p, &native).unwrap();
             let out = super::emit(&c, &native, &p, &st, &io, &res).unwrap();
             // dxil.dll, where there is one, checks PSV0 against the module.
@@ -741,7 +741,7 @@ mod tests {
         let c = super::Container::parse(&bytes).unwrap();
         let p = crate::ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap();
         let st = crate::structure::structure(&p).unwrap();
-        let res = crate::resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap();
+        let res = crate::resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap();
         let io = crate::io::raise(&p, &native).unwrap();
         // Translated or refused with a reason; it must not panic.
         let _ = super::emit(&c, &native, &p, &st, &io, &res);
diff --git a/crates/victory-shader/src/emit/valu_tests.rs b/crates/victory-shader/src/emit/valu_tests.rs
index b4ee77d..59f48ad 100644
--- a/crates/victory-shader/src/emit/valu_tests.rs
+++ b/crates/victory-shader/src/emit/valu_tests.rs
@@ -125,7 +125,7 @@ fn build_valu_cs(body: &[u32]) -> HostShader {
     let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build");
     let st = structure::structure(&p).expect("structure");
     let res =
-        resource::track(&p, &native.layout, native.stage, Some(&st)).expect("resource::track");
+        resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).expect("resource::track");
     let io = io::raise(&p, &native).expect("io::raise");
     let lowered = lower::lower(&lower::Parts {
         native: &native,
diff --git a/crates/victory-shader/src/emit/waterfall_tests.rs b/crates/victory-shader/src/emit/waterfall_tests.rs
index 104fc6d..3b7dae6 100644
--- a/crates/victory-shader/src/emit/waterfall_tests.rs
+++ b/crates/victory-shader/src/emit/waterfall_tests.rs
@@ -57,7 +57,7 @@ fn build(words: &[u32], buffers: bool) -> HostShader {
     };
     let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build");
     let st = structure::structure(&p).expect("structure");
-    let res = resource::track(&p, &native.layout, native.stage, Some(&st)).expect("track");
+    let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).expect("track");
     let io = io::raise(&p, &native).expect("io::raise");
     let lowered = lower::lower(&lower::Parts {
         native: &native,
diff --git a/crates/victory-shader/src/resource.rs b/crates/victory-shader/src/resource.rs
index 62ddd5d..8b86ec8 100644
--- a/crates/victory-shader/src/resource.rs
+++ b/crates/victory-shader/src/resource.rs
@@ -138,13 +138,22 @@ pub struct Waterfall {
     pub loads: Vec<Site>,
 }
 
+/// Traces descriptors and scalar addresses without structured lane information.
+pub fn track(
+    p: &Program,
+    layout: &[RootParam],
+    stage: HwStage,
+) -> Result<Resources, ShaderError> {
+    track_with_structure(p, layout, stage, None)
+}
+
 /// Traces every descriptor and scalar address of `p`, which runs as
 /// `stage`, to the root parameters in `layout`. Fails on the first one it
 /// cannot trace. `lanes`, `p` as one lane runs it, tells which paths the
 /// lanes that access a per-lane descriptor took and which writes they ran;
 /// without it, per-lane descriptors chosen by control flow are refused and
 /// per-lane writes are taken to run in every lane.
-pub fn track(
+pub fn track_with_structure(
     p: &Program,
     layout: &[RootParam],
     stage: HwStage,
@@ -1737,7 +1746,7 @@ pub(crate) mod tests {
     fn track_words(words: &[u32], layout: &[RootParam], stage: HwStage) -> Resources {
         let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect();
         let p = crate::ir::build(&code, false, 256).unwrap();
-        track(&p, layout, stage, lanes(&p).as_ref()).unwrap()
+        track_with_structure(&p, layout, stage, lanes(&p).as_ref()).unwrap()
     }
 
     /// `p` as one lane runs it, if it structures.
@@ -1990,7 +1999,9 @@ pub(crate) mod tests {
         .flat_map(|w: &u32| w.to_le_bytes())
         .collect();
         let p = crate::ir::build(&code, false, 256).unwrap();
-        let err = track(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()).unwrap_err();
+        let err =
+            track_with_structure(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref())
+                .unwrap_err();
         assert_eq!(
             err,
             ShaderError::Unsupported {
@@ -2007,7 +2018,9 @@ pub(crate) mod tests {
             .flat_map(|w: &u32| w.to_le_bytes())
             .collect();
         let p = crate::ir::build(&code, false, 256).unwrap();
-        let err = track(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()).unwrap_err();
+        let err =
+            track_with_structure(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref())
+                .unwrap_err();
         assert_eq!(
             err,
             ShaderError::Unsupported {
@@ -2547,7 +2560,7 @@ pub(crate) mod tests {
         let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect();
         let p = crate::ir::build(&code, wave64, 256).unwrap();
         let layout = [param(Table, 0, 1), param(Table, 1, 1)];
-        track(&p, &layout, HwStage::Cs, lanes(&p).as_ref())
+        track_with_structure(&p, &layout, HwStage::Cs, lanes(&p).as_ref())
     }
 
     #[test]
@@ -2928,7 +2941,7 @@ pub(crate) mod tests {
         let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect();
         let p = crate::ir::build(&code, false, 256).unwrap();
         let layout = [param(Table, 0, 1), param(Table, 1, 1)];
-        let err = track(&p, &layout, HwStage::Cs, None).unwrap_err();
+        let err = track(&p, &layout, HwStage::Cs).unwrap_err();
         assert!(
             matches!(
                 err,
**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-24 11:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7130253183) An upstream compatibility option for #801 is to restore `resource::track(p, layout, stage)` as a wrapper for `track_with_structure(p, layout, stage, None)`. Main's callers that already supply the fourth argument use the explicit `track_with_structure` name and keep passing exactly the same option. I checked local merges of #142, #160, and #200 onto `ffe310e`. Each produced `E0061` before the wrapper and passed `cargo check --locked -p victory-shader --tests` with the patch and the PR's three-argument call intact. The patch applies cleanly to local merge trees for all 15 PRs originally listed as clean here. The current heads of #177 and #265 have already moved to four arguments. Such calls need the explicit name after this change. I checked #164 and #265 with that one-line migration and both passed the shader test build check. On patched main, 102 shader library tests passed with the VALU and waterfall hardware groups filtered out. The CLI check and Clippy for the shader tests and CLI also passed with warnings denied. AI-assisted. Tested on Windows with the repository's synthetic tests. <details> <summary>Compatibility patch on ffe310e</summary> ```diff diff --git a/apps/victory/src/translate.rs b/apps/victory/src/translate.rs index 4ea1f14..44100ba 100644 --- a/apps/victory/src/translate.rs +++ b/apps/victory/src/translate.rs @@ -337,7 +337,7 @@ fn translate( // failure is listed after the resources' and I/O's. let structured = structure::structure(&program); let lanes = structured.as_ref().ok(); - let res = match resource::track(&program, &p.layout, p.stage, lanes) { + let res = match resource::track_with_structure(&program, &p.layout, p.stage, lanes) { Ok(r) => { tally_resources(&p, &r, t); Some(r) diff --git a/crates/victory-shader/src/emit/lower.rs b/crates/victory-shader/src/emit/lower.rs index c5fbd80..955238c 100644 --- a/crates/victory-shader/src/emit/lower.rs +++ b/crates/victory-shader/src/emit/lower.rs @@ -6972,7 +6972,7 @@ mod tests { }; let p = ir::build(&native.code, false, 256).unwrap(); let st = structure::structure(&p).unwrap(); - let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = io::raise(&p, &native).unwrap(); lower(&Parts { native: &native, @@ -7022,7 +7022,7 @@ mod tests { }; let p = ir::build(&native.code, wave64, 256).unwrap(); let st = structure::structure(&p).unwrap(); - let res = resource::track(&p, &native.layout, native.stage, Some(&st))?; + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st))?; let io = io::raise(&p, &native).unwrap(); lower(&Parts { native: &native, @@ -7123,7 +7123,7 @@ mod tests { .any(|i| i.name() == "v_perm_b32")); let st = structure::structure(&p).unwrap(); - let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = io::raise(&p, &native).unwrap(); diff --git a/crates/victory-shader/src/emit/mod.rs b/crates/victory-shader/src/emit/mod.rs index 89652da..a5d145f 100644 --- a/crates/victory-shader/src/emit/mod.rs +++ b/crates/victory-shader/src/emit/mod.rs @@ -208,7 +208,7 @@ pub fn translate(container: &[u8]) -> Result<HostShader, ShaderError> { // Structurisation first: tracing per-lane descriptors needs it (its // failure is reported after the earlier stages'). let st = structure::structure(&p); - let res = resource::track(&p, &native.layout, native.stage, st.as_ref().ok())?; + let res = resource::track_with_structure(&p, &native.layout, native.stage, st.as_ref().ok())?; let io = io::raise(&p, &native)?; let st = st?; emit(&c, &native, &p, &st, &io, &res) @@ -469,7 +469,7 @@ mod tests { let c = Container::parse(&bytes).unwrap(); let p = ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap(); let st = structure::structure(&p).unwrap(); - let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = io::raise(&p, &native).unwrap(); let out = emit(&c, &native, &p, &st, &io, &res).unwrap(); // dxil.dll, where there is one, checks the flags against the module. @@ -511,7 +511,7 @@ mod tests { }; let p = ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap(); let st = structure::structure(&p).unwrap(); - let res = resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = io::raise(&p, &native).unwrap(); let container = crate::dxbc::build(&[]); let c = Container::parse(&container).unwrap(); @@ -672,7 +672,7 @@ mod tests { let p = crate::ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap(); let st = crate::structure::structure(&p).unwrap(); let res = - crate::resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + crate::resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = crate::io::raise(&p, &native).unwrap(); let out = super::emit(&c, &native, &p, &st, &io, &res).unwrap(); // dxil.dll, where there is one, checks PSV0 against the module. @@ -741,7 +741,7 @@ mod tests { let c = super::Container::parse(&bytes).unwrap(); let p = crate::ir::build(&native.patched_code(), native.wave64, native.vgprs).unwrap(); let st = crate::structure::structure(&p).unwrap(); - let res = crate::resource::track(&p, &native.layout, native.stage, Some(&st)).unwrap(); + let res = crate::resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).unwrap(); let io = crate::io::raise(&p, &native).unwrap(); // Translated or refused with a reason; it must not panic. let _ = super::emit(&c, &native, &p, &st, &io, &res); diff --git a/crates/victory-shader/src/emit/valu_tests.rs b/crates/victory-shader/src/emit/valu_tests.rs index b4ee77d..59f48ad 100644 --- a/crates/victory-shader/src/emit/valu_tests.rs +++ b/crates/victory-shader/src/emit/valu_tests.rs @@ -125,7 +125,7 @@ fn build_valu_cs(body: &[u32]) -> HostShader { let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build"); let st = structure::structure(&p).expect("structure"); let res = - resource::track(&p, &native.layout, native.stage, Some(&st)).expect("resource::track"); + resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).expect("resource::track"); let io = io::raise(&p, &native).expect("io::raise"); let lowered = lower::lower(&lower::Parts { native: &native, diff --git a/crates/victory-shader/src/emit/waterfall_tests.rs b/crates/victory-shader/src/emit/waterfall_tests.rs index 104fc6d..3b7dae6 100644 --- a/crates/victory-shader/src/emit/waterfall_tests.rs +++ b/crates/victory-shader/src/emit/waterfall_tests.rs @@ -57,7 +57,7 @@ fn build(words: &[u32], buffers: bool) -> HostShader { }; let p = ir::build(&native.code, native.wave64, native.vgprs).expect("ir::build"); let st = structure::structure(&p).expect("structure"); - let res = resource::track(&p, &native.layout, native.stage, Some(&st)).expect("track"); + let res = resource::track_with_structure(&p, &native.layout, native.stage, Some(&st)).expect("track"); let io = io::raise(&p, &native).expect("io::raise"); let lowered = lower::lower(&lower::Parts { native: &native, diff --git a/crates/victory-shader/src/resource.rs b/crates/victory-shader/src/resource.rs index 62ddd5d..8b86ec8 100644 --- a/crates/victory-shader/src/resource.rs +++ b/crates/victory-shader/src/resource.rs @@ -138,13 +138,22 @@ pub struct Waterfall { pub loads: Vec<Site>, } +/// Traces descriptors and scalar addresses without structured lane information. +pub fn track( + p: &Program, + layout: &[RootParam], + stage: HwStage, +) -> Result<Resources, ShaderError> { + track_with_structure(p, layout, stage, None) +} + /// Traces every descriptor and scalar address of `p`, which runs as /// `stage`, to the root parameters in `layout`. Fails on the first one it /// cannot trace. `lanes`, `p` as one lane runs it, tells which paths the /// lanes that access a per-lane descriptor took and which writes they ran; /// without it, per-lane descriptors chosen by control flow are refused and /// per-lane writes are taken to run in every lane. -pub fn track( +pub fn track_with_structure( p: &Program, layout: &[RootParam], stage: HwStage, @@ -1737,7 +1746,7 @@ pub(crate) mod tests { fn track_words(words: &[u32], layout: &[RootParam], stage: HwStage) -> Resources { let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect(); let p = crate::ir::build(&code, false, 256).unwrap(); - track(&p, layout, stage, lanes(&p).as_ref()).unwrap() + track_with_structure(&p, layout, stage, lanes(&p).as_ref()).unwrap() } /// `p` as one lane runs it, if it structures. @@ -1990,7 +1999,9 @@ pub(crate) mod tests { .flat_map(|w: &u32| w.to_le_bytes()) .collect(); let p = crate::ir::build(&code, false, 256).unwrap(); - let err = track(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()).unwrap_err(); + let err = + track_with_structure(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()) + .unwrap_err(); assert_eq!( err, ShaderError::Unsupported { @@ -2007,7 +2018,9 @@ pub(crate) mod tests { .flat_map(|w: &u32| w.to_le_bytes()) .collect(); let p = crate::ir::build(&code, false, 256).unwrap(); - let err = track(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()).unwrap_err(); + let err = + track_with_structure(&p, &[param(Table, 9, 1)], HwStage::Ps, lanes(&p).as_ref()) + .unwrap_err(); assert_eq!( err, ShaderError::Unsupported { @@ -2547,7 +2560,7 @@ pub(crate) mod tests { let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect(); let p = crate::ir::build(&code, wave64, 256).unwrap(); let layout = [param(Table, 0, 1), param(Table, 1, 1)]; - track(&p, &layout, HwStage::Cs, lanes(&p).as_ref()) + track_with_structure(&p, &layout, HwStage::Cs, lanes(&p).as_ref()) } #[test] @@ -2928,7 +2941,7 @@ pub(crate) mod tests { let code: Vec<u8> = words.iter().flat_map(|w| w.to_le_bytes()).collect(); let p = crate::ir::build(&code, false, 256).unwrap(); let layout = [param(Table, 0, 1), param(Table, 1, 1)]; - let err = track(&p, &layout, HwStage::Cs, None).unwrap_err(); + let err = track(&p, &layout, HwStage::Cs).unwrap_err(); assert!( matches!( err, ``` </details>
Author
Owner

@⁠Halfect on GitHub · 2026-11-24 13:50 UTC · original

Both of mine from the 15 listed are fixed at their current heads, each passing None as the fourth resource::track argument (no per-lane descriptors in those tests, so this keeps their old behaviour):

  • #655 at 1bd52dc (rebased onto ffe310e): CPU-only library suite 98 passed / 0 failed / 1 ignored (skipping diff_tests, valu_tests, waterfall_tests, stub_pipeline_is_created); cargo check --locked -p victory-shader --tests, clippy with -D warnings, and cargo xtask policy (154 files) all clean.
  • #683 at 81fb96e (rebased onto ffe310e): same suite, 98 passed / 0 failed / 1 ignored; same checks clean. Confirmed independently by @⁠CaravelaLabs on Linux (97 passed / 0 failed / 1 ignored).

No GPU execution was used for these checks.

**@⁠Halfect** on GitHub · 2026-11-24 13:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7133421862) Both of mine from the 15 listed are fixed at their current heads, each passing `None` as the fourth `resource::track` argument (no per-lane descriptors in those tests, so this keeps their old behaviour): - #655 at `1bd52dc` (rebased onto `ffe310e`): CPU-only library suite 98 passed / 0 failed / 1 ignored (skipping `diff_tests`, `valu_tests`, `waterfall_tests`, `stub_pipeline_is_created`); `cargo check --locked -p victory-shader --tests`, clippy with `-D warnings`, and `cargo xtask policy` (154 files) all clean. - #683 at `81fb96e` (rebased onto `ffe310e`): same suite, 98 passed / 0 failed / 1 ignored; same checks clean. Confirmed independently by @⁠CaravelaLabs on Linux (97 passed / 0 failed / 1 ignored). No GPU execution was used for these checks.
Author
Owner

@⁠muhammed-aksoy on GitHub · 2026-11-24 14:33 UTC · original

Follow-up on the two PRs I tested. On main at ffe310e, #683 at 81fb96e now passes the fourth argument itself. Its Windows shader suite passed 121 tests with one ignored and no local fixture edits. #705 at 4efabc4 still needed the one-line fourth-argument change in emit/lower.rs. With that change, the same suite passed 121 tests with one ignored. These were independent merges onto the same base.

**@⁠muhammed-aksoy** on GitHub · 2026-11-24 14:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7134567577) Follow-up on the two PRs I tested. On `main` at `ffe310e`, #683 at `81fb96e` now passes the fourth argument itself. Its Windows shader suite passed 121 tests with one ignored and no local fixture edits. #705 at `4efabc4` still needed the one-line fourth-argument change in `emit/lower.rs`. With that change, the same suite passed 121 tests with one ignored. These were independent merges onto the same base.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 17:06 UTC · original

Verification of shader PRs against main at ffe310e, each merged alone. Windows 11, RX 6950 XT. Per PR: cargo clippy --workspace --all-targets --locked -- -D warnings with and without --all-features, then cargo test --workspace --locked. Main itself gives 342 passed in victory-shader.

Merge cleanly, clippy clean, tests pass: #1074, #1073, #1084, #1057, #1103, #1083, #1056, #1055, #1015, #953, #563, #1004

Do not build: #694 (the resource::track arity from this issue; E0061, 3 arguments for 4)

Conflict with main: #667 (emit/lower.rs), #645 (emit/lower.rs, emit/valu_tests.rs, resource.rs)

Merged together, in this order, onto main: #1057, #1074, #1073, #1084, #1103, #1056, #1015, #563. They merge with no conflict, and the result passes both clippy runs and cargo test --workspace. Added on top of that set, #1083, #953 and #1004 conflict in emit/lower.rs and #1055 in emit/valu_tests.rs, so those four need a rebase after the others land, or a different order.

The tests that matter here run on the GPU and WARP, and I did not run the title, so this says nothing about in-game effect.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7138702711) Verification of shader PRs against `main` at `ffe310e`, each merged alone. Windows 11, RX 6950 XT. Per PR: `cargo clippy --workspace --all-targets --locked -- -D warnings` with and without `--all-features`, then `cargo test --workspace --locked`. Main itself gives 342 passed in `victory-shader`. **Merge cleanly, clippy clean, tests pass:** #1074, #1073, #1084, #1057, #1103, #1083, #1056, #1055, #1015, #953, #563, #1004 **Do not build:** #694 (the `resource::track` arity from this issue; E0061, 3 arguments for 4) **Conflict with `main`:** #667 (`emit/lower.rs`), #645 (`emit/lower.rs`, `emit/valu_tests.rs`, `resource.rs`) **Merged together**, in this order, onto `main`: #1057, #1074, #1073, #1084, #1103, #1056, #1015, #563. They merge with no conflict, and the result passes both clippy runs and `cargo test --workspace`. Added on top of that set, #1083, #953 and #1004 conflict in `emit/lower.rs` and #1055 in `emit/valu_tests.rs`, so those four need a rebase after the others land, or a different order. The tests that matter here run on the GPU and WARP, and I did not run the title, so this says nothing about in-game effect. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-24 17:23 UTC · original

Follow-up: the ten PRs from the matrix above that merge cleanly together are bundled in #1319, with the two hand resolutions noted there. Clippy (both runs) and cargo test --workspace pass on the bundle. AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7139130302) Follow-up: the ten PRs from the matrix above that merge cleanly together are bundled in #1319, with the two hand resolutions noted there. Clippy (both runs) and `cargo test --workspace` pass on the bundle. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:53 UTC · original

Automated triage for the maintainers.

This is accurate for main: resource::track in crates/victory-shader/src/resource.rs takes four arguments (lanes: Option<&Structured>). Open PRs that add three-argument calls stop building once merged. That is not a defect in main itself. CI (.github/workflows/ci.yml, cargo clippy --workspace --all-targets) catches it on a PR's next push, and the list above shows many authors have already updated.

Kept open as a coordination list for PR authors. Pass None (keeps the old behaviour) or Some(&structured) at the new call. Whether to add a three-argument compatibility wrapper, as suggested in the comments, is left to the maintainers.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/801#issuecomment-7152340572) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T17:23:48Z at=2026-11-25T03:53:48Z --> Automated triage for the maintainers. This is accurate for `main`: `resource::track` in `crates/victory-shader/src/resource.rs` takes four arguments (`lanes: Option<&Structured>`). Open PRs that add three-argument calls stop building once merged. That is not a defect in `main` itself. CI (`.github/workflows/ci.yml`, `cargo clippy --workspace --all-targets`) catches it on a PR's next push, and the list above shows many authors have already updated. Kept open as a coordination list for PR authors. Pass `None` (keeps the old behaviour) or `Some(&structured)` at the new call. Whether to add a three-argument compatibility wrapper, as suggested in the comments, is left to the maintainers. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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#801
No description provided.