Direct DXIL: convert integer PS inputs to float in v_interp_p2_* #2112
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2112
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2112"
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?
@Decodere on GitHub · 2026-11-25 04:52 UTC · original
Decodere:fix-1269-dxil-interp-ct→main· +185 −12 · 1 files · 1 commits · openWhat is in it
Matches the HLSL recompiler (
recomp/emit.rs) for integer pixel-shader inputs in the direct DXIL translator'sLw::interp_gfx()(crates/xcl/src/gpu/dxil/lower_gfx.rs):GfxCtx::ps_infromVec<(Sig, bool)>toVec<(Sig, u32)>to preserve each PS input's DXBCcomponent_type(matchingGfxCtx::targets).Lw::interp_gfx():v_interp_p2_f32andv_interp_p2_f16, convertsUINT(component_type == 1) viaCastOp::UIToFPandSINT(component_type == 2) viaCastOp::SIToFPtof32before bitcasting toi32(v_interp_p2_f32) or converting viaself.to_f16(v_interp_p2_f16). Previously,interp_gfxignored the input type and returned raw integer bits (asuint(i)instead ofasuint((float)i)forp2_f32, and bitcast integer bits as float beforeto_f16forp2_f16).bitcast(no int-to-float cast) forv_interp_mov_f32, preserving raw integer selector bits as in#249.gpu::dxil::lower_gfx::tests:ps_interp_p2_converts_int_inputs_and_mov_keeps_raw_bits: CPU test validating DXIL and checking disassembled IR acrossUINT(1),SINT(2), andF32(3) inputs forv_interp_p2_f32,v_interp_p2_f16(both lo and hiOP_SEL[3]), andv_interp_mov_f32.gpu_ps_interp_int_component_types_match_hlsl: GPU draw test (guarded bygraphics::tests::draw_ready()) verifying direct DXIL matches HLSL and exact expected pixel values ([5.0, -3.0, 1.0, -2.5]forp2_f32+mov_f32,[7.0, -4.0, 7.0, -4.0]forp2_f16lo + hi).Part of #1269
Tested
Environment: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32), Rust 1.100.0, DXC
1.9.2609.5(01b62ad4).cargo test -j 4 -p xcl --lib gpu::dxil::lower_gfx::tests::ps_interp_p2_converts_int_inputs_and_mov_keeps_raw_bits -- --nocapture): 0 passed, 1 failed (p2_f32 uintemitted rawbitcast i32 to floatwithoutuitofp i32).cargo test --release -p xcl --lib gpu::dxil::lower_gfx::tests -- --nocapture): 2 passed, 0 failed (dxil 1.9.2609.5validation + IR checks + GPU draw parity vs HLSL).XCL_ADAPTER="Microsoft Basic Render Driver"): 2 passed, 0 failed (ps_interp_p2_converts_int_inputs_and_mov_keeps_raw_bitsran and passed;gpu_ps_interp_int_component_types_match_hlslcleanly skipped viadraw_ready()withSKIPPED ...: no GPU).cargo build --release --workspaceandcargo test --release --workspace -- --test-threads=4 --nocapture): 1,156 passed, 0 failed, 46 ignored across 21 test binaries (1100inxcllib,56across the remaining 20 binaries), with 27SKIPPEDlines on this RTX 4060:no wave64(RTX 4060 is wave32-only)per-lane form: refused(wave32 f16 arithmetic, f16 packed, f32 conversions)no d3d12SDKLayers.dll/no D3D12 debug layercannot disable the driver cache(Windows Developer Mode not enabled)no heap windowsRegression run
Paired 60 s runs via
scripts/smoke.ps1on cleanorigin/main(6987e496) and clean PR head (36e1c899):Main (
6987e496c35653f9ccc9dbdc1f1d342734306811):PR (
36e1c89959d237dc7ea753a42d6c6edaebc1471b):Not tested
no wave64skips on RTX 4060), D3D12 debug layer tests (2 skips withoutd3d12SDKLayers.dll), driver cache disable toggle (1 skip without Windows Developer Mode), and heap-window OOM fallback (1 skip withoutXCL_HEAP_WINDOWS).title: 29640639, and direct DXIL graphics mode (XCL_DIRECT_DXIL=all) on a retail title shader usingv_interp_p2_*on integer ISG1 attributes.AI use
Google Antigravity (Gemini 4 Neon) wrote the
interp_gfxfix, regression tests, and this PR description. All pre-fix/post-fix CPU and GPU tests, WARP skip checks, full release workspace tests, paired 60 s smoke runs, andscripts/pr_check.py --localvalidation were run locally on this machine.@JJAutoCompare on GitHub · 2026-11-25 05:00 UTC · original
Tested
Both focused fixtures passed on STOR-WINLAB at
36e1c89959d237dc7ea753a42d6c6edaebc1471b. PR #2112 was open at that SHA before and after the run. The checkout was clean and detached both times. xcl-dev/xcl #2112p2_f32for UINT, SINT, and F32,p2_f16low and high halves for UINT and SINT plus the low half for F32, andmov_f32for UINT, SINT, and F32.p2_f32plus raw-bitmov_f32produced[5.0, -3.0, 1.0, -2.5].p2_f16with UINT in the low half and SINT in the high half produced[7.0, -4.0, 7.0, -4.0].0.Intel Arc A770 driver
32.0.101.9175, Ryzen 7 3800X, Windows 11 Enterprise Evaluation x64 build26200.9974, Rust and Cargo1.100.0(x86_64-pc-windows-msvc), DXC/DXIL1.9.2609.5. The unoptimized build used two jobs, with incremental compilation and debug info disabled.Not tested — Full workspace suite, retail-title smoke runs, other adapters, or native wave64 execution.
AI use — T3 Code / Codex (
gpt-6.2-sol) ran the checked-in fixtures and prepared this report.@DarkPanda69 on GitHub · 2026-11-25 05:24 UTC · original
Tested:
gpu_ps_interp_int_component_types_match_hlslpasses on an AMD D3D12 driver and on an RTX 3060 (adds to the Arc A770 run above).gpu::filter: 586 passed, 2 failed, 22 ignored. The 2 failures are the AMD fuzz seeds 722 and 1599 tracked in #2115, which fail the same way onmain.Head
36e1c89applied onmain6020a33,cargo test -p xcl --lib -- gpu:: --test-threads=4withXCL_ADAPTERset to each card.Not tested: native wave64 pixel shaders (the new test does not ask for them), retail runs.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 06:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JoaoPauluu on GitHub · 2026-11-25 06:12 UTC · original
A run with vkd3d-proton as the host D3D12. The DXIL goes through dxil-spirv and then the NVIDIA Vulkan driver, not the native-Windows path: this PR's 2 new tests pass, none skipped.
Tested
x86_64-pc-windows-gnu.36e1c89as it is (merge base withmain6987e49), no uncommitted changes. The lib test binary runs under Wine, one test per process.gpu_ps_interp_int_component_types_match_hlsl: okps_interp_p2_converts_int_inputs_and_mov_keeps_raw_bits: okNot tested
AI use
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.