Recompiler: skip VGPR scans without relative indexing #1539

Open
github-bot wants to merge 1 commit from github-bot/gh-1539 into main AGit
Owner

@⁠philip-roy-jones on GitHub · 2026-11-24 17:24 UTC · original
philip-roy-jones:recompiler-skip-unused-vgpr-scan → main · +25 −9 · 3 files · 1 commits · open

Part of #1269. Only vector moves and swaps indexed through M0 need the highest VGPR number used by a shader. The translator was enumerating every register operand to find it, including for the 48 of 54 sampled programs that used only fixed vector registers.

What is in it

  • Skip that scan when none of the five indexed opcodes is present. The regression checks all five, including a register referenced later in the shader.

Tested

  • Rebased Philip’s single commit onto green merged main 08db8020d323bf478964fcc586152cce54959cfc. The published head is 88452400fe19f2cb2a03b73ac82fb98e80cc083c. git range-diff marks the old and new patches equivalent. Windows 11 Pro 25H2 (26200.9974), Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5. cargo build --locked --workspace, cargo build --locked --release -p xcl and cargo test --locked --workspace --no-run passed on both.
  • All six focused VGPR and upstream checks passed on the head with zero skips. The repaired barrier test from #2420 passed its DXIL assertion on both revisions, then skipped its wave32 dispatch on the RX 580. The release emitter produced byte-identical HLSL for all 36 fixed/indexed-register, late-read/write and wave-mode fixtures (1,949,274 bytes).
  • xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 on both revisions. The RX 580 driver (amdxc64.dll) ended the library process at 0xc0000005. The remaining workspace targets ran, and the full library inventory was rerun in matching four-thread batches with the crashing case isolated. Main totaled 1,342 passed, 86 failed, 47 ignored, 1 process crash and the PR 1,342 passed, 87 failed, 47 ignored, 1 process crash. 67 distinct explicit skips are included in each pass total. Both crashed on gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_masks_hold_helper_lanes_on_triangle_edges. The extra head failure was hle::d3d12x::list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit (407 command-list segments, expected 421). It passed in three isolated runs and three repeats of its original four-thread test group on each revision.
  • Hosted Windows built and ran .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched successfully. Main reported 1,428 passed and the PR 1,429 passed, each with 0 failed, 47 ignored, 1 filtered and 211 distinct explicit skip names. PR job · Main job
Focused RX 580 command
xcl-gpu run cargo test --locked -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel compute_globallycoherent_only_when_needed gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier --test-threads=1 --nocapture
All 67 explicit RX 580 skip names on this main and head
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::lower::saveexec_tests::gpu_direct_wave32_saveexec_and_wrexec
gpu::dxil::lower_wide::rcp_d_tests::gpu_direct_rcp_f64_and_rsq_f64_edges
gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d
gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole
gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece
gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot
gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops
gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange
gpu::dxil::ops_tests::approximate_float_unary_ops_are_within_tolerance
gpu::dxil::ops_tests::bfrev_i64_of_a_uniform_product_matches_cpu
gpu::dxil::ops_tests::derivatives_in_compute_run
gpu::dxil::ops_tests::dot4_add_u8_packed_matches_cpu
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::i1_to_i64_sign_extension_and_shift_match_cpu
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::prelude::fclass_const_tests::gpu_direct_v_cmp_class_f32_const_mask_validates_and_matches_isa
gpu::dxil::tests::blocks_are_written_in_reverse_post_order
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_mask_write_where_one_half_is_elsewhere_meets_no_barrier
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::split_wave64_dead_scc_skips_exchange_barrier
gpu::recomp::lower_dxil::tests::split_wave64_wave_branches_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
heap_window_out_of_memory_falls_back_to_the_switch_form
hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob
offline_split_compute_pipeline_is_reused_by_a_second_process
placed_title_textures_share_vram_and_preserve_pixels
shaders::tests::pso_measurement_compiles_an_exact_synthetic_record
Previous verification on `5773e5bb` against `50a9fdef`
  • Rebased head 5773e5bb08c3e230a9f2e4686db6ad261ed45cc9 against merged main at 50a9fdef81cb796b8756a31defb0648301d002ce. Windows 11 Pro 25H2 build 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5. cargo build --locked --workspace (debug) and cargo build --locked --release -p xcl passed on both.
  • With xcl-gpu run cargo test --locked -p xcl --lib -- <filters> --test-threads=1 --nocapture, the four original VGPR tests and two upstream tests (compute_globallycoherent_only_when_needed, gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends) all passed on RX 580, zero skipped. Release builds emitted byte-identical HLSL for 36 fixtures covering fixed registers, all five indexed opcodes, late high reads and writes, and native wave32, native wave64 and split wave64 (1,930,662 bytes).
  • xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output reported 1,170 passed, 119 failed, 46 ignored on main and 1,171 passed, 119 failed, 46 ignored on the head. Both returned 101 with the same 119 failures and 78 distinct RX 580/runtime skips included in the pass totals. 110 failures on each revision reported device suspension (0x887A0005).
  • On the software adapter, xcl-gpu run .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched stopped in the library on both revisions with WARP and Windows SDK DXC 1.8.2502.11. The test gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier counted three group barriers and expected one. Main reported 1,219 passed and the head 1,220 passed, with one failure and 26 ignored on each.
  • Hosted Windows CI ran on both revisions. Its sole library failure was the same three-versus-one group-barrier assertion at lower_dxil.rs:1155. PR job · Merged main job
