Repository navigation
Shaders: lower scalar bit-field extracts through Ibfe and Ubfe - #3637
Open
Ingenioeren wants to merge 1 commit into
Open
Ingenioeren wants to merge 1 commit into
Ingenioeren wants to merge 1 commit into
Conversation
|
Independent WARP verification for #3637 by Codex (gpt-6.2-sol).
|
Dukestar69
approved these changes
Nov 28, 2026
Dukestar69
left a comment
There was a problem hiding this comment.
LGTM — verified on Windows (RTX 5090 + WARP):
cargo test -p victory-shader --lib scalar_bitfield_extract_all_widths_and_offsetspassed on RTX 5090 and underVICTORY_WARP=1cargo test -p victory-shader --lib bfe(bfe_signed_and_unsigned_match_rdna2) passed on RTX 5090 and underVICTORY_WARP=1cargo clippy -p victory-shader --all-targets -- -D warningspassed with 0 warningscargo xtask policypassed (191 files ok)
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scalar
s_bfe_u32ands_bfe_i32currently emit a shift/mask sequence, with another sign-extension sequence for the signed form. Use DXILUbfe/Ibfefor widths below 32 and select a logical/arithmetic right shift for widths 32�127. The scalar instruction's seven-bit width, ignored control bits, zero-width result, and SCC stay the same. DXIL bit-field semantics.The synthetic count shader reads two runtime root constants and stores the result to a UAV. Counts include live emitted instructions and terminators:
63bcca4s_bfe_u32s_bfe_i32Validation:
cargo test --locked --offline -p victory-shader scalar_bitfield_extract -- --nocapture --test-threads=1: the instruction-count regression failed before the lowering change ([26, 33]versus[23, 23]) and passed after. The new semantic test passed before and after on RX 6750 XT and WARP: 32,768 inputs per form, every offset 0�31 and width 0�127, clean/dirty ignored bits, and both result and SCC, with zero model mismatches or adapter differences.cargo test --locked --offline -p victory-shader: baseline 300 passed / 2 failed / 3 ignored; branch 302 passed / the same 2 failed / 3 ignored. Both local validator failures areemit::rect::tests::rectangles_get_their_fourth_cornerandemit::tests::elements_sharing_a_row_keep_their_order(Pipeline State Validationmismatch).cargo test --locked --offline -p victory-shader --test resource_tracking: 3 passed, 1 ignored.cargo clippy --locked --offline -p victory-shader --all-targets -- -D warnings: passed.cargo run --locked --offline -p xtask -- policy --staged: all 3 staged files passed.cargo fmt --checkretains existing main formatting differences; comparison against main found no new formatting deviations in any changed file.git diff --checkpassed.The test-only instruction counter is identical to the one in #3632 and the earlier shader performance PRs. #2954 optimizes the vector BFE forms; this change touches the scalar caller and adds a separate helper, leaving the vector lowering unchanged. No game files, game launch, or game-performance measurement; these are DXIL instruction counts.
AI assistance: prepared with OpenAI Codex, reviewed by Ingenioeren.