Skip to content

Shaders: translate for the host's wave sizes - #223

Open
r4tedx wants to merge 7 commits into
Marvisak:mainfrom
r4tedx:shader/host-wave-sizes
Open

r4tedx wants to merge 7 commits into
Marvisak:mainfrom
r4tedx:shader/host-wave-sizes

Conversation

@r4tedx

@r4tedx r4tedx commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Current head 714b818, integrated with main at ffe310e. The emitter and its tests pass the host wave target through upstream’s structured descriptor tracking. Local Windows verification: cargo test --workspace --locked (346 passed, 6 ignored) and all-target, all-feature Clippy with warnings denied. No title run for this update. AI-assisted (Codex).

Rebased onto main 8e79c80 on 2026-11-24 (twice that day; upstream merged about 55 PRs and added CI). New upstream tests call emit and build lower::Parts directly, so they now pass Target::ANY. Nothing else changed. Head 1dfb859, was e0865d2 before the rebases. CI's two clippy commands (-D warnings, with and without --all-features) are clean at this head. CI's first run here failed in one test of this PR, what_translates_for_the_host_creates_a_pipeline: the runner's default device is Windows' software renderer, whose waves are 4 lanes, so not even the wave32 program translates for it, and the test only expected that of the wave64 one. The test now accepts a host without waves of the program's size; reproduced and checked here with VICTORY_WARP=1.

What

A compute shader that depends on the lane layout declares the console's wave size. On a host whose D3D12 wave range does not contain it (NVIDIA reports 32..32), a console wave64 program of that kind was refused at pipeline creation. Its dispatches were then dropped, and the log said only "host pipeline refused".

  • emit::Target { lanes_min, lanes_max } (D3D12 options 1, WaveLaneCountMin / Max) goes into translation: emit::translate_for(container, target), and emit::emit takes it too (translate keeps its old meaning as Target::ANY). A shader whose declared wave size the host does not run stops at translation, with the reason (console wave64 lanes on a host without 64-lane waves, or the one-wave-LDS case).
  • victory-gpu: Host::target() reads the range once, logs it, and warns when there are no 64-lane waves. The shader cache keys entries by the build and the range, so a translation for one host's waves is never served to another.
  • victory translate --host-lanes 32-32 (or 32-64, or a single size) counts these shaders without a GPU. --pipelines translates for the local device's range.
  • The shader::host::Host used by tests and tools gets target().

This changes nothing for hosts that run 64-lane waves.

#208 also reads options 1, into HostCaps (supports_wave64, wave_lane_count_max) for logging. It does not feed translation or the cache key. Whichever merges second, Host::target() can become a thin wrapper over those caps. #189, #192 and #54 change what the translator emits on such hosts. This PR only adds the plumbing they can key their choice on (and the cache key they need to stay correct when one machine has GPUs of both kinds), plus an explicit refusal where nothing handles the program yet.

#235 (the non-Windows build) adds a stub Host for hosts other than Windows that has no target method, and translate.rs calls it here. The two merge without a textual conflict and then the app crate does not build on macOS or Linux (found by a reviewer on #439). Whichever lands second adds target() returning Target::ANY to that stub; I will do it on my side if #235 goes in first.

Not verified

I did not count how many of the title's programs the refusal hits; --host-lanes 32-32 is there to do that. A tester has since counted it on their own copy: 321 compute programs declare WaveSize(64) on main and are refused by a 32-lane driver.

#54 has since gained a commit (4083d25) that also queries the device's wave range and puts it in the shader cache key, through its own WaveRange type. The two overlap there; I have not merged them together, and whichever lands second has to adopt the other's type.

Tested

Windows 11, an NVIDIA RTX 5070 (32..32), synthetic only:

  • New emit::tests: a hand-assembled wave64 compute program with v_readlane translates for Target::ANY and for 32..64, and stops with the reason for 32..32. The same code as wave32 translates for both. A program reading no other lanes translates for any range.
  • On the device, what translates for its range creates a pipeline; the wave64 one translated for ANY is refused by it (what this replaces).
  • shader_cache: keys differ between 32..32 and 32..64 and between builds.
  • cargo test --workspace: 268 passed, 0 failed, 4 ignored. cargo clippy --workspace --all-targets: nothing new. cargo xtask policy: ok.