All 78 tests that printed SKIPPED on the RX 580 (both revisions)
a_placed_texture_gets_the_pages_of_a_level_with_its_texels
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::lower_wide::rcp_d_tests::gpu_direct_rcp_f64_and_rsq_f64_edges
gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d
gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole
gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece
gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot
gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops
gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange
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::split_wave64_dead_scc_skips_exchange_barrier
gpu::recomp::lower_dxil::tests::split_wave64_wave_branches_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::alloc_pool::tests::a_resubmit_while_the_previous_submit_runs_is_noticed
hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it
hle::d3d12x::console_heap::tests::the_shaders_t_sharp_index_bound_fits_the_shared_heap
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::a_reset_while_the_last_submit_runs_records_on_another_pc_list
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
Measurements and independent reports from the original PR revision
  • ab24c38aa5db171c10a697d5292a78852f93b18d against main at 9e3831e. Radeon RX 580 (31.0.21925.1001), Ryzen 7 7700X, Windows 11 Pro 26200.9974, Rust 1.100.0 MSVC and DXC 1.9.2609.5.
  • Release recomp::translate on 54 retail VS/PS/CS programs (28,379 instructions, four memory windows). Median time per batch went from 86.63 to 83.84 ms (3.2% less). Each build ran 36 timed batches across four processes, after warmup. Selection used the first six distinct, translatable programs per stage in each native-code size band of 64–511, 512–4095 and 4096–16383 bytes. A separate allocator-counting build recorded 29,369 fewer allocations/reallocations per batch. All 7,571,624 HLSL bytes matched, including on the six programs using relative indexing. Six cold console_to_dxil_in builds also produced byte-identical DXIL. Timing covers RDNA2-to-HLSL translation.
  • cargo test -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture reported 4 passed, 0 failed, 0 ignored, 0 skipped. The new regression failed with the unconditional scan on b7aa9f3.
  • cargo build --workspace succeeded on both. cargo test --workspace --no-fail-fast -- --test-threads=4 lost the library test process on both. Running the remaining cases completed the inventory. Main reported 754 passing, the PR 755. Both had 21 failures, 1 process crash and 41 ignored. The same 22 cases were unsuccessful, and three reported passes on each were hardware skips (two mesh, one heap windows).
  • The Windows CI command .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched passed locally with WARP and Windows SDK DXC 1.8.2502.11. It reported 776 passed (215 explicit skips), 0 failed, 41 ignored and 1 filtered.
  • MatyEjsr tested ab24c38 on an RTX 3090 and checked the five relative-indexing opcodes and the two uses of max_vgpr. Independent RTX 3090 test report
  • nnonno91 tested ab24c38 on AMD integrated graphics. Cargo reported 777 passes (one hardware skip), 0 failures and 41 ignored. All 18 native-wave64 dispatches produced the expected register values. AMD test report
  • DavidM1911 tested a local merge with upstream main on an RTX 3060 Ti. The library suite passed single-threaded. They saw the same intermittent parallel failure on unmodified main. The report gives no merge SHA or test name. RTX 3060 Ti report

Regression run

xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe -OutDir <run directory>. All 60-second runs used the source-built offline release loader, the same title and RX 580, fresh title data, no input and the HLSL path. Both arms set XCL_DXC_THREADS=1 and disabled async PSOs, PSO preload, the translated-shader cache and the PSO disk cache.

The first pair ran the head first from matching copies of the previous 1,044-entry DXIL cache. Main showed 448 frames at 11,057 MB peak and the head showed 14 at 10,662 MB, with 0/0 device removals and 0/0 crashes (main/head). A main-first repeat reset both arms to the same initial cache. Main showed 381 frames at 10,945 MB and the head showed 58 at 10,724 MB, with 0/0 removals and 0/0 crashes. The head fell below 80% of main’s frames in both orders from this seed. The cause of the startup delay remains open.

Both revised builds populated new cache entries during the first pair. The blocks below use two byte-verified copies of main’s resulting 1,928-entry cache. All 823 entries newly produced by both first runs matched byte for byte.

Main

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1494 (PresentX 1494)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11318 MB

PR head

xcl-smoke v1
commit: 88452400fe19f2cb2a03b73ac82fb98e80cc083c
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11314 MB
Previous smoke on `50a9fdef` and `5773e5bb`, including the default-worker memory and device failures

xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe. All runs used clean release builds, the RX 580, no network or input, fresh title data, and the HLSL path with XCL_ASYNC_PSO=0, XCL_PSO_PRELOAD=0, XCL_TRANSLATED_CACHE=0 and XCL_PSO_DISK_CACHE=0.

With the default compiler worker count and 952 identical initial DXIL cache entries, main showed 1,636 frames at 16,597 MB peak and head showed 1,651 at 22,980 MB. Both exited cleanly, but the head exceeded the 125% memory limit. All 74 new cache entries produced by both runs matched byte for byte. Repeating in reverse order from identical copies of their combined 1,044-entry cache produced the same driver error (0x887a0020) on both revisions, at 46.6 s on the head and 59.0 s on main.

The runs below started from that same 1,044-entry cache with XCL_DXC_THREADS=1 on both revisions to limit concurrent compiler work.

Main

xcl-smoke v1
commit: 50a9fdef81cb796b8756a31defb0648301d002ce
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1597 (PresentX 1597)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11602 MB

PR head

xcl-smoke v1
commit: 5773e5bb08c3e230a9f2e4686db6ad261ed45cc9
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1592 (PresentX 1592)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11600 MB

Not tested

  • Our local runs did not cover gameplay, asynchronous pipeline creation or hardware mesh execution. Optional XCL_SAMPLE_* variables were unset for the workspace suite. The retail translation timings above were measured on the original revision.
  • The current retail runs cover startup and presentation. They do not identify a retail invocation of one of the five indexed opcodes. The repaired barrier’s wave32 hardware assertions were skipped locally. The original 54-program timing was not repeated on this revision.

AI use

  • OpenAI Codex used GPT-6.2 Astra (gpt-6.2-astra) at maximum reasoning effort (max) to write the change and regression test, run the comparisons and prepare this PR.
  • OpenAI Codex in Orca with GPT-6.2 Astra (gpt-6.2-astra) resolved the rebase, reviewed the full diff on Philip’s behalf, ran the checks and updated the description. The dispatch did not expose its reasoning effort.
  • OpenAI Codex in Orca, GPT-6.2 Astra (gpt-6.2-astra) at maximum reasoning effort (max), rebased the existing commit after #2420, reviewed the full diff on Philip’s behalf, ran the comparisons and updated the evidence.
