Skip to content

Recompiler: reuse a native compute lane's ballot predicate - #2061

Open
philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:dxil-native-ballot-bit
Open

philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:dxil-native-ballot-bit

Conversation

@philip-roy-jones

Copy link
Copy Markdown
Contributor

The direct compute translator reuses the input to a wave ballot when a lane tests its own bit in the same block. Two shaders from the retail world-loading trace went from 408 ballot calls to 286. Part of #1269. World-loading trace

What is in it

  • gpu/dxil/lower.rs caches the predicate, including incoming EXEC, only for native compute lanes indexed by WaveGetLaneIndex. Scalar and cross-lane reads still use the mask words. module/opt.rs can discard a dead ballot if the entry's lane-index instruction retains the WaveOps feature flag.

Tested

  • Windows 11 Pro 25H2 26200.9974, Ryzen 7 7700X, Radeon RX 580 8 GB (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5. Debug suite and release measurements, parent c00f3fcfce59 and head 147d054fcaa0. GPU work ran through xcl-gpu run.
  • cargo build --locked --workspace and cargo build --locked --release -p xcl passed. cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output on RX 580 gave 1,013 passed, 106 failed, 46 ignored, 66 distinct tests reported SKIPPED. Parent gave 1,010 passed, 106 failed, 46 ignored, 65 distinct tests reported SKIPPED. The same 106 tests failed by name, most reporting a suspended device. Rust's pass counts include tests reporting SKIPPED. The three new tests passed the harness. Both wave widths validated, wave64 ran on hardware, and the wave32 execution was skipped.
  • The lane-only test went from two ballots to zero for both widths. The whole-mask case kept one. Direct DXIL and HLSL matched all 256 expected words in an additional wave64 cross-lane test on each revision.
  • Five selected retail compute records produced 1,233 / 828 static ballot calls (parent / head). All ten containers validated and the static samplers matched.
Compute record Ballots, parent / head DXIL bytes, parent / head RX 580 driver build, median parent / head
6e148dbd563de205 220 / 157 305,204 / 301,956 6.83 / 7.14 s
2e0055c25f49848a 188 / 129 234,292 / 231,616 5.21 / 4.87 s
c5696074df0b1cbc 589 / 380 419,532 / 409,384 56.30 / 53.96 s

Median driver build time rose on one shader and fell on two. These are first-use measurements because the RX 580 rejected the request to disable its implicit cache. Time to enter the world remains unmeasured.

Reproduction, additional measurements and GPU skips

The two other records in the five-shader total were 06ac9019d1c01f0e (93 to 75 ballots) and 95cc13288a27a96e (143 to 87). Count call sites by disassembling the dumped .direct.dxil with dxc -dumpbin and counting lines containing both call and @dx.op.waveActiveBallot(.

The first two records in the table are the trace pair (four trials per revision). The third is a 520-case record previously measured on this GPU (three trials per revision). Alternate arm order and use a new executable name per first call. Time CreateComputePipelineState on validated direct DXIL using XCL's ABI root signature, the record's static samplers and no cached PSO blob. ShaderCacheControl returned 0x887A002D. Regenerate each container with xcl shaders <pack> --direct --hash <record> --split 0 --windows 4 --timeout 60 --validate --dump <dir>.

xcl shaders <pack> --direct --sample 256 --seed 1269 --threads 1 --windows 4 --split 0 --max-bytes 16384 --timeout 60 --validate --json validated 219 programs on each revision. The other 37 exceeded the input-size cap. Repeating with --split 1 gave the same counts.

On the 3.91 MB wave32 record 95cc13288a27a96e, CPU translation medians were 669 / 816 ms in the unrestricted run and 839 / 727 ms when pinned to one logical CPU (16 and 30 measurements per revision respectively). The order reversed between setups.

The WARP run of the same test command with --skip test_title_runs_and_game_folder_is_untouched gave 1,118 passed, 0 failed, 46 ignored, 168 distinct tests reported SKIPPED, one filtered out. The following RX 580 tests reported SKIPPED on the head.

gpu::dxil::core_tests::ballot_own_bit_wave32
gpu::dxil::core_tests::s_setreg_b32_mode_bit3_does_not_underflow
gpu::dxil::geometry_tests::gpu_geometry_direct_records
gpu::dxil::graphics::tests::emitted_ms_primitive_attribute_reaches_the_pixel_shader
gpu::dxil::graphics::tests::emitted_ms_ps_draw_a_triangle
gpu::dxil::ops_tests::approximate_float_unary_ops_are_within_tolerance
gpu::dxil::ops_tests::derivatives_in_compute_run
gpu::dxil::ops_tests::doubles_match_cpu
gpu::dxil::ops_tests::exact_float_unary_ops_match_cpu
gpu::dxil::ops_tests::float_binary_tertiary_and_half_conversions_match_cpu
gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run
gpu::dxil::ops_tests::half_precision_overloads_run
gpu::dxil::ops_tests::int64_bit_ops_match_cpu
gpu::dxil::ops_tests::integer_ops_match_cpu
gpu::dxil::ops_tests::raw_and_structured_buffer_atomics_run
gpu::dxil::ops_tests::texture_ops_run
gpu::dxil::ops_tests::typed_buffer_ops_run
gpu::dxil::ops_tests::uaddc_and_usubb_match_cpu
gpu::dxil::ops_tests::uav_array_3d_stores_loads_and_texture_atomics_run
gpu::dxil::ops_tests::wave_ops_match_cpu
gpu::dxil::tests::blocks_are_written_in_reverse_post_order
gpu::recomp::heap_window_tests::gpu_raw_window_view_reaches_its_top
gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower::tests::a_compute_program_agrees_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower::tests::the_lowering_agrees_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower::tests::the_split_form_agrees_with_the_wave64_lowering_on_the_gpu
gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu
gpu::recomp::lower_dxil::tests::a_branch_on_a_mixed_mask_matches_the_hlsl_path_on_the_gpu
gpu::recomp::lower_dxil::tests::a_bridged_instruction_may_write_to_the_entry_block
gpu::recomp::lower_dxil::tests::a_bridged_v_cmpx_keeps_the_lanes_outside_exec_out
gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu
gpu::recomp::lower_dxil::tests::a_per_lane_compute_program_runs_on_the_gpu
gpu::recomp::lower_dxil::tests::a_per_lane_program_with_four_memory_windows_runs_on_the_gpu
gpu::recomp::lower_dxil::tests::coalesced_foreign_runs_agree_on_the_gpu
gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu
gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu
gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu
gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu
gpu::recomp::lower_dxil::tests::gpu_frexp_exp_f32_denorm_per_lane
gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu
gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu
gpu::recomp::lower_dxil::tests::native_wave_branches_on_the_gpu
gpu::recomp::lower_dxil::tests::per_lane_kernels_run_on_the_gpu
gpu::recomp::lower_dxil::tests::the_runtime_path_takes_the_split_form
gpu::recomp::tests::gpu_geometry_mode_es_gs_strip
gpu::recomp::tests::gpu_geometry_mode_es_gs_strip_with_branches
gpu::recomp::tests::gpu_mesh_mode_two_passes
gpu::texture::tests::gpu_console_textures_upload_every_mip_and_slice
gpu::texture::tests::gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels
gpu::texture::tests::gpu_upload_batches_reuse_the_queues_upload_buffer
heap_window_out_of_memory_falls_back_to_the_switch_form
hle::d3d12x::alloc_pool::tests::a_recording_outlives_the_reset_of_the_titles_allocator
hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it
hle::d3d12x::device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed
hle::d3d12x::late_release::tests::a_held_resource_goes_when_the_queue_is_past_its_batch
hle::d3d12x::list_x::tests::a_new_list_takes_no_copy_scratch_of_an_earlier_one
hle::d3d12x::list_x::tests::an_internal_wait_is_listed_until_its_fence_reaches_the_value
hle::d3d12x::list_x::tests::copy_scratch_budget_counts_resources_until_gpu_completion
hle::d3d12x::real::console_format_query_tests::gpu_placed_console_depth_target_with_clear_value
hle::d3d12x::shader_cache_session::tests::rejected_create_shader_cache_session_falls_back_to_working_in_memory_session
placed_title_textures_share_vram_and_preserve_pixels
shaders::pipeline_cap_tests::stale_blob_cannot_bypass_the_offline_pipeline_cap
shaders::tests::pso_measurement_compiles_an_exact_synthetic_record
test_title_draws_with_a_root_signature_under_the_debug_layer

Regression run

scripts/smoke.ps1 -Game <folder> -Title Retail -Seconds 60 -Xcl <release xcl.exe> on each clean revision. Both started with identical copies of 737 precompiled DXIL files, XCL_DIRECT_DXIL=1, XCL_ASYNC_PSO=0, XCL_PSO_PRELOAD=0, XCL_TRANSLATED_CACHE=0 and XCL_PSO_DISK_CACHE=0. New DXC compilations were 0 / 0.

xcl-smoke v1
commit: c00f3fcfce59bb4dfd3a1f96bbc84c60e765b538
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1417 (PresentX 1417)
presents per 2 s (last 3): 54 60 59
device removals: 0
crashes: 0
peak commit: 64512 MB
xcl-smoke v1
commit: 147d054fcaa0109bd476e41706362a46fa824e63
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 61 61 61
device removals: 0
crashes: 0
peak commit: 70460 MB

In the earlier separately warmed runs, main reached 959 frames and 23140 MB, head 1497 frames and 33040 MB. Main still needed 23 DXC compilations and head needed zero. Empty-cache starts with asynchronous PSOs ended early on both revisions with 0xc0000409.

Not tested

Native wave32 execution, NVIDIA, and time to enter the world. The retail record benchmarks built the pipelines without dispatching them with title inputs. The smoke reached presentation. It did not establish whether the title dispatched either traced record.

AI use

OpenAI Codex, GPT-6.2 Astra at maximum reasoning effort, wrote the change and tests, ran the measurements, and drafted the report. I reviewed the diff.

A lane testing its own bit of a comparison mask in the same block
already has the boolean the ballot would return. Use that predicate
when the console lane is the hardware lane index. Keep mask words
available to scalar and cross-lane consumers.

Drop an unused ballot when the entry's lane-index call already keeps
the WaveOps feature live. On two compute records from the world-load
trace this removes 122 of 408 ballot calls.

Part of xcl-dev#1269.

Assisted-by: OpenAI Codex (GPT-6.2 Astra at maximum reasoning effort)
@WebIdentity1

WebIdentity1 commented Nov 25, 2026 •

Copy link
Copy Markdown

Covered the native-wave32 execution gap on RTX3090. Both author fixtures pass on exact 147d054fcaa0109bd476e41706362a46fa824e63 and parent c00f3fcfce59bb4dfd3a1f96bbc84c60e765b538, with the expected reduction in ballot calls and unchanged CPU-checked GPU results.

Tested — Windows10 Home19045, Ryzen7800X3D, RTX3090 driver591.74, Rust/Cargo1.98.1MSVC, DXC/DXIL1.8.2502.11, debug. XCL_ADAPTER=3090; native32, not split-wave64. The actual adapter was printed.

cargo test --locked -p xcl --lib -- ballot_own_bit_wave32 unused_ballot_as_the_only_wave_op_validates --test-threads=1 --show-output

Each revision: 2 passed /0 failed /0 ignored /0 skipped. The wave32 test actually dispatches both variants and checks all32 output words each, including lanes excluded by the earlier EXEC mask after EXEC is restored. The separate unused-ballot feature-flag fixture validates too.

Variant Ballot calls, parent → head DXIL bytes, parent → head
Own-bit reads only 2 → 0 2,236 → 2,128
Whole-mask read retained 2 → 1 2,240 → 2,192

Runtime sources are unchanged. I copied your tests to the parent and added identical adapter/count/size diagnostics to both. A test-only XCL_PROBE_PREOPT marker makes the parent's static-count assertion require2; the head keeps your0/1 expectations. The GPU oracle and validation are unchanged. Both317-file manifests matched before/after and locally, and XCL recompiled both sources.

Not tested — native64 in this run, full workspace, retail smoke, compilation-time or GPU-throughput gains, other cross-lane patterns beyond these fixtures. The native64 case was not selected or counted as coverage. These results fill the reported wave32 gap without claiming the broader suite or retail requirements are satisfied.

AI use — Codex (GPT-6) prepared the parent comparison/diagnostics, ran and verified the native tests, and wrote this report. No runtime edit, commit/push or competing PR.

@JJAutoCompare

Copy link
Copy Markdown

Arc A770 compatibility for XCL PR #2061

Tested the clean, detached PR head 147d054fcaa0109bd476e41706362a46fa824e63 on 2026-11-25. GitHub showed the PR open and refs/pull/2061/head matched before and after testing. The PR conversation includes a separate RTX 3090 test in progress. PR #2061

Tested

Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 x86_64-pc-windows-msvc, DXC and DXIL validator 1.9.2609.5. The Rust test binary used the unoptimized profile with debug info disabled.

Test DXIL validation and static waveActiveBallot call counts Hardware result
ballot_own_bit_wave32 Both variants validated. Lane-local had 0 calls. Whole-mask had 1 call. Both variants dispatched as native wave32. The lane-local check matched all 32 output words, with 1 on even lanes 0 through 20 and 0 elsewhere. The whole-mask check matched all 32 words, with 0x00155555 on those same lanes and 0x00000000 elsewhere.
ballot_own_bit_wave64 Both variants validated. Lane-local had 0 calls. Whole-mask had 1 call. The test logged SKIPPED ...: no wave64 after the validation and count assertions. No native wave64 dispatch or lane readback.
unused_ballot_as_the_only_wave_op_validates The SM 6.6 compute container passed DXIL validation. The test has no static count assertion. Validation only by design.

The checked-in tests assert these counts from disassembly and compare each dispatched lane with the fixture’s expected value. The wave32 dispatches checked 64 output words total. Libtest counted 3 passed, 0 failed, 0 ignored, including 1 hardware execution skip (ballot_own_bit_wave64). There were two native wave32 fixture dispatches and zero native wave64 fixture dispatches.

Prebuild took 70.72 s wall time. The paired ballot checks took 0.20 s in libtest and 0.305 s wall time inside the Arc mutex. The standalone validation took 0.01 s in libtest and 0.036 s wall time. These are test durations.

Commands

Process-local settings for the run and its prebuild:

$env:TEMP = 'L:/XclTooling/pr2061'
$env:TMP = 'L:/XclTooling/pr2061'
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = "$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64"

Prebuild and validation ran outside the Arc mutex. The GPU command ran the prebuilt binary through the shared lock script. Commands below omit timing and log redirection.

& "$env:USERPROFILE/.cargo/bin/cargo.exe" test --locked -p xcl --lib --no-run -j 2
$testExe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
& $testExe gpu::dxil::core_tests::unused_ballot_as_the_only_wave_op_validates --exact --nocapture --test-threads=1

& powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -Command {
    $testExe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
    & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
        & $testExe gpu::dxil::core_tests::ballot_own_bit_wave --nocapture --test-threads=1
    }
}

The first validator invocation was interrupted by Windows PowerShell treating the DXC informational stderr line as terminating. The rerun completed with exit 0. The first GPU invocation was blocked by the default Restricted policy before the lock script loaded. The successful retry used RemoteSigned in the child PowerShell process only. Machine and user execution policy settings were left alone.

Logs on L:/XclTooling/pr2061: prebuild-20261125-033404-462.log, validation-20261125-033548-878.log, and arc-20261125-033558-430.log. Earlier attempts remain alongside them.

Not tested

Native wave64 runtime output, other GPU vendors, the parent revision, the rest of the workspace suite, retail smoke, and performance.

AI use

T3 Code / Codex (gpt-6.2-sol) verified the PR head, ran the checked-in tests, and prepared this report.

@JoaoPauluu

Copy link
Copy Markdown

A run with vkd3d-proton as the host D3D12. The DXIL goes through dxil-spirv and then the NVIDIA Vulkan driver, a different compiler from a native-Windows run: this PR's 3 new tests pass (1 skipped: no wave64).

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 147d054 as it is (merge base with main c00f3fc), no uncommitted changes. The lib test binary runs under Wine, one test per process.
    • ballot_own_bit_wave32: ok, not skipped
    • ballot_own_bit_wave64: ok, SKIPPED (no wave64: this GPU has 32-lane waves only)
    • unused_ballot_as_the_only_wave_op_validates: ok, not skipped

Not tested

  • the whole suite on this head, a retail title, native Windows, AMD.

AI use

  • Claude Code (Claude Opus 5.5) built the commit, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.

@SzczepanGrela

Copy link
Copy Markdown

Linux/RADV + Wine GPU test report on PR #2061 head 147d054 (clean local merge 8a4181c onto origin/main cbc296a, rustc 1.97.1, zero compiler warnings).

Tested

  • CachyOS Linux (kernel 7.3.0-5-cachyos), AMD Radeon RX 9070 (RADV GFX1201, device 0x7550, native wave64, Mesa 26.2.5-arch3.1, Vulkan 1.4.354), GE-Proton11-12 (wine-11.0 (Staging), vkd3d-proton v3.1-1-g8293130eb), DXC 1.9.2602.17 (21d28f72). Cross-built x86_64-pc-windows-gnu release (--lib, 38.92 s) with XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0.
  • ballot_own_bit --test-threads=1 (default env): 2 passed, 0 failed (0.08 s); both gpu::dxil::core_tests::ballot_own_bit_wave32 and gpu::dxil::core_tests::ballot_own_bit_wave64 passed with zero SKIPPED lines. gpu::dxil::core_tests::unused_ballot_as_the_only_wave_op_validates (--exact): 1 passed, 0 failed (0.00 s).
  • Same new tests with XCL_SPLIT_WAVE64=1: 2 passed, 0 failed (0.08 s) + 1 passed, 0 failed (0.00 s), zero skips.
  • gpu::dxil::core_tests --test-threads=1 (default env): 18 passed, 0 failed, 1 ignored (0.31 s; dump_dxc_lowering ignored), vs origin/main cbc296a 15 passed, 0 failed, 1 ignored (0.35 s; +3 passed, 0 regressions).
  • gpu::dxil --skip ops_tests::integer_ops_match_cpu --skip ops_tests::uaddc_and_usubb_match_cpu --test-threads=1: 122 passed, 1 failed, 3 ignored (2.45 s), vs origin/main cbc296a 119 passed, 1 failed, 3 ignored (3.26 s). Both 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_ --test-threads=1 --skip gpu_sparse_vram_descriptors_buffers_and_xmem --skip gpu_uma_import_check_at_init --skip gpu_unified_memory_arena:
    • Default env: 99 passed, 1 failed, 1 ignored (3.92 s), vs origin/main cbc296a 99 passed, 1 failed, 1 ignored (4.50 s); identical failure gpu_nonfused_mad_and_mac_prevent_fma_contraction and ignored gpu_arena_partial_commit_probe.
    • XCL_DIRECT_DXIL=1: 96 passed, 4 failed, 1 ignored (2.12 s), vs origin/main cbc296a 96 passed, 4 failed, 1 ignored (2.12 s); 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: 96 passed, 4 failed, 1 ignored (2.12 s), vs origin/main cbc296a 96 passed, 4 failed, 1 ignored (2.48 s); identical 4 failures.
    • XCL_SPLIT_WAVE64=1: 89 passed, 11 failed, 1 ignored (4.71 s), matching origin/main cbc296a run 2 (89 passed, 11 failed, 1 ignored, 4.83 s) on the exact same 11 failing tests (including gpu_grouped_loads_bounds_and_inactive_lanes failing at crates/xcl/src/gpu/recomp/tests.rs:1507:48 with split wave64: the halves ended with different SGPRs (lower / upper): s127: 0x0 / 0xffff, while gpu_split_wave64_masks_read_whole_after_partial_writes passed). A 5-run XCL_SPLIT_WAVE64=1 check on unmodified origin/main cbc296a showed pre-existing variance between gpu_grouped_loads_bounds_and_inactive_lanes (3 passed, 2 failed with s127: 0x0 / 0xffff) and gpu_split_wave64_masks_read_whole_after_partial_writes (1 failed with s0: 0x20 / 0x28, s21: 0x0 / 0xff, 4 passed).

Not tested

  • Retail game shader packs, scripts/smoke.ps1, integration test binaries, and --lib modules outside gpu::dxil and gpu::recomp::tests::gpu_ (no retail title files locally).
  • gpu::dxil::ops_tests::integer_ops_match_cpu and uaddc_and_usubb_match_cpu (skipped: pre-existing vkd3d-proton v3.1 / libvulkan_radeon.so abort exit 3).
  • gpu_sparse_vram_descriptors_buffers_and_xmem, gpu_uma_import_check_at_init, and gpu_unified_memory_arena (skipped: pre-existing Wine in-process COM vtable swap).

AI use

  • Diff audit, test execution, and summary drafted with Antigravity (Gemini 4 Neon) multi-agent verification and verified by me before posting.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@bielfreedom

Copy link
Copy Markdown

AMD RDNA4 offline numbers for #2061: direct DXIL −1.9 %, AMD driver time unchanged (+0.9 %, within noise). Measured on the direct route over 24 retail compute programs; 0 refused.

Setup

  • GPU: RX 9070 XT 16 GB (RDNA4, native wave64, so the native-lane path this PR targets), AMD driver 32.0.32029.2010.
  • CPU and memory: Ryzen 7 7700, 32 GB RAM, Windows 11, release.
  • Builds:
    • base cbc296a;
    • cbc296a + this PR 147d054, merged cleanly.
  • Both builds carry a local patch that only logs per-program DXIL size and per-CreateComputePipelineState time.

Method

  • XCL_DIRECT_DXIL=1, XCL_HEAP_WINDOWS=0, XCL_PIPELINE_THREADS=1.
  • XCL_PSO_DISK_CACHE=0, with a fresh exe name per phase (the AMD driver cache is keyed on it).
  • Programs: the same 24 as my A14 rows, 6 to 917 KB of direct DXIL.
  • 2 rounds, interleaved with the base.

Totals (round 1 / round 2)

base #2061
driver, sum of 24 274.4 / 276.7 s 277.7 / 278.3 s (+0.9 %)
512 KB+ bucket 238.6 / 241.2 s 242.1 / 242.9 s
total direct DXIL 6.852 MB 6.719 MB (−1.9 %)
driver-phase peak private 4.16 GB 4.17 GB

Per program

  • Direct DXIL changed for 17 of 24 programs, all downward. Programs of 287–658 KB shrank 3.4–4.7 %; the four ~0.8–0.9 MB programs shrank 1.1 %.
  • Driver time ratios were ×0.92 to ×1.06; the largest four were ×1.00 to ×1.02.

Read / inference

  • The ballot reuse shrinks the direct DXIL as described. On the AMD driver it does not change compile time: the ±3 % per-program spread is noise on this machine.
  • Like the RX 580 numbers in the description, this says the gain, if any, is at run time, not in the build.

Not tested

  • Dispatch GPU time.
  • A title run.
  • RDNA2 and RDNA3 on this build.

AI use: Claude Code (Claude Opus 5.5) ran the measurement and drafted this. Counts and timings only, no game data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants