Repository navigation
Direct DXIL: sign-extend i1 to i64 through i32 - #1974
Draft
luckyteagirl wants to merge 1 commit into
Draft
luckyteagirl wants to merge 1 commit into
luckyteagirl wants to merge 1 commit into
Conversation
luckyteagirl
force-pushed
the
codex/dxil-i1-sext
branch
from
November 25, 2026 02:45
f131a53 to
848ac65
Compare
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.
On the Radeon RX 6800M with Windows driver
30.0.13002.13003, a directsext i1toi64produces0x00000000fffffffffor a true bit. The expected value is0xffffffffffffffff. This changes that cast to two sign extensions throughi32. The direct-DXIL source hash from #1947 keys the translated cache, so the rebased change needs no manual translator-version bump. The problem was exposed by direct-DXIL fuzz seed 540 after the separate i64 min/max fix in #1946.What is in it
module.rs: route onlySExtfromi1toi64throughi32; leave other casts unchanged.ops_tests.rs: check both 32-bit words of the result and an arithmetic shift for 32 lanes on the GPU.Tested
848ac65b9a2061c01f4fc7574ab3a156fce5abc6on maincbc296ab65a2661a61e3e2da109134bcd5319f60. Windows 11 build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M driver30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5.XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1,XCL_DIRECT_DXIL=1:cargo test --locked -p xcl --lib -j 2 gpu::dxil::ops_tests::i1_to_i64_sign_extension_and_shift_match_cpu -- --exact --test-threads=1 --nocapturepassed, 1 passed, 0 failed, 0 ignored, no explicit skip.cargo build --locked --workspace -j 2,cargo build --locked --release -p xcl -j 2, andgit diff --check origin/main...HEADpassed.cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-outputcompleted with 993 passed, 162 failed, 46 ignored across the completed binaries. All 162 named failures weregpu::tests after the RX 6800M device was suspended (0x887A0005). Nine explicitSKIPPEDmessages included no GPU/device, unavailable D3D12 debug layer, no reserved cube with mips, and no heap windows. I did not run an equivalent full-suite baseline on this new main commit, so these failures are reported without attributing them to this PR.scripts/smoke.ps1runs on the RX 6800M. Each revision showed one frame, with no crash or device removal. Peak process commit was 6,911 MB on main and 6,984 MB on the PR.Regression run
main:
PR head:
Not tested
AI use
OpenAI Codex (GPT-6, exact variant not exposed in this session) isolated and implemented the fix, rebased it, ran the tests and smoke comparisons, reviewed the logs, and drafted this description.