AI-assisted; no game assets were used.

🤖 Generated with Claude Code

@ghost

ghost commented Nov 24, 2026

Copy link
Copy Markdown

AMD run on a host that offers both wave sizes (RDNA4, 32–64): head e0865d2 (already on main d2a4bae) passes. AMD Radeon RX 9060 XT, driver 32.0.32029.2010, Windows 11 Pro 26200, Rust 1.98.1, debug.

  • cargo test --workspace: 268 passed, 0 failed, 4 ignored.
  • cargo test -p victory-shader wave: 5 passed, including console_lanes_translate_only_for_hosts_with_that_wave_size and programs_reading_no_other_lanes_translate_for_any_wave_size.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.

edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
…) in older tests, a u64 storage size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
…64 stack

For testers: the wave64 stack (Marvisak#223, Marvisak#233, Marvisak#320, Marvisak#439) with Marvisak#180, whose
sampleGrad form makes compute programs that sample with implicit
derivatives pass dxil.dll validation.

One conflict, in emit/lower.rs, where a compute program is found to
need the console's lanes: Marvisak#180's quad gradients read within four lanes,
so they go with DPP and ds_swizzle among the reads that stay inside a
32-lane half, and such a program runs on a 32-lane host in two halves.

Checked on an RTX 5070 and a Radeon iGPU: cargo test --workspace passes,
and a hand-assembled compute image_sample validates and samples the
right value in groups of 64x1x1, 8x8x1, 32x1x1, 128x1x1 and 4x4x2.
r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
…73d66, and Marvisak#180)

The wave64 stack (Marvisak#223, Marvisak#233, Marvisak#320, Marvisak#439, with Peter Bonanni's
whole-wave sections across the halves, 9b73d66) merged with Marvisak#180 (twin
descriptor loads and quad gradients for compute samples), at 24b3bcc.
That commit has one parent (e49302a); Marvisak#180's changes come in without
its commits. Marvisak#233 is in this tree as 1eb9995, the same tree as
3098672, so each file was merged with 3098672 as the base instead of
the e0865d2 git chooses.

Conflict resolutions:
- emit/wave.rs, v_permlane16/x16 in whole-wave sections: Marvisak#98's "every
  lane active" and 9b73d66's "or fi set" are both kept, for both
  instructions.
- emit/lower.rs, Lower::new: Marvisak#320's test for lane reads and writes in
  divergent programs counts live instructions only, as Marvisak#233's does
  with Marvisak#309 (dead SGPR-spill lane instructions are no lane reads).
  Marvisak#307's waterfall arm of v_readfirstlane still comes before the
  console-flow arm; Marvisak#320 adds no arm of its own.
