Repository navigation
CLI: report emitted shader wave sizes in translate - #1462
gurvancampion wants to merge 1 commit into
Conversation
Offline measurement on a retail dump, and the shader tests on AdaResult: no count change against Offline. I merged head 9bab357 onto No program changes its failure reason either. That is the expected result for a fix whose instructions sit behind the earlier failures on Tests: with the same merge, No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers. Merge candidate (re-checked after the rebase,
CI: passing ( Generated by Claude Code |
9bab357 to
a813576
Compare
a813576 to
3a82f74
Compare
3a82f74 to
6f80b10
Compare
fuzeofficlal
left a comment
There was a problem hiding this comment.
Tested locally merged onto origin/main (63bcca43) at PR head 6f80b103 (Windows 11 x64, NVIDIA RTX 5090 + Microsoft WARP, VICTORY_D3D12_DEBUG=1).
Blocking issue: workspace build failure after merging onto current main
Although git merge-tree has no textual conflict, crates/victory-gpu/src/pipeline/depth_bounds_test.rs:59 (added on main since this branch's base) constructs a victory_shader::emit::HostShader literal without the new wave_size field. Merging onto origin/main (63bcca43) fails both cargo clippy --locked --workspace --all-targets [--all-features] -- -D warnings and cargo test --locked -p victory-gpu --lib with:
error[E0063]: missing field `wave_size` in initializer of `victory_shader::emit::HostShader`
--> crates\victory-gpu\src\pipeline\depth_bounds_test.rs:59:15
Verified fix & rest of patch
Rebasing onto main and adding wave_size: None, to that HostShader initializer in crates/victory-gpu/src/pipeline/depth_bounds_test.rs:59 resolves the build cleanly. With that 1-line addition applied on the merged tree:
cargo xtask policy: 191 files ok (crates/victory-shader/src/emit/lower.rsis 520,636 B, under the 524,288 B limit).cargo clippy --locked --workspace --all-targets -- -D warnings(default and--all-features): 0 warnings.cargo test --locked -p victory-shader --lib emit::tests::host_shader_reports_the_emitted_wave_size: passed (verifiesHostShader::wave_sizematches PSV0 wave-size min/max bounds for unrestricted, wave32, and wave64).cargo test --locked -p victory --bin victory translate::counts_emitted_wave_sizes: passed (Tallyrecording, merge, summary, and labels).cargo test --locked -p victory-gpu --features diagnostics --lib -- shader_cache::tests:: pipeline::depth_bounds_test::: 6/6 passed on both RTX 5090 and WARP withVICTORY_D3D12_DEBUG=1(coveringshader_cacheencode/decode round-trippingNone,Some(32), andSome(64)plusdepth_bounds_test).
Please rebase onto current main and populate wave_size in crates/victory-gpu/src/pipeline/depth_bounds_test.rs:59. Synthetic tests only.
Dukestar69
left a comment
There was a problem hiding this comment.
Tested against origin/main (63bcca4). victory-shader tests (emit::tests:: 18/18) pass, but victory-gpu fails to compile tests after merging onto origin/main because a newly added test constructs HostShader without the new wave_size field:
error[E0063]: missing field `wave_size` in initializer of `victory_shader::emit::HostShader`
--> crates/victory-gpu/src/pipeline/depth_bounds_test.rs:59:15
Adding wave_size to that HostShader literal after rebasing onto main will fix the build.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
|
Does not build on current main (found in an RDNA1 batch run; not hardware-specific). Head
AI use: Claude Code (Claude Opus 5.5). |
|
Follow-up: the one-line fix works. Head --- a/crates/victory-gpu/src/pipeline/depth_bounds_test.rs
+++ b/crates/victory-gpu/src/pipeline/depth_bounds_test.rs
@@ fn host_shader
host: victory_shader::emit::HostShader {
stage: hw_stage,
+ wave_size: None,
dxil: bytes.to_vec(),
With it, on the RX 5700 XT (RDNA1, Windows 11 26200):
AI use: Claude Code (Claude Opus 5.5). |
|
@gurvancampion I reproduced the test-build error from @ColorMeBoom's report after merging Both depth-bounds tests passed on app-local WARP. The synthetic shader metadata test The branch is ready to take. Please retain the Git authors and ColorMeBoom's co-author trailer. If folding the fixture change into another commit, please also add: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com AI-assisted with Codex. Synthetic shader and CLI tests. |
Summary
victory translatenow reports how many emitted programs are unrestricted or require a fixed wave size.HostShader::wave_sizecarries the size already declared in DXIL through emission and cache reads. The CLI totals successful emissions across stages and includes each size with--list. The offline tally is available on systems such as the RTX 4090 in #1323, where wave64 compute pipelines are refused.Evidence
Both revisions exited 0 and emitted three synthetic compute programs with
cargo xwin run -p victory --locked --target x86_64-pc-windows-msvc -- translate "Z:<synthetic-directory>" --list --jobs 2. The added lines above are from that run with paths shortened.ffe310ecargo xwin test -p victory-shader --locked --target x86_64-pc-windows-msvc emit::tests::host_shader_reports_the_emitted_wave_size -- --exactNonefor wave32cargo xwin test -p victory --locked --target x86_64-pc-windows-msvc translate::counts_and_lists_emitted_wave_sizes -- --exactcargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningscargo xwin clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-msvc -- -D warningscargo xwin test -p victory -p victory-shader --locked --target x86_64-pc-windows-msvccargo xwin test --workspace --locked --target x86_64-pc-windows-msvc --no-fail-fastcargo xwin test --workspace --all-features --locked --target x86_64-pc-windows-msvc --no-fail-fastcargo test -p victory-shader --lockedcargo test -p victory-core -p victory-formats -p victory-game -p victory-pipeline -p victory-shader -p xtask --locked, then with--all-featurescargo test -p xtask --locked repository_passes_policycargo xtask policy --stagedrustfmt --check --edition 2024 --config skip_children=true <changed Rust files>git diff --check origin/main HEADThe control runs add the new assertions to base with shims that preserve its missing wave metadata and lack of recording. The unfiltered Wine runs used
NO_GPU=1. Their 20 failures require a D3D12 device, a window, a Winsock export, a working nested Cargo path, or guest Git. With those tests filtered, the default and all-features suites passed 322 and 326 tests on base and 324 and 328 on head. A filtered all-features head run stalled in the save subprocess test and passed on retry. The workspace suites also exercised the shader cache round-trip for unrestricted, wave32, and wave64 metadata.Not verified
Native Windows, hardware or WARP pipeline creation, DXIL validation with
dxil.dll, and retail-scale translation were outside the CPU-only run.Merge Danger
Door: Two-way
A revert restores the previous CLI output and public struct. Shader cache entries are rebuildable and keyed by the executable fingerprint.
Blast Radius: module
The change affects
victory translateoutput, callers that constructHostShader, and the internal shader-cache record.AI disclosure
OpenAI Codex (
gpt-6.2-sol) wrote the patch, tests, and PR draft and ran the checks documented above. Antigravity (Gemini 4 Neon) coordinated and reviewed the diff. The author reviewed the diff and description before opening the PR.