**@⁠philip-roy-jones** on GitHub · 2026-11-24 17:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1539) `philip-roy-jones:recompiler-skip-unused-vgpr-scan` → `main` · +25 −9 · 3 files · 1 commits · open Part of #1269. Only vector moves and swaps indexed through M0 need the highest VGPR number used by a shader. The translator was enumerating every register operand to find it, including for the 48 of 54 sampled programs that used only fixed vector registers. **What is in it** - Skip that scan when none of the five indexed opcodes is present. The regression checks all five, including a register referenced later in the shader. **Tested** - Rebased Philip’s single commit onto green merged main `08db8020d323bf478964fcc586152cce54959cfc`. The published head is `88452400fe19f2cb2a03b73ac82fb98e80cc083c`. `git range-diff` marks the old and new patches equivalent. Windows 11 Pro 25H2 (26200.9974), Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5. `cargo build --locked --workspace`, `cargo build --locked --release -p xcl` and `cargo test --locked --workspace --no-run` passed on both. - All six focused VGPR and upstream checks passed on the head with zero skips. The repaired barrier test from #2420 passed its DXIL assertion on both revisions, then skipped its wave32 dispatch on the RX 580. The release emitter produced byte-identical HLSL for all 36 fixed/indexed-register, late-read/write and wave-mode fixtures (1,949,274 bytes). - `xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 on both revisions. The RX 580 driver (`amdxc64.dll`) ended the library process at `0xc0000005`. The remaining workspace targets ran, and the full library inventory was rerun in matching four-thread batches with the crashing case isolated. Main totaled **1,342 passed, 86 failed, 47 ignored, 1 process crash** and the PR **1,342 passed, 87 failed, 47 ignored, 1 process crash**. 67 distinct explicit skips are included in each pass total. Both crashed on `gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_masks_hold_helper_lanes_on_triangle_edges`. The extra head failure was `hle::d3d12x::list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` (407 command-list segments, expected 421). It passed in three isolated runs and three repeats of its original four-thread test group on each revision. - Hosted Windows built and ran `.\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched` successfully. Main reported 1,428 passed and the PR 1,429 passed, each with 0 failed, 47 ignored, 1 filtered and 211 distinct explicit skip names. [PR job](https://github.com/xcl-dev/xcl/actions/runs/45721679388/job/139581303822) · [Main job](https://github.com/xcl-dev/xcl/actions/runs/45718128758/job/139569325288) <details> <summary>Focused RX 580 command</summary> ```text xcl-gpu run cargo test --locked -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel compute_globallycoherent_only_when_needed gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier --test-threads=1 --nocapture ``` </details> <details> <summary>All 67 explicit RX 580 skip names on this main and head</summary> ```text 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::lower::saveexec_tests::gpu_direct_wave32_saveexec_and_wrexec gpu::dxil::lower_wide::rcp_d_tests::gpu_direct_rcp_f64_and_rsq_f64_edges gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange gpu::dxil::ops_tests::approximate_float_unary_ops_are_within_tolerance gpu::dxil::ops_tests::bfrev_i64_of_a_uniform_product_matches_cpu gpu::dxil::ops_tests::derivatives_in_compute_run gpu::dxil::ops_tests::dot4_add_u8_packed_matches_cpu 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::i1_to_i64_sign_extension_and_shift_match_cpu 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::prelude::fclass_const_tests::gpu_direct_v_cmp_class_f32_const_mask_validates_and_matches_isa gpu::dxil::tests::blocks_are_written_in_reverse_post_order 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_mask_write_where_one_half_is_elsewhere_meets_no_barrier 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::split_wave64_dead_scc_skips_exchange_barrier gpu::recomp::lower_dxil::tests::split_wave64_wave_branches_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 heap_window_out_of_memory_falls_back_to_the_switch_form hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob offline_split_compute_pipeline_is_reused_by_a_second_process placed_title_textures_share_vram_and_preserve_pixels shaders::tests::pso_measurement_compiles_an_exact_synthetic_record ``` </details> <details> <summary>Previous verification on `5773e5bb` against `50a9fdef`</summary> - Rebased head `5773e5bb08c3e230a9f2e4686db6ad261ed45cc9` against merged `main` at `50a9fdef81cb796b8756a31defb0648301d002ce`. Windows 11 Pro 25H2 build 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC/validator 1.9.2609.5. `cargo build --locked --workspace` (debug) and `cargo build --locked --release -p xcl` passed on both. - With `xcl-gpu run cargo test --locked -p xcl --lib -- <filters> --test-threads=1 --nocapture`, the four original VGPR tests and two upstream tests (`compute_globallycoherent_only_when_needed`, `gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends`) all passed on RX 580, zero skipped. Release builds emitted byte-identical HLSL for 36 fixtures covering fixed registers, all five indexed opcodes, late high reads and writes, and native wave32, native wave64 and split wave64 (1,930,662 bytes). - `xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` reported **1,170 passed, 119 failed, 46 ignored** on main and **1,171 passed, 119 failed, 46 ignored** on the head. Both returned 101 with the same 119 failures and 78 distinct RX 580/runtime skips included in the pass totals. 110 failures on each revision reported device suspension (`0x887A0005`). - On the software adapter, `xcl-gpu run .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched` stopped in the library on both revisions with WARP and Windows SDK DXC 1.8.2502.11. The test `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` counted three group barriers and expected one. Main reported 1,219 passed and the head 1,220 passed, with one failure and 26 ignored on each. - Hosted Windows CI ran on both revisions. Its sole library failure was the same three-versus-one group-barrier assertion at `lower_dxil.rs:1155`. [PR job](https://github.com/xcl-dev/xcl/actions/runs/45658817012/job/139362732653) · [Merged main job](https://github.com/xcl-dev/xcl/actions/runs/45656870453/job/139355869791) <details> <summary>All 78 tests that printed SKIPPED on the RX 580 (both revisions)</summary> ```text a_placed_texture_gets_the_pages_of_a_level_with_its_texels 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::lower_wide::rcp_d_tests::gpu_direct_rcp_f64_and_rsq_f64_edges gpu::dxil::module::split::tests::dispatch_chain_divergent_forward_edges_3d gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole gpu::dxil::module::split::tests::dispatch_chain_payload_skips_middle_piece gpu::dxil::module::split::tests::dispatch_chain_payload_survives_reused_edge_slot gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange 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::split_wave64_dead_scc_skips_exchange_barrier gpu::recomp::lower_dxil::tests::split_wave64_wave_branches_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::alloc_pool::tests::a_resubmit_while_the_previous_submit_runs_is_noticed hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it hle::d3d12x::console_heap::tests::the_shaders_t_sharp_index_bound_fits_the_shared_heap 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::a_reset_while_the_last_submit_runs_records_on_another_pc_list 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 ``` </details> </details> <details> <summary>Measurements and independent reports from the original PR revision</summary> - `ab24c38aa5db171c10a697d5292a78852f93b18d` against `main` at `9e3831e`. Radeon RX 580 (31.0.21925.1001), Ryzen 7 7700X, Windows 11 Pro 26200.9974, Rust 1.100.0 MSVC and DXC 1.9.2609.5. - Release `recomp::translate` on 54 retail VS/PS/CS programs (28,379 instructions, four memory windows). Median time per batch went from **86.63 to 83.84 ms (3.2% less)**. Each build ran 36 timed batches across four processes, after warmup. Selection used the first six distinct, translatable programs per stage in each native-code size band of 64–511, 512–4095 and 4096–16383 bytes. A separate allocator-counting build recorded 29,369 fewer allocations/reallocations per batch. All 7,571,624 HLSL bytes matched, including on the six programs using relative indexing. Six cold `console_to_dxil_in` builds also produced byte-identical DXIL. Timing covers RDNA2-to-HLSL translation. - `cargo test -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture` reported 4 passed, 0 failed, 0 ignored, 0 skipped. The new regression failed with the unconditional scan on `b7aa9f3`. - `cargo build --workspace` succeeded on both. `cargo test --workspace --no-fail-fast -- --test-threads=4` lost the library test process on both. Running the remaining cases completed the inventory. Main reported 754 passing, the PR 755. Both had 21 failures, 1 process crash and 41 ignored. The same 22 cases were unsuccessful, and three reported passes on each were hardware skips (two mesh, one heap windows). - The Windows CI command `.\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched` passed locally with WARP and Windows SDK DXC 1.8.2502.11. It reported 776 passed (215 explicit skips), 0 failed, 41 ignored and 1 filtered. - MatyEjsr tested `ab24c38` on an RTX 3090 and checked the five relative-indexing opcodes and the two uses of `max_vgpr`. [Independent RTX 3090 test report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1539) - nnonno91 tested `ab24c38` on AMD integrated graphics. Cargo reported 777 passes (one hardware skip), 0 failures and 41 ignored. All 18 native-wave64 dispatches produced the expected register values. [AMD test report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1539) - DavidM1911 tested a local merge with upstream `main` on an RTX 3060 Ti. The library suite passed single-threaded. They saw the same intermittent parallel failure on unmodified `main`. The report gives no merge SHA or test name. [RTX 3060 Ti report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1539) </details> **Regression run** `xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe -OutDir <run directory>`. All 60-second runs used the source-built offline release loader, the same title and RX 580, fresh title data, no input and the HLSL path. Both arms set `XCL_DXC_THREADS=1` and disabled async PSOs, PSO preload, the translated-shader cache and the PSO disk cache. The first pair ran the head first from matching copies of the previous 1,044-entry DXIL cache. Main showed 448 frames at 11,057 MB peak and the head showed 14 at 10,662 MB, with 0/0 device removals and 0/0 crashes (main/head). A main-first repeat reset both arms to the same initial cache. Main showed 381 frames at 10,945 MB and the head showed 58 at 10,724 MB, with 0/0 removals and 0/0 crashes. **The head fell below 80% of main’s frames in both orders from this seed. The cause of the startup delay remains open.** Both revised builds populated new cache entries during the first pair. The blocks below use two byte-verified copies of main’s resulting 1,928-entry cache. All 823 entries newly produced by both first runs matched byte for byte. Main ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1494 (PresentX 1494) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11318 MB ``` PR head ``` xcl-smoke v1 commit: 88452400fe19f2cb2a03b73ac82fb98e80cc083c gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11314 MB ``` <details> <summary>Previous smoke on `50a9fdef` and `5773e5bb`, including the default-worker memory and device failures</summary> `xcl-gpu run .\scripts\smoke.ps1 -Game <retail folder> -Title Retail -Seconds 60 -Xcl .\target\release\xcl.exe`. All runs used clean release builds, the RX 580, no network or input, fresh title data, and the HLSL path with `XCL_ASYNC_PSO=0`, `XCL_PSO_PRELOAD=0`, `XCL_TRANSLATED_CACHE=0` and `XCL_PSO_DISK_CACHE=0`. With the default compiler worker count and 952 identical initial DXIL cache entries, main showed 1,636 frames at 16,597 MB peak and head showed 1,651 at 22,980 MB. Both exited cleanly, but the head exceeded the 125% memory limit. All 74 new cache entries produced by both runs matched byte for byte. Repeating in reverse order from identical copies of their combined 1,044-entry cache produced the same driver error (`0x887a0020`) on both revisions, at 46.6 s on the head and 59.0 s on main. The runs below started from that same 1,044-entry cache with `XCL_DXC_THREADS=1` on both revisions to limit concurrent compiler work. Main ``` xcl-smoke v1 commit: 50a9fdef81cb796b8756a31defb0648301d002ce gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1597 (PresentX 1597) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11602 MB ``` PR head ``` xcl-smoke v1 commit: 5773e5bb08c3e230a9f2e4686db6ad261ed45cc9 gpu: Radeon RX 580 Series title: Retail seconds: 60 exit: 0x0 frames shown: 1592 (PresentX 1592) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11600 MB ``` </details> **Not tested** - Our local runs did not cover gameplay, asynchronous pipeline creation or hardware mesh execution. Optional `XCL_SAMPLE_*` variables were unset for the workspace suite. The retail translation timings above were measured on the original revision. - The current retail runs cover startup and presentation. They do not identify a retail invocation of one of the five indexed opcodes. The repaired barrier’s wave32 hardware assertions were skipped locally. The original 54-program timing was not repeated on this revision. **AI use** - OpenAI Codex used GPT-6.2 Astra (`gpt-6.2-astra`) at maximum reasoning effort (`max`) to write the change and regression test, run the comparisons and prepare this PR. - OpenAI Codex in Orca with GPT-6.2 Astra (`gpt-6.2-astra`) resolved the rebase, reviewed the full diff on Philip’s behalf, ran the checks and updated the description. The dispatch did not expose its reasoning effort. - OpenAI Codex in Orca, GPT-6.2 Astra (`gpt-6.2-astra`) at maximum reasoning effort (`max`), rebased the existing commit after #2420, reviewed the full diff on Philip’s behalf, ran the comparisons and updated the evidence.
Only M0-indexed vector moves and swaps need the register bound for their switch. Skip the operand scan for other programs. The regression covers all five indexed vector opcodes and a register referenced later in the program.

Assisted-by: Codex (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:56:53 +00:00
Author
Owner

@⁠MatyEjsr on GitHub · 2026-11-24 17:45 UTC · original

Verified PR #1539 at head ab24c38aa5db171c10a697d5292a78852f93b18d (base 9e3831e) on SM 6.6 NVIDIA hardware to provide a clean full-GPU workspace test run.

Tested

  • Environment: Windows 11 Pro for Workstations (Build 26200), AMD Ryzen 7 7800X3D, NVIDIA GeForce RTX 3090 (driver 32.0.16.1742), 31.4 GB RAM, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build, DXC dxcompiler 1.9.2602.17 (21d28f72) / dxil 1.9.2602.17 (Windows SDK 10.0.26100.0).
  • cargo build --workspace -j 8: passed in 6.08s (no new warnings).
  • cargo test --workspace -j 8 -- --test-threads=8: 774 executed passed, 3 SKIPPED (777 reported ok by cargo), 0 failed, 41 ignored (xcl lib finished in 13.94s).
    • SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
    • SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
  • cargo test -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture: 4 passed, 0 failed, 0 ignored, 0 SKIPPED (0.25s).
  • Code check: confirmed Em::max_vgpr has no consumers outside Em::movrel and Em::swaprel, and relative_vgpr_limit matches all five V_*REL* instructions in rdna2_spec.rs (V_MOVRELD_B32, V_MOVRELS_B32, V_MOVRELSD_B32, V_MOVRELSD_2_B32, V_SWAPREL_B32).

Not tested

  • AMD GPUs / native wave64 execution, heap-window OOM fallback, release-mode translation timing, retail smoke run, and optional XCL_SAMPLE_* tests (unset).

AI use

  • agy with gemini-4-neon-high: audited the diff and max_vgpr consumers, ran the workspace build and GPU test suite on RTX 3090, and drafted this verification report.
**@⁠MatyEjsr** on GitHub · 2026-11-24 17:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1539#issuecomment-7139664339) Verified PR #1539 at head `ab24c38aa5db171c10a697d5292a78852f93b18d` (base `9e3831e`) on SM 6.6 NVIDIA hardware to provide a clean full-GPU workspace test run. **Tested** - Environment: Windows 11 Pro for Workstations (Build 26200), AMD Ryzen 7 7800X3D, NVIDIA GeForce RTX 3090 (driver 32.0.16.1742), 31.4 GB RAM, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), debug build, DXC `dxcompiler 1.9.2602.17 (21d28f72)` / `dxil 1.9.2602.17` (Windows SDK 10.0.26100.0). - `cargo build --workspace -j 8`: passed in 6.08s (no new warnings). - `cargo test --workspace -j 8 -- --test-threads=8`: 774 executed passed, 3 `SKIPPED` (777 reported `ok` by cargo), 0 failed, 41 ignored (`xcl` lib finished in 13.94s). - `SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - `SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows` - `cargo test -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32_uses_the_m0_relative_switch gpu_v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture`: 4 passed, 0 failed, 0 ignored, 0 `SKIPPED` (0.25s). - Code check: confirmed `Em::max_vgpr` has no consumers outside `Em::movrel` and `Em::swaprel`, and `relative_vgpr_limit` matches all five `V_*REL*` instructions in `rdna2_spec.rs` (`V_MOVRELD_B32`, `V_MOVRELS_B32`, `V_MOVRELSD_B32`, `V_MOVRELSD_2_B32`, `V_SWAPREL_B32`). **Not tested** - AMD GPUs / native wave64 execution, heap-window OOM fallback, release-mode translation timing, retail smoke run, and optional `XCL_SAMPLE_*` tests (unset). **AI use** - agy with gemini-4-neon-high: audited the diff and `max_vgpr` consumers, ran the workspace build and GPU test suite on RTX 3090, and drafted this verification report.
Author
Owner

@⁠nnonno91 on GitHub · 2026-11-24 18:20 UTC · original

Independent native-wave64 AMD check of ab24c38aa5db171c10a697d5292a78852f93b18d.

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug.
  • cargo build --workspace --locked passed. cargo test --locked -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture passed all four tests with zero skips.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 777 passed, 0 failed, and 41 ignored. One reported GPU skip (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows). The bundled title passed.
  • A temporary integration test, cargo test --locked -p xcl --test relative_vgpr_probe -- --exact indexed_registers_preserve_high_operands --nocapture --test-threads=1, generated a fixed V_MOV_B32 control plus all five indexed move/swap variants. Every program referenced v61 after the instruction under test. All 18 HLSL pairs matched byte for byte on base 9e3831e1f570d3646e53ab753b19ec07eb8f1485 and the PR across wave32, native wave64 and split wave64.
  • On the PR’s native wave64 output, the six programs each ran with three M0 settings. The checks compared the written registers against expected values on all 64 lanes, including indexed reads, writes, and swaps targeting v61. All 18 dispatches matched.

Not tested

Retail shaders, retail title runs, release builds, and translation timings. The output comparison used six synthetic programs.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report.

**@⁠nnonno91** on GitHub · 2026-11-24 18:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/1539#issuecomment-7140516297) Independent native-wave64 AMD check of `ab24c38aa5db171c10a697d5292a78852f93b18d`. **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. - `cargo build --workspace --locked` passed. `cargo test --locked -p xcl --lib -- relative_vgpr_limit_is_only_needed_for_indexed_vector_registers v_swaprel_b32 gpu_packed_math_dots_movrel --test-threads=1 --nocapture` passed all four tests with zero skips. - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` reported 777 passed, 0 failed, and 41 ignored. One reported GPU skip (`heap_window_out_of_memory_falls_back_to_the_switch_form`, no heap windows). The bundled title passed. - A temporary integration test, `cargo test --locked -p xcl --test relative_vgpr_probe -- --exact indexed_registers_preserve_high_operands --nocapture --test-threads=1`, generated a fixed `V_MOV_B32` control plus all five indexed move/swap variants. Every program referenced `v61` after the instruction under test. All 18 HLSL pairs matched byte for byte on base `9e3831e1f570d3646e53ab753b19ec07eb8f1485` and the PR across wave32, native wave64 and split wave64. - On the PR’s native wave64 output, the six programs each ran with three `M0` settings. The checks compared the written registers against expected values on all 64 lanes, including indexed reads, writes, and swaps targeting `v61`. All 18 dispatches matched. **Not tested** Retail shaders, retail title runs, release builds, and translation timings. The output comparison used six synthetic programs. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 19:12 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 19:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/1539#issuecomment-7141767384) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:40 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on --test-threads=1 rerun (1305 passed, 0 failed, 27 ignored, 81s). Intermittent single-test flake — tracked in #1978.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 05:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1539#issuecomment-7183699982) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: 1 failure under parallel scheduling; clean on `--test-threads=1` rerun (**1305 passed, 0 failed, 27 ignored**, 81s). Intermittent single-test flake — tracked in #1978. Thanks! — Devin
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1539/head:github-bot/gh-1539'
git switch 'github-bot/gh-1539'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1539'
git switch 'github-bot/gh-1539'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1539'
git switch 'github-bot/gh-1539'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1539'
git switch 'main'
git merge --squash 'github-bot/gh-1539'
git switch 'main'
git merge --ff-only 'github-bot/gh-1539'
git switch 'main'
git merge 'github-bot/gh-1539'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.