Direct DXIL: honour D16 packing in image_get_resinfo #1874
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!1874
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1874/head"
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?
@emirduran707 on GitHub · 2026-11-24 22:29 UTC · original
emirduran707:dxil-resinfo-d16→main· +43 −2 · 2 files · 1 commits · merged 2026-11-25 01:50 UTCBoth
get_resinfoarms incrates/xcl/src/gpu/dxil/lower_image.rs(MSAA and non-MSAA) passedfalseinstead ofd16toself.image_result, writing 32-bit components even whenD16=1. That dropped the packed upper 16-bit halves and clobbered the trailing VGPRs.recomp/emit.rshonoursd16forimage_get_resinfo, andimage_resultalready implements 16-bit packing.Both
get_resinfoarms now passd16toself.image_result.What is in it
crates/xcl/src/gpu/dxil/lower_image.rs: passd16instead offalsein bothget_resinfoarms (msand non-ms).crates/xcl/src/gpu/dxil/msaa_tests.rs: GPU testgpu_direct_image_get_resinfo_d16covering 2D (64x32) and 2D MSAA array (4x4x3)image_get_resinfowithD16=1and verifying the trailing VGPRs are preserved.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on4070ae1(rebased ontomain20cf130): 975 passed, 2 failed, 45 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) fail identically on unmodifiedmain20cf130on this GPU.gpu_direct_image_get_resinfo_d16before the change failed (2D D16 resinfo v0: 0x40,left: 64,right: 2097216); passes afterRegression run
main:
this PR:
Not tested
AI use
main20cf130(replacing a merge ofmain; the new test sits beside #1900's inmsaa_tests.rs) and reran the suite and smoke runs above.image_get_resinfo4070ae1d43@upipibi on GitHub · 2026-11-24 22:32 UTC · original
NVIDIA counterpart to the RX 9060 XT run: RTX 3070 8 GB, driver 616.56, Windows 11, debug,
fcd9414onmain689f2db.gpu_direct_image_get_resinfo_d16(2D and 2D MSAA array): passes, 2 of 2 runs.msaa/resinfo: 6 passed, 0 failed.AI-assisted (Claude Code). Synthetic tests only.
@frenziedcoder on GitHub · 2026-11-24 22:41 UTC · original
NVIDIA test report for
fcd9414: no new test failures (the 4 that fail also fail on689f2db), its own testgpu_direct_image_get_resinfo_d16passes, and a clean smoke pair on the retail title (1654 vs 1657 frames).Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact headfcd94144d630ad248827d29a86ffee042141a4ae, no local changes.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 972 passed, 4 failed, 45 ignored; the PR's own testgpu_direct_image_get_resinfo_d16passes. SKIPPED:gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 compares, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 rounding, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 three-source, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 transcendentals, wave64: no wave64),gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu(f64, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer carries, wave64: no wave64),gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).fuzz_validate_and_gpu_0,fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_2,fuzz_validate_and_gpu_3ingpu::dxil::fuzz_tests. They fail the same way on the base689f2dbhere (0x8007000EfromCreateComputePipelineStateon seeds 70, 545, 1019 and 1507, the NVIDIA refusal @PHeitor1 reported on #1679), so this PR adds no failure.test_title_draws_with_a_root_signature_under_the_debug_layerreports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.Regression run (
scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen;XCL_PSO_PRELOAD=0for both builds, because this machine's preload list holds the program of #1307)base (
689f2db, this PR's merge base withmain):this PR:
Not tested: this code in the title: it is on the opt-in direct-DXIL path (
XCL_DIRECT_DXIL), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.
@raylitebull on GitHub · 2026-11-25 01:08 UTC · original
Diff audit passed (
lower_image.rsd16_formatmask/high-half fix and test look clean),Build and test+PR descriptionare green on4070ae1, and AMD RDNA4 passed on this exact head.Remaining before merge: one independent NVIDIA confirmation on the current rebased head
4070ae1(the earlier NVIDIA runs were on pre-rebasefcd9414).@DavidM1911 on GitHub · 2026-11-25 01:45 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!