- Compute samples with implicit derivatives (Marvisak#160, Marvisak#180, Marvisak#306): Marvisak#180
  decides plain and biased samples, all of Marvisak#160's forms of them
  (implicit_derivatives from sample_form: _o, _cl, cube, a16), with
  Marvisak#160's bias address (bias_at) and level clamp; Marvisak#306's validator 1.8
  is now declared only for what still uses the host's derivatives in
  compute (comparison samples, op 64). The Marvisak#306 test of image_sample
  now asserts no 1.8 (48-byte PSV0) and still validates and creates
  the pipeline; a twin test with image_sample_c asserts 1.8.
- sgpr_spill test (Marvisak#309): without forwarding, the per-lane form still
  stops with "a lane mask holding lanes elsewhere read as data", but
  emit now takes the console flow (Marvisak#320); the test checks both, and
  that forwarded spills do not ask for the console flow.
- Mechanical: per_lane_only in two hand-built Parts in emit/lower.rs
  tests; emit/mod.rs module order (split_tests before threading).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ghost ghost mentioned this pull request Nov 24, 2026
r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
… lane count past 32 KiB)

AnoHunted's Marvisak#459: a mesh shader whose declared vertex and primitive
maxima take more than D3D12's 32 KiB of outputs declares the lane count
instead, where that is lower.

No textual conflict. Mechanical, crates/victory-shader/src/emit/mod.rs:
git placed Marvisak#459's three test items at the end of the file, inside
`atomic_tests` (Marvisak#48's module, which is last in this tree); they are
moved to the end of `tests`, where Marvisak#459 has them, and its `emit` call
passes `Target::ANY` (Marvisak#223's argument).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
…rol flow; waterfall loops proven)

Marvisak#566 is stacked on Marvisak#307, which this tree holds as its first two commits
(the tree's resource.rs was identical to ffa6635's). The merge so also
brings Marvisak#307's last two commits, 077ec8b and 6285e19. Git found upstream
main as the base, which sets Marvisak#307's own lines against themselves; each
file was merged with ffa6635 as the base instead.

- crates/victory-shader/src/resource.rs: Marvisak#566's, unchanged (the tree had
  no edits of its own there).
- crates/victory-shader/src/emit/lower.rs: no conflict on that base. The
  tree's lowering is kept (Marvisak#307's waterfall arm of v_readfirstlane before
  the console-flow form, fetched_index through Marvisak#483's heap guard), with
  Marvisak#566's Source::LanePhi arms and tests. lane_heap_index joins the
  indices heap_index and fetched_index return, so each is already
  guarded. Marvisak#226's annotation test passes the per-lane form to track.
- crates/victory-shader/src/structure.rs: both sides' additions kept:
  MAX_MEMO (Marvisak#288) with MAX_MEET, and in Structured the wave64 stack's
  execs, others and pairs with Marvisak#566's reach and paired_masks.
  paired_masks is filled last, since it takes the masks pairs reads.
- crates/victory-shader/src/emit/mod.rs: translate keeps Marvisak#309's spill
  forwarding and Marvisak#223's target, structures first and passes the per-lane
  form to track as Marvisak#566 does. The threading retry of emit passes its
  own. The tests' helpers (Marvisak#223's, Marvisak#306's, Marvisak#459's, Marvisak#48's) pass it too.
- apps/victory/src/translate.rs: Marvisak#566's arm (Source::LanePhi is no
  leaf); the tree's fix already counted Fetched as loaded, as 077ec8b
  does.
- docs/architecture.md: no conflict on that base; Marvisak#566's text.
- emit/image_tests.rs (Marvisak#160), emit/lane_read_loop_tests.rs (Marvisak#439),
  sgpr_spill.rs (Marvisak#309, Marvisak#320): track takes the per-lane form. Helpers
  that return the error keep the order of failures (resources, I/O,
  then structure).
- emit/waterfall_tests.rs (new, Marvisak#566): lower::Parts gets the tree's
  target, console_cf and per_lane_only; the dispatch fills Marvisak#483's guard
  dwords.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@r4tedx
r4tedx force-pushed the shader/host-wave-sizes branch from e0865d2 to b2adc37 Compare November 24, 2026 08:33
@r4tedx

r4tedx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main 2e4e280, force-pushed with lease: head is b2adc37, was e0865d2.

Upstream merged 32 PRs. This PR still merged without a textual conflict, but two new upstream tests in emit/mod.rs call emit directly, and this PR adds the wave-range argument to it, so the merged tree did not build its tests. Those two calls now pass Target::ANY; nothing else changed. cargo check --workspace --all-targets passes at this commit, and the three PRs stacked on it (#233, #320, #439) are rebased onto it.

The title was not used in these tests. AI-assisted (Claude Code).

r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
…entrics)

By AntoninMichelq. Conflicts and what was kept:

- emit/lower.rs (the interpolation's packing): Marvisak#176's `half_inputs`
  lookup, with the PR's `total` closure after it.
- io.rs: Marvisak#179's `Halves` made on demand
  (`halves.get_or_insert_with(|| Halves::new(p))`), with the PR's
  `push_pair`; both sides' tests.
- emit/mod.rs (the PR's test helper `pixel`): Marvisak#566's per-lane argument
  of `resource::track` and Marvisak#223's `Target` argument of `emit`; the
  helper still fails on resources, then I/O, then structure.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@r4tedx
r4tedx force-pushed the shader/host-wave-sizes branch from b2adc37 to 1b012df Compare November 24, 2026 09:14
A compute shader that reads other lanes declares the console's wave
size. NVIDIA runs waves of 32 lanes only (D3D12 reports 32..32), so a
console wave64 program of that kind was refused at pipeline creation
and its dispatches were dropped without saying why.

The host's wave range (D3D12 options 1) now goes into translation as
`emit::Target`. A shader that needs a wave size the host does not run
stops there with the reason, the shader cache keys entries by the range,
and the run logs the range once with a warning when 64-lane waves are
missing. `victory translate --host-lanes 32-32` counts these shaders
without a GPU.

This is the first step towards running these programs as two 32-lane
waves on such hosts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r4tedx
r4tedx force-pushed the shader/host-wave-sizes branch from 1b012df to 1dfb859 Compare November 24, 2026 09:25
KainanP added a commit to KainanP/VIctory that referenced this pull request Nov 24, 2026
…, Marvisak#320, Marvisak#439) onto Marvisak#160 + Marvisak#309 + Marvisak#180 + Marvisak#704 + Marvisak#1511

PR Marvisak#439 head 28aca3b (46 commits over main: Marvisak#223 wave-range targets, Marvisak#233
split halves and the console flow, Marvisak#320 lane reads where lanes branch,
Marvisak#439 LDS in one console wave, whole-wave sections across the halves,
ds_bpermute, numeric selects), merged onto the Marvisak#160 merge (b821b31), as the wave64 line of integ/next-v3.

emit/wave.rs: no conflict on this Marvisak#1511 head. The previous head carried
Marvisak#98 (f468457, v_permlane16 modelled next to v_permlanex16, only with every
lane active), which conflicted with Marvisak#439's a31c82e (an inactive lane also
accepted when fi, opsel bit 0, is set). Marvisak#98 is no longer in the bundle, so
the whole-wave simulation is Marvisak#439's: v_permlanex16 only, under
`exec == all || v.opsel & 1 != 0`.

structure.rs (1 hunk): the bundle only reformatted `paired_masks`; Marvisak#439
moved it after the new `execs`/`others`/`pairs` fields because `pairs`
borrows `self.masks` before `paired_masks` moves it. Kept Marvisak#439's order with
the bundle's formatting.

emit/waterfall_tests.rs (3 hunks):
1-2. The bundle split `build` into `build_with(words, buffers, nonuniform)`
   (a program with no per-lane handle, whose first-lane read is a wave
   operation); Marvisak#439 split the same function into `native`, `lower_as`
   (per-lane or console flow) and `host_shader`. Kept Marvisak#439's helpers and
   the bundle's `build_with` on top of them (lower_as(.., false), the
   bundle's two asserts, host_shader). host_shader keeps the stride_table
   field (Marvisak#704), which git merged outside the hunk.
3. Tests at the end of the file: the bundle's side ends inside the `for`
   loop of a_descriptor_only_read_as_data_gives_its_views_size, Marvisak#439's
   inside the `for target` loop of its last test. The bundle's test is
   closed before Marvisak#439's tests, so none is nested in another.

emit/lower.rs (6 hunks):
1, 3. Lower fields and their initializers: the bundle's `mask_scc` (Marvisak#309,
   SCC of a mask operation read as data) and Marvisak#439's `opaque_open` (stops
   the recursion of a mask copied dword by dword). Both kept.
2. Which compute programs need the console's lanes. The bundle (Marvisak#309) counts
   only live instructions (`sgpr_spill::dead`: lane moves forwarding left
   unread are not lowered); Marvisak#439 split the test into in-half reads, whole
   reads and masks held as numbers and added the split/console-flow choice.
   Kept Marvisak#439's structure, reading `live()` for reads_whole and in_half, and
   for lane_access_outside_sections (the console-flow trigger for lane reads
   where lanes branch differently). 1ca87f7 (in Marvisak#439) notes that the tester
   tree's `live()` filter belongs here once Marvisak#309 is in.
4-5. Selects on masks the structure does not follow. The bundle (48a41fb,
   from Marvisak#585) added `mask_cond` for v_cndmask_b32 and the v_*_co_ci_u32
   carry-ins: inline 0/-1 constants, the tracked boolean, else with console
   lanes this lane's bit of the register's number (pair in wave64). Marvisak#439
   (e461457, 1ca87f7, ccd9c44) takes, for v_cndmask only, the structure's
   boolean for masks held as numbers (`Structured::others`, which also finds
   the high word written by another instruction), only where the host lane
   is the console lane (not split in halves without the console flow), and
   declares console lanes for them only on a second lowering after the
   first stops on such a select (`lower`). Combined in `mask_cond`: tracked
   boolean, then Marvisak#439's `others` boolean, then the bundle's register number,
   both under Marvisak#439's condition (console lanes and not split without the
   console flow; the bundle's number path called lane_bit, which is wrong in
   a split program, where Marvisak#439 asserts it is never called). Both instructions
   use it; v_cndmask now also takes the bundle's inline constants.
   Without a textual conflict git had also kept the bundle's unconditional
   rule (any untracked select or carry-in declares console lanes) inside
   Marvisak#439's masks_held, which undid 1ca87f7 (a select nothing reads made a
   wave64 program in a group of more than 64 threads untranslatable on a
   32-lane host). The rule now counts live instructions and applies only on
   Marvisak#439's second lowering, which now also follows an untracked carry-in
   ("a carry-in from an untracked mask", UNTRACKED_CARRY). It covers every
   untracked selector, not only Marvisak#439's held masks with an opaque or constant
   atom, since the bundle's number path needs console lanes for selectors
   outside `others` too; on the first lowering nothing changes.
6. lower.rs test helper: Marvisak#439's three new Parts fields with the bundle's
   formatting.

Not textual, did not compile (test code only): Marvisak#439 gives `emit` a Target
and `lower::Parts` target/console_cf/per_lane_only. Tests that came with
the bundle, Marvisak#704, Marvisak#309 and Marvisak#160 used the old forms: image_tests.rs `lower`,
emit/mod.rs (3 emit calls, the stride-table Parts), lower.rs (2 Parts in
the int64 atomics tests), root_view_tests.rs, sgpr_spill.rs tests and
victory-gpu raw_view_tests.rs. They pass Target::ANY, console_cf false and
per_lane_only false, as Marvisak#439 did for the upstream tests.

Not textual, test-only (split_tests.rs): with Marvisak#309 a v_readlane whose
result nothing reads is dead (not lowered and, above, not counted).
saveexec_scc_tests_new_exec_not_saved_exec and
loops_leave_on_the_new_exec_of_saveexec used `v_readlane_b32 s14, v0, 10`
with s14 unread only to take the console flow. After the merge the loop
test failed on the RTX (per-lane form, lane t counted t + 1 iterations
where the console counts 64; it passes on Marvisak#439 alone), and the saveexec
test passed without taking the console flow (its per-lane result is also
42). Both now read s14 once (`s_mov_b32 s15, s14`, the branch over the
body +4), and a first lowering of each was checked to ask for the console
flow again on a 32..32 target.

Marvisak#180 interaction: r4tedx's integration (24b3bcc, from Marvisak#180 5ff639e) put
`implicit_derivatives` among the in-half reads that make a program need
console lanes. The Marvisak#180 merged here is aa69258, whose last commit takes
quad gradients out of the console-lanes test altogether ("a quad's four
lanes share a host wave of any size"), so there is no such term to place.
The quad reads stay inside one host wave in both Marvisak#439 forms (each half is a
host wave in the split and in the console flow, and in the console flow
samples run in every lane and are kept by a select on EXEC).

Checked on the previous Marvisak#1511 head (289f241, with Marvisak#98; this replay was
checked with cargo check --workspace --all-targets --all-features and the
full suite at the end of the line), on an RTX 4060 Laptop (32..32): cargo test --workspace --locked:
468 passed, 0 failed, 6 ignored (base 427 + 41). The 41 tests Marvisak#439 adds all
pass; the GPU ones ran on the RTX in two 32-lane halves ("split true").
VICTORY_WARP=1: 467 passed, 1 failed, 6 ignored; the failure is
valu_tests::v_cndmask_on_an_untracked_mask_tests_this_lanes_bit, which
fails on the base too (a fixed-WaveSize pipeline on WARP). victory-shader
lib tests listed: 204 -> 244 (Marvisak#439 adds 40 there and 1 in victory-gpu).
cargo clippy --workspace --all-targets -D warnings and cargo xtask policy
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KainanP added a commit to KainanP/VIctory that referenced this pull request Nov 24, 2026
…visak#320, Marvisak#439) with the GPU line

Both lines start from the Marvisak#160 merge (b821b31). One conflict, in
crates/victory-gpu/src/shader_cache.rs tests: the GPU line (Marvisak#1439) adds
`a_cache_that_cannot_keep_an_entry_still_gives_the_translation`, the wave64 line (Marvisak#439)
adds `keys_tell_hosts_wave_sizes_apart`, at the same place. Both kept as separate
tests (the shared text holds the closing brace and the `#[test]` attribute).

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Merge candidate (as before the rebase). Reviewed head fbfd3c6, which merges main 63bcca4 and adds two test-call fixes (draw.rs view-mark test uses ..Options::default(), pipeline/placed_uav_tests.rs passes emit::Target::ANY).

What I checked: emit::Target and Options::target in crates/victory-shader/src/emit/mod.rs; the refusal at the start of Lower::run (emit/lower.rs) reads wave_size, which Lower::new already sets, so it fires before any lowering; Host::target (victory-gpu/src/host.rs) reads D3D12 options 1 once and falls back to ANY; shader_cache::host_key keys entries by build and wave range, and the warm-up uses the same host_target() as a run. Hosts with 64-lane waves see no change. The testers' NVIDIA runs show driver refusals replaced by named translation refusals, which is the stated intent; it does not by itself make more programs run.

CI: passing.


Generated by Claude Code

Conflicts were where main's write marks (`emit::Options`, `emit_with`,
`translate_with`, `Parts::view_marks`) and its warm-up (`translate
--cache`, `host_shader` returning whether the entry was cached) met the
branch's `Target`:

- emit: `Options` gains `target` (default `Target::ANY`), so main's
  `emit_with` and `translate_with` keep their signatures; `emit(..,
  target)` and `translate_for(c, target)` stay as they were and fill it
  in. `Parts` has both `target` and `view_marks`. Main's retry with
  `structure::killing` is kept as it is.
- shader cache: `host_shader(container, target)` translates with main's
  write marks for `target` and keeps main's (result, cached) pair; the
  branch's key function is renamed `host_key`, since main now has a
  `key` for the build.
- `translate --cache` (new on main) asks `shader_cache::host_target()`,
  which is what a run's `pipeline::translate` uses, so warm entries are
  keyed as the run looks them up; `--cache` refuses `--host-lanes`.
- `translate` (the census) passes its target with main's `view_marks:
  true`; `--pipelines` documents both the host's wave sizes and main's
  pipeline library.
- victory-gpu `Host` keeps both `target` and main's `heap_atomics64`.
- The `Parts` and `emit` call sites main added (the `fuses_fmad` probe
  in `emit/host.rs` and tests in bvh, memory, semantics, stride,
  synthetic, valu and `emit::tests`) pass `Target::ANY`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@r4tedx

r4tedx commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Updated for the needs-rebase triage: main (940d32f) is merged in, head 02b955f (a merge commit, not a rebase: testers quote this stack's hashes). It merges cleanly into main.

Conflict resolutions worth reading:

  • main's new emit::Options { view_marks } / emit_with / translate_with: the host's wave range is now a field of Options (target, default Target::ANY), so main's signatures stay and emit(.., target) fills it in.
  • The shader cache keeps main's (result, cached) pair and write marks; this PR's key is host_key.
  • translate --cache's warm path now keys entries by the run's own host range (shader_cache::host_target(), the same function the runtime uses), so warm entries are not keyed ANY and then missed on a 32-lane host. Thanks to @slatefield for pointing that path out on Shaders: wave64 compute on 32-lane hosts, in halves and in the console flow (rebase of #233) #1929. --cache and --host-lanes now conflict instead of one being ignored.
  • Every new emit / Parts call site of main's passes Target::ANY.

Both CI clippy commands are clean. Tests ran on the software renderer only at this level (the machine's GPUs are on a hold today), plus the CPU-only crates.

AI-assisted (Claude Code).

Co-Authored-By: GPT-6.2 Sol (Codex) <noreply@openai.com>
@r4tedx

r4tedx commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 0d20521: the tracing::warn! literal in Host::target (crates/victory-gpu/src/host.rs) had the next line's indentation inside it; it now reads as one sentence. No other change; clippy (default and all features) is clean on this head. The shared CheckFeatureSupport query is left as it is. AI-assisted.

The one conflict was in apps/victory/src/main.rs, where main's
`--jobs` became a `NonZeroUsize` and the branch added `--host-lanes`:
`translate::run` takes both, `jobs.map(NonZeroUsize::get)` as main
passes it and the branch's `host_lanes` after it.

The `emit` and `lower::Parts` call sites main added in tests (census,
crosslane, memory, synthetic, `emit::tests`, `resource` and lower.rs's
own) pass `Target::ANY`, as the earlier merge did for the ones before
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r4tedx

r4tedx commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main (63bcca4) in, with no rebase or force-push. Head now 91aa056, and it merges cleanly with main. The PRs above (#233,#320,#439) are merged from this head in turn. Details, conflict notes and the per-level checks are on #439 (policy ok, clippy clean, the WARP shader suite has only main's own 4 failures).

Synthetic tests only; no title data used.

AI-assisted

Main's view-mark test builds emit::Options by hand; this branch adds a
target field to Options, so the test now fills the rest from Default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r4tedx

r4tedx commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Correction to my last comment: CI's clippy failed on the previous head. Main's view-mark draw test (crates/victory-gpu/src/draw.rs) builds emit::Options { view_marks: true } by hand, and this stack adds a target field to Options. My local clippy run left out the test targets, so I missed it. New head 0f6dec04 has the fix: the test fills the remaining fields with ..Options::default(). Nothing else changed.

Verified on #223 0f6dec04 and #439 8a320556: cargo clippy --workspace --all-targets --locked -- -D warnings is clean, and cargo xtask policy passes. No title data was used.

AI-assisted

Main's placed-UAV diagnostics test calls emit::emit with the six arguments
it had before this branch added the target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@r4tedx

r4tedx commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Second follow-up: CI's diagnostics clippy (--all-features) found one more call from main that this stack's Target argument breaks. In crates/victory-gpu/src/pipeline/placed_uav_tests.rs:77, emit::emit was called with six arguments. New head fbfd3c67 has the fix: the call passes emit::Target::ANY, the same default the other callers use.

Verified on #223 fbfd3c67 and #439 13be4c2c: both CI clippy commands are clean, cargo clippy --workspace --all-targets --locked -- -D warnings and the same command with --all-features. I didn't run the CI cargo test --workspace step on this PC, so CI will be the first to run it on this head. No title data was used.

AI-assisted

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants