Shaders: stop scanning for integer-width usage once resolved #3792
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3792"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T21:03:09Z.
Resolve the interned
i64type before scanning live DXIL instructions. If the module has no such type, operand inspection is unnecessary. Once a livei64result or operand is found, continue scanning only for the other usage flags.Four generated branch-heavy modules emitted identical bitcode. Across 17 alternating Windows release pairs, analysis plus writing took 0.887x to 0.953x baseline, with the same allocation and reallocation counts. Nine generated full translations emitted identical DXIL and passed the signed Microsoft validator. In two five-pair CPU-pinned runs, the larger conversion fixtures were 0.893x to 0.944x baseline. Medians for the other fixtures varied from 0.902x to 1.024x across both runs.
The focused test exercises no interned
i64, a deadi64operand, and a livei64operand with a narrow result. The bitcode tests, both strict shader Clippy configurations and the asset policy passed.Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T21:06:10Z.
Windows CI passed on
945e5cb, including both Clippy configurations and the workspace tests. The focused regression covers no interned i64, an unused i64 operand, and an i64 operand whose live instruction returns i32. Nine generated full translations were byte-identical and passed the signed DXIL validator. Both paired CPU runs saw lower median times in the 128- and 512-conversion fixtures, while the other timings varied.The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T21:18:16Z.
#3791 and #3792 both change the DXIL usage scan. I resolved the overlap in
85e0bea, with3e0fbaaand945e5cbas its parents. The shared plan feeds flag collection and the writer, and the i64 regression now exercises that same entry point.On Windows with Rust 1.98.1, the combined branch passed all 14 bitcode unit tests, with one benchmark ignored. I ran nine generated full translations against main
63bcca4in five alternating release pairs pinned to one logical CPU. All 45 paired comparisons were byte-identical, and every container passed Microsoft DXIL validation, version 1.9.2609.5.Each of the nine fixtures used nine fewer allocations. For the 143,188-byte conversion fixture, reallocations went from 1,731 to 1,722. Median paired time ratios ranged from 0.950 to 1.037, with seven fixtures below 1.000. Default and all-features Clippy and the asset policy check passed.
Integration branch. Please retain the Git authors on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the work into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-28T23:08:59Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
945e5cb03c55e6ae588518f4a83e6cc597156d18, base/parent63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-shader --lib -- emit::bitcode::tests::uses_int64_from_a_live_operand_with_a_narrow_result --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 305 filtered, exit 0.git grep -Ffor the test name on the base returned no match (test is new on this PR);git diff --check HEAD^ HEADclean (1 file, +24/-3).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2.AI-assisted (Hy4 flash).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.