DXIL: lower v_bfe_u32 and v_bfe_i32 to Ubfe and Ibfe #2161

Open
O5-7 wants to merge 1 commit from upstream-pr/2171 into main
O5-7 commented 2026-11-25 07:03:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by O5-7 on 2026-11-25T07:03:57Z.


Lower RDNA2 v_bfe_u32 and v_bfe_i32 in the direct DXIL translator directly to dx.op.tertiary (Tertiary::Ubfe, op 52, and Tertiary::Ibfe, op 51) instead of emitting an 10–11 op shift/mask/select expansion.

s_bfe_u32 and s_bfe_i32 (Lw::sbfe_u / Lw::sbfe_i) are left unchanged because scalar BFE masks width to 7 bits (0x7F) where width >= 32 extracts all remaining bits, whereas DXIL Ubfe/Ibfe masks width and offset to 5 bits (0..=31).

Part of #1269

What is in it

  • crates/xcl/src/gpu/dxil/lower.rs: replace Lw::bfe_u and Lw::bfe_i bodies with self.s.tertiary(Tertiary::Ubfe, w, o, v) and self.s.tertiary(Tertiary::Ibfe, w, o, v) (+2/-21 lines).
  • crates/xcl/src/gpu/dxil/core_tests.rs: add bfe_lowers_to_dxil_intrinsics checking DXIL validation and disassembly for dx.op.tertiary.i32 opcodes 52 (Ubfe) and 51 (Ibfe).
  • crates/xcl/src/gpu/recomp/tests.rs: add gpu_v_bfe_edge_cases testing 24 edge cases (w = 0, w = 1, w = 31, unmasked w = 32 / w = 0x104 / o = 32 / o = 0x104, o + w == 32, o + w > 32, sign-extension boundaries) against an exact CPU reference.
  • Synthetic compute shader measurement (1 and 64 (V_BFE_U32, V_BFE_I32) pairs, wave32): n = 1 changes 2332 → 2352 bytes (first dx.op.tertiary.i32 declaration); n = 64 drops 5940 → 5548 bytes (-392 bytes).

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 5080 (driver 32.0.15.9579, wave32), AMD Ryzen 7 9700X, Windows 11 Pro 10.0.26100, rustc 1.100.0, DXC 1.8.2502.11 (XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64), debug & release builds.
  • cargo test --workspace -- --test-threads=4: 1156 passed, 0 failed, 46 ignored (24 SKIPPED hardware-capability / policy checks: native wave64 unavailable on RTX 5080 and rejected direct-path f16 arithmetic), including bfe_lowers_to_dxil_intrinsics and gpu_v_bfe_edge_cases.
  • XCL_DIRECT_DXIL=1 targeted GPU parity runs on RTX 5080 (gpu_v_bfe_edge_cases, gpu_signed_bfe_arithmetic_shift, gpu_valu_float_and_int): all 3 passed; confirms NVIDIA's D3D12 compiler masks DXIL Ubfe/Ibfe width and offset to 5 bits cleanly even for unmasked 32 and 0x104.

Regression run
main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 13673 MB

PR:

xcl-smoke v1
commit: 628df6d4c56982ea424ada07b198452a6c10c3b4
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1684 (PresentX 1684)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13664 MB

Not tested

  • Native wave64 GPU execution (skipped automatically on wave32-only RTX 5080 hardware).
  • Running the title with XCL_DIRECT_DXIL=1 in the smoke.ps1 launch (because on unmerged main without PR #2101, D:\Windows Kits\... in XCL_DXC_DIR is intercepted by the {game} D-drive VFS mount inside the host process; XCL_DIRECT_DXIL=1 was verified in unit/GPU tests).

AI use

  • Antigravity (Gemini 4 Neon): lowered Lw::bfe_u and Lw::bfe_i to Tertiary::Ubfe/Tertiary::Ibfe, wrote the disassembly and GPU edge-case tests, and ran the test suite and scripts/smoke.ps1 regression checks.
<!-- greyfinch-sync:ivall/xcl:issue:5486788635 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171). Originally posted by [O5-7](https://github.com/O5-7) on 2026-11-25T07:03:57Z. --- Lower RDNA2 `v_bfe_u32` and `v_bfe_i32` in the direct DXIL translator directly to `dx.op.tertiary` (`Tertiary::Ubfe`, op 52, and `Tertiary::Ibfe`, op 51) instead of emitting an 10–11 op shift/mask/select expansion. `s_bfe_u32` and `s_bfe_i32` (`Lw::sbfe_u` / `Lw::sbfe_i`) are left unchanged because scalar BFE masks `width` to 7 bits (`0x7F`) where `width >= 32` extracts all remaining bits, whereas DXIL `Ubfe`/`Ibfe` masks `width` and `offset` to 5 bits (`0..=31`). Part of #1269 **What is in it** - `crates/xcl/src/gpu/dxil/lower.rs`: replace `Lw::bfe_u` and `Lw::bfe_i` bodies with `self.s.tertiary(Tertiary::Ubfe, w, o, v)` and `self.s.tertiary(Tertiary::Ibfe, w, o, v)` (+2/-21 lines). - `crates/xcl/src/gpu/dxil/core_tests.rs`: add `bfe_lowers_to_dxil_intrinsics` checking DXIL validation and disassembly for `dx.op.tertiary.i32` opcodes 52 (`Ubfe`) and 51 (`Ibfe`). - `crates/xcl/src/gpu/recomp/tests.rs`: add `gpu_v_bfe_edge_cases` testing 24 edge cases (`w = 0`, `w = 1`, `w = 31`, unmasked `w = 32` / `w = 0x104` / `o = 32` / `o = 0x104`, `o + w == 32`, `o + w > 32`, sign-extension boundaries) against an exact CPU reference. - Synthetic compute shader measurement (1 and 64 `(V_BFE_U32, V_BFE_I32)` pairs, wave32): `n = 1` changes `2332` → `2352` bytes (first `dx.op.tertiary.i32` declaration); `n = 64` drops `5940` → `5548` bytes (`-392` bytes). **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 5080 (driver `32.0.15.9579`, wave32), AMD Ryzen 7 9700X, Windows 11 Pro `10.0.26100`, `rustc 1.100.0`, DXC `1.8.2502.11` (`XCL_DXC_DIR=D:\Windows Kits\10\bin\10.0.26100.0\x64`), debug & release builds. - `cargo test --workspace -- --test-threads=4`: 1156 passed, 0 failed, 46 ignored (`24 SKIPPED` hardware-capability / policy checks: native wave64 unavailable on RTX 5080 and rejected direct-path `f16` arithmetic), including `bfe_lowers_to_dxil_intrinsics` and `gpu_v_bfe_edge_cases`. - `XCL_DIRECT_DXIL=1` targeted GPU parity runs on RTX 5080 (`gpu_v_bfe_edge_cases`, `gpu_signed_bfe_arithmetic_shift`, `gpu_valu_float_and_int`): all 3 passed; confirms NVIDIA's D3D12 compiler masks DXIL `Ubfe`/`Ibfe` width and offset to 5 bits cleanly even for unmasked `32` and `0x104`. **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1680 (PresentX 1680) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 13673 MB ``` PR: ``` xcl-smoke v1 commit: 628df6d4c56982ea424ada07b198452a6c10c3b4 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1684 (PresentX 1684) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13664 MB ``` **Not tested** - Native wave64 GPU execution (skipped automatically on wave32-only RTX 5080 hardware). - Running the title with `XCL_DIRECT_DXIL=1` in the `smoke.ps1` launch (because on unmerged `main` without PR #2101, `D:\Windows Kits\...` in `XCL_DXC_DIR` is intercepted by the `{game}` D-drive VFS mount inside the host process; `XCL_DIRECT_DXIL=1` was verified in unit/GPU tests). **AI use** - Antigravity (Gemini 4 Neon): lowered `Lw::bfe_u` and `Lw::bfe_i` to `Tertiary::Ubfe`/`Tertiary::Ibfe`, wrote the disassembly and GPU edge-case tests, and ran the test suite and `scripts/smoke.ps1` regression checks.
luckyteagirl commented 2026-11-25 08:08:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T07:11:57Z.


Independent native Windows AMD check of exact PR head cd6764952e46276a8ff65d2a95c91ec81a0c76a2. The PR description lists native wave64 as untested.

Tested

  • Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5; debug tests.
  • XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=wave64, XCL_DIRECT_DXIL=1; cargo test --locked -p xcl --lib -j 2 gpu_v_bfe_edge_cases -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, 0 SKIPPED. The fixture runs both wave64 and wave32 and compares 24 signed/unsigned BFE edge cases against its CPU reference per lane.
  • The same GPU command with XCL_DIRECT_DXIL=0: 1 passed, 0 failed, 0 ignored, 0 SKIPPED.
  • bfe_lowers_to_dxil_intrinsics on this head: 1 passed, 0 failed, 0 ignored (DXIL intrinsic validation/disassembly unit test).

This checks the focused GPU and DXIL tests. I did not run the full workspace suite or a paired title smoke on this PR. No claim about speed or title shader use follows from these tests.

AI-assisted checkout, testing, log verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7155595867 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7155595867). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T07:11:57Z. --- Independent native Windows AMD check of exact PR head `cd6764952e46276a8ff65d2a95c91ec81a0c76a2`. The PR description lists native wave64 as untested. **Tested** - Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5; debug tests. - `XCL_ADAPTER=6800M`, `XCL_REQUIRE_GPU=wave64`, `XCL_DIRECT_DXIL=1`; `cargo test --locked -p xcl --lib -j 2 gpu_v_bfe_edge_cases -- --test-threads=1 --show-output`: **1 passed, 0 failed, 0 ignored, 0 SKIPPED**. The fixture runs both wave64 and wave32 and compares 24 signed/unsigned BFE edge cases against its CPU reference per lane. - The same GPU command with `XCL_DIRECT_DXIL=0`: **1 passed, 0 failed, 0 ignored, 0 SKIPPED**. - `bfe_lowers_to_dxil_intrinsics` on this head: **1 passed, 0 failed, 0 ignored** (DXIL intrinsic validation/disassembly unit test). This checks the focused GPU and DXIL tests. I did not run the full workspace suite or a paired title smoke on this PR. No claim about speed or title shader use follows from these tests. AI-assisted checkout, testing, log verification, and report drafting with OpenAI Codex (GPT-6). No game data was used.
DavidM1911 commented 2026-11-25 08:08:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T07:28:05Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7155892451 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7155892451). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T07:28:05Z. --- 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!
SzczepanGrela commented 2026-11-25 11:09:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-25T11:03:09Z.


Linux/RADV + Wine GPU test report on PR #2171 head cd67649 (cd6764952e46276a8ff65d2a95c91ec81a0c76a2, local merge 75aee93dd43dc8a8fd5afbe283dcbd2b6407a957 onto origin/main 568e7db7729c8fa6c8f0f4b32d798faaf11462bb).

Setup

  • OS/kernel: CachyOS Linux (7.3.0-5-cachyos)
  • GPU/driver: AMD Radeon RX 9070 (RADV GFX1201, native wave64) (device 0x7550, Vulkan 1.4.354, Mesa RADV 26.2.5-arch3.1)
  • Wine/DX: GE-Proton11-12 (wine-11.0 (Staging)), vkd3d-proton v3.1, DXVK dxgi.dll, DXC 1.9.2602.17 (21d28f72)
  • Build/env: rustc 1.97.1, cargo test --target x86_64-pc-windows-gnu --release --workspace --no-run (43.96s, exit 0, zero compiler warnings), XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0

Results
New tests (cargo test --target x86_64-pc-windows-gnu --release -p xcl --lib ... -- --exact --nocapture):

  • gpu::dxil::core_tests::bfe_lowers_to_dxil_intrinsics: 1 passed, 0 failed, 0 ignored in both default env (0.01s, exit 0) and XCL_DIRECT_DXIL=1 (0.01s, exit 0).
  • gpu::recomp::tests::gpu_v_bfe_edge_cases: 1 passed, 0 failed, 0 ignored (exit 0) across all 5 tested modes: default (0.11s), XCL_DIRECT_DXIL=1 (0.09s), XCL_DIRECT_DXIL=all (0.09s), XCL_SPLIT_WAVE64=1 (0.11s), and XCL_DIRECT_DXIL=1 XCL_SPLIT_WAVE64=1 (0.09s).

Affected suites (cargo test --target x86_64-pc-windows-gnu --release -p xcl --lib ...):

  • gpu::dxil::core_tests: 16 passed, 0 failed, 1 ignored in default env (0.16s, exit 0) and XCL_DIRECT_DXIL=1 (0.13s, exit 0; dump_dxc_lowering ignored), vs baseline 568e7db 15 passed, 0 failed, 1 ignored (0.12s each, exit 0; +1 passed, 0 regressions).
  • gpu::dxil -- --skip ops_tests::integer_ops_match_cpu --skip ops_tests::uaddc_and_usubb_match_cpu:
    • Default env: 120 passed, 1 failed, 3 ignored (1.16s, exit 101), vs baseline 568e7db 119 passed, 1 failed, 3 ignored (1.11s, exit 101).
    • XCL_DIRECT_DXIL=1: 120 passed, 1 failed, 3 ignored (0.96s, exit 101), vs baseline 568e7db 119 passed, 1 failed, 3 ignored (0.88s, exit 101).
    • All 4 runs failed identically on gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2 (crates/xcl/src/gpu/dxil/fuzz_tests.rs:1171:21, seed 1003: res[713] = 0x1, CPU 0x0).
  • gpu::recomp::tests::gpu_ -- --skip gpu_sparse_vram_descriptors_buffers_and_xmem --skip gpu_uma_import_check_at_init --skip gpu_unified_memory_arena:
    • Default env: 100 passed, 1 failed, 1 ignored (1.06s, exit 101), vs baseline 568e7db 99 passed, 1 failed, 1 ignored (0.89s, exit 101; identical failure gpu_nonfused_mad_and_mac_prevent_fma_contraction, ignored gpu_arena_partial_commit_probe).
    • XCL_DIRECT_DXIL=1: 97 passed, 4 failed, 1 ignored (0.69s, exit 101), vs baseline 568e7db 96 passed, 4 failed, 1 ignored (0.65s, exit 101; identical 4 failures: gpu_f64_math_random, gpu_f64_roots, gpu_image_get_resinfo_1d_array, gpu_nonfused_mad_and_mac_prevent_fma_contraction).
    • XCL_DIRECT_DXIL=all: 97 passed, 4 failed, 1 ignored (0.61s, exit 101), vs baseline 568e7db 96 passed, 4 failed, 1 ignored (0.60s, exit 101; identical 4 failures).
    • XCL_SPLIT_WAVE64=1: 90 passed, 11 failed, 1 ignored (1.54s, exit 101), vs baseline 568e7db 89 passed, 11 failed, 1 ignored (1.49s, exit 101; identical 11 failures).

Not tested

  • No retail game workload, no scripts/smoke.ps1, no integration test binaries, and no --lib modules outside gpu::dxil and gpu::recomp::tests::gpu_.
  • gpu::dxil::ops_tests::integer_ops_match_cpu and ops_tests::uaddc_and_usubb_match_cpu (excluded via --skip in both baseline 568e7db and PR #2171 runs due to known vkd3d-proton v3.1 / libvulkan_radeon.so exit 3 crash).
  • gpu_sparse_vram_descriptors_buffers_and_xmem, gpu_uma_import_check_at_init, and gpu_unified_memory_arena (excluded via --skip in the mode sweeps; baseline 568e7db unskipped gpu::recomp::tests::gpu_ -- --test-threads=1 passed 83, failed 20, ignored 1, with 19 HRESULT(0x80070057) failures after gpu_sparse_vram_descriptors_buffers_and_xmem while gpu_uma_import_check_at_init and gpu_unified_memory_arena passed in isolation).

AI use

  • Diff audit, test execution, and comment drafting used Antigravity (Gemini 4 Neon) multi-agent verification, reviewed by me before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7160522441 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7160522441). Originally posted by [SzczepanGrela](https://github.com/SzczepanGrela) on 2026-11-25T11:03:09Z. --- Linux/RADV + Wine GPU test report on PR `#2171` head `cd67649` (`cd6764952e46276a8ff65d2a95c91ec81a0c76a2`, local merge `75aee93dd43dc8a8fd5afbe283dcbd2b6407a957` onto `origin/main` `568e7db7729c8fa6c8f0f4b32d798faaf11462bb`). **Setup** - OS/kernel: CachyOS Linux (`7.3.0-5-cachyos`) - GPU/driver: `AMD Radeon RX 9070 (RADV GFX1201, native wave64)` (device `0x7550`, Vulkan `1.4.354`, Mesa RADV `26.2.5-arch3.1`) - Wine/DX: `GE-Proton11-12` (`wine-11.0 (Staging)`), `vkd3d-proton v3.1`, DXVK `dxgi.dll`, DXC `1.9.2602.17` (`21d28f72`) - Build/env: `rustc 1.97.1`, `cargo test --target x86_64-pc-windows-gnu --release --workspace --no-run` (43.96s, exit `0`, zero compiler warnings), `XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0` **Results** New tests (`cargo test --target x86_64-pc-windows-gnu --release -p xcl --lib ... -- --exact --nocapture`): - `gpu::dxil::core_tests::bfe_lowers_to_dxil_intrinsics`: **1 passed, 0 failed, 0 ignored** in both default env (0.01s, exit `0`) and `XCL_DIRECT_DXIL=1` (0.01s, exit `0`). - `gpu::recomp::tests::gpu_v_bfe_edge_cases`: **1 passed, 0 failed, 0 ignored** (exit `0`) across all 5 tested modes: default (0.11s), `XCL_DIRECT_DXIL=1` (0.09s), `XCL_DIRECT_DXIL=all` (0.09s), `XCL_SPLIT_WAVE64=1` (0.11s), and `XCL_DIRECT_DXIL=1 XCL_SPLIT_WAVE64=1` (0.09s). Affected suites (`cargo test --target x86_64-pc-windows-gnu --release -p xcl --lib ...`): - `gpu::dxil::core_tests`: **16 passed, 0 failed, 1 ignored** in default env (0.16s, exit `0`) and `XCL_DIRECT_DXIL=1` (0.13s, exit `0`; `dump_dxc_lowering` ignored), vs baseline `568e7db` **15 passed, 0 failed, 1 ignored** (0.12s each, exit `0`; +1 passed, 0 regressions). - `gpu::dxil -- --skip ops_tests::integer_ops_match_cpu --skip ops_tests::uaddc_and_usubb_match_cpu`: - Default env: **120 passed, 1 failed, 3 ignored** (1.16s, exit `101`), vs baseline `568e7db` **119 passed, 1 failed, 3 ignored** (1.11s, exit `101`). - `XCL_DIRECT_DXIL=1`: **120 passed, 1 failed, 3 ignored** (0.96s, exit `101`), vs baseline `568e7db` **119 passed, 1 failed, 3 ignored** (0.88s, exit `101`). - All 4 runs failed identically on `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2` (`crates/xcl/src/gpu/dxil/fuzz_tests.rs:1171:21`, `seed 1003: res[713] = 0x1, CPU 0x0`). - `gpu::recomp::tests::gpu_ -- --skip gpu_sparse_vram_descriptors_buffers_and_xmem --skip gpu_uma_import_check_at_init --skip gpu_unified_memory_arena`: - Default env: **100 passed, 1 failed, 1 ignored** (1.06s, exit `101`), vs baseline `568e7db` **99 passed, 1 failed, 1 ignored** (0.89s, exit `101`; identical failure `gpu_nonfused_mad_and_mac_prevent_fma_contraction`, ignored `gpu_arena_partial_commit_probe`). - `XCL_DIRECT_DXIL=1`: **97 passed, 4 failed, 1 ignored** (0.69s, exit `101`), vs baseline `568e7db` **96 passed, 4 failed, 1 ignored** (0.65s, exit `101`; identical 4 failures: `gpu_f64_math_random`, `gpu_f64_roots`, `gpu_image_get_resinfo_1d_array`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`). - `XCL_DIRECT_DXIL=all`: **97 passed, 4 failed, 1 ignored** (0.61s, exit `101`), vs baseline `568e7db` **96 passed, 4 failed, 1 ignored** (0.60s, exit `101`; identical 4 failures). - `XCL_SPLIT_WAVE64=1`: **90 passed, 11 failed, 1 ignored** (1.54s, exit `101`), vs baseline `568e7db` **89 passed, 11 failed, 1 ignored** (1.49s, exit `101`; identical 11 failures). **Not tested** - No retail game workload, no `scripts/smoke.ps1`, no integration test binaries, and no `--lib` modules outside `gpu::dxil` and `gpu::recomp::tests::gpu_`. - `gpu::dxil::ops_tests::integer_ops_match_cpu` and `ops_tests::uaddc_and_usubb_match_cpu` (excluded via `--skip` in both baseline `568e7db` and PR `#2171` runs due to known `vkd3d-proton v3.1` / `libvulkan_radeon.so` exit `3` crash). - `gpu_sparse_vram_descriptors_buffers_and_xmem`, `gpu_uma_import_check_at_init`, and `gpu_unified_memory_arena` (excluded via `--skip` in the mode sweeps; baseline `568e7db` unskipped `gpu::recomp::tests::gpu_ -- --test-threads=1` passed `83`, failed `20`, ignored `1`, with 19 `HRESULT(0x80070057)` failures after `gpu_sparse_vram_descriptors_buffers_and_xmem` while `gpu_uma_import_check_at_init` and `gpu_unified_memory_arena` passed in isolation). **AI use** - Diff audit, test execution, and comment drafting used Antigravity (Gemini 4 Neon) multi-agent verification, reviewed by me before posting.
Toons29 commented 2026-11-25 13:05:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T12:07:57Z.


Regression run of 457db25d on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 568e7db7, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14592 MB
xcl-smoke v1
commit: 457db25d580ca459a8a0ad2f723bd7a021375d9c
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14559 MB

Against the limits in CONTRIBUTING.md: 104 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

<!-- greyfinch-sync:ivall/xcl:comment:7161961173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7161961173). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T12:07:57Z. --- Regression run of `457db25d` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `568e7db7`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1566 (PresentX 1566) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14592 MB ``` ``` xcl-smoke v1 commit: 457db25d580ca459a8a0ad2f723bd7a021375d9c gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1630 (PresentX 1630) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14559 MB ``` Against the limits in CONTRIBUTING.md: 104 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; a script posted this right after the run, with both blocks exactly as printed.
raylitebull commented 2026-11-25 19:09:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T18:24:47Z.


Code review on 457db25 (fe_u/fe_i -> Tertiary::Ubfe/Ibfe in lower.rs + fe_lowers_to_dxil_intrinsics + gpu_v_bfe_edge_cases): diff is clean and CI is green. Only item needed before merge: an exact-head 457db25 AMD GPU pass of gpu_v_bfe_edge_cases with XCL_DIRECT_DXIL=1 (previous AMD/RADV runs were on cd67649, and the RX 9070 smoke run leaves XCL_DIRECT_DXIL unset).

<!-- greyfinch-sync:ivall/xcl:comment:7170872404 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7170872404). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T18:24:47Z. --- Code review on 457db25 (fe_u/fe_i -> Tertiary::Ubfe/Ibfe in lower.rs + fe_lowers_to_dxil_intrinsics + gpu_v_bfe_edge_cases): diff is clean and CI is green. Only item needed before merge: an exact-head 457db25 AMD GPU pass of gpu_v_bfe_edge_cases with XCL_DIRECT_DXIL=1 (previous AMD/RADV runs were on cd67649, and the RX 9070 smoke run leaves XCL_DIRECT_DXIL unset).
O5-7 commented 2026-11-26 02:51:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by O5-7 on 2026-11-26T02:51:15Z.

Review: COMMENTED


Rebased onto main (b49be18) to resolve the trailing conflict in core_tests.rs (now at 628df6d), and re-verified bfe (default + XCL_DIRECT_DXIL=1), workspace suite, and 60s smoke. Ready for an AMD XCL_DIRECT_DXIL=1 check on 628df6d.

<!-- greyfinch-sync:ivall/xcl:review:6067906200 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#pullrequestreview-6067906200). Originally posted by [O5-7](https://github.com/O5-7) on 2026-11-26T02:51:15Z. **Review:** COMMENTED --- Rebased onto main (b49be18) to resolve the trailing conflict in core_tests.rs (now at 628df6d), and re-verified bfe (default + XCL_DIRECT_DXIL=1), workspace suite, and 60s smoke. Ready for an AMD XCL_DIRECT_DXIL=1 check on 628df6d.
DavidM1911 commented 2026-11-26 09:07:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:15:14Z.


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7186371743 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7186371743). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T08:15:14Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
O5-7 commented 2026-11-28 04:50:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by O5-7 on 2026-11-28T04:50:15Z.

Review: COMMENTED


@vakaobr Thanks for measuring UMul/IMul on D3DMetal and sharing vakaobr/xcl@9592cd1! I checked main (e429936c) and util::mac_host() isn't in main yet. Should I leave #2172 as-is until util::mac_host() lands (and then guard Lw::mul_hi / umul_wide behind mac_host()), or do you expect the mac_host() guard in ops.rs to land first?

<!-- greyfinch-sync:ivall/xcl:review:6095879172 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#pullrequestreview-6095879172). Originally posted by [O5-7](https://github.com/O5-7) on 2026-11-28T04:50:15Z. **Review:** COMMENTED --- @vakaobr Thanks for measuring UMul/IMul on D3DMetal and sharing `vakaobr/xcl@9592cd1`! I checked `main` (`e429936c`) and `util::mac_host()` isn't in `main` yet. Should I leave #2172 as-is until `util::mac_host()` lands (and then guard `Lw::mul_hi` / `umul_wide` behind `mac_host()`), or do you expect the `mac_host()` guard in `ops.rs` to land first?
Foniass commented 2026-12-01 07:30:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:30:56Z.


Triage (#1607) – head 628df6d

No open or merged PR makes this change. #2281 specializes constant-field s_bfe_* (sbfe_u/sbfe_i), and #1626 is test-only. Main still has the shift/select bfe_u/bfe_i.
DXIL Ubfe/Ibfe handle width 0 and offset+width >= 32 the same way v_bfe_* does, and gpu_v_bfe_edge_cases checks those cases on the GPU.
Minor: bfe_lowers_to_dxil_intrinsics calls validate::validate before the dxc::location() check, so it panics instead of skipping when DXC is missing.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304148255 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2171#issuecomment-7304148255). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:30:56Z. --- **Triage (#1607)** – head 628df6d No open or merged PR makes this change. #2281 specializes constant-field `s_bfe_*` (`sbfe_u`/`sbfe_i`), and #1626 is test-only. Main still has the shift/select `bfe_u`/`bfe_i`. DXIL `Ubfe`/`Ibfe` handle width 0 and offset+width >= 32 the same way `v_bfe_*` does, and `gpu_v_bfe_edge_cases` checks those cases on the GPU. Minor: `bfe_lowers_to_dxil_intrinsics` calls `validate::validate` before the `dxc::location()` check, so it panics instead of skipping when DXC is missing. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2171:upstream-pr/2171'
git switch 'upstream-pr/2171'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/2171'
git switch 'upstream-pr/2171'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2171'
git switch 'upstream-pr/2171'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2171'
git switch 'main'
git merge --squash 'upstream-pr/2171'
git switch 'main'
git merge --ff-only 'upstream-pr/2171'
git switch 'main'
git merge 'upstream-pr/2171'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2161
No description provided.