Skip to content

Recompiler: track sampler constants only up to image instructions - #1573

Open
philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:recompiler-sampler-blocks-1269
Open

philip-roy-jones wants to merge 1 commit into
xcl-dev:mainfrom
philip-roy-jones:recompiler-sampler-blocks-1269

Conversation

@philip-roy-jones

@philip-roy-jones philip-roy-jones commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1269. XCL can skip tracking scalar writes in blocks that never read a static sampler descriptor. A descriptor depends only on the writes that precede its image instruction in the same block.

What is in it

Apply pending writes when an image instruction reads the descriptor and discard them at block boundaries. Both the HLSL and direct-DXIL backends use the same helper. The regression test covers consecutive image reads, an unknown overwrite and a branch target.

Tested

  • Rebased a971a8ab36ec on 50a9fdef81cb. Windows 11 Pro 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC 1.9.2609.5. cargo build --workspace --locked and cargo build --release --locked -p xcl passed on both revisions.
  • With XCL_REQUIRE_GPU=wave64, cargo test --locked -p xcl --lib -- static_samplers --test-threads=1 --nocapture passed on HLSL and with XCL_DIRECT_DXIL=1. Each run passed 1 test on main and 2 on the PR, with zero failures, ignores or skips. Both upstream image-load/store tests at the conflict also passed on the PR.
  • Compared the same 54 retail shaders (18 VS, 18 PS, 18 CS) on the two release builds. All 8,105,513 HLSL bytes, translation metadata, 2,077,640 direct-DXIL bytes and 45 static samplers matched. All 54 direct-DXIL outputs validated on both.
  • cargo test --locked --workspace --no-fail-fast -- --test-threads=4 on the RX 580 returned 101 on both. Main reported 1,170 passed, 119 failed, 46 ignored and the PR 1,172 passed, 118 failed, 46 ignored. Both pass counts include the same 76 tests that printed SKIPPED. Each GPU command ran through Philip’s shared queue.
  • I reran every test that failed in either full suite in a fresh test process on each revision. The same 86 passed, 32 failed, and gpu_wave64_ps_whole_wave_reductions exited 0xc0000005 on both. The full-suite log includes 0x887A0005 (device removed) in subsequent tests.
  • Hosted Windows CI failed on the same upstream test, a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier. Both runs counted 3 barriers with 1 expected. Main CI · PR CI
Current RX 580 skips and isolated failures
  • no GPU with 32-lane waves (26) — a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_branch_on_a_mixed_mask_matches_the_hlsl_path_on_the_gpu, a_bridged_instruction_may_write_to_the_entry_block, a_bridged_v_cmpx_keeps_the_lanes_outside_exec_out, a_compute_program_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, a_per_lane_compute_program_runs_on_the_gpu, a_per_lane_program_with_four_memory_windows_runs_on_the_gpu, coalesced_foreign_runs_agree_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, f16_programs_on_the_gpu, f32_programs_on_the_gpu, f64_programs_on_the_gpu, gpu_frexp_exp_f32_denorm_per_lane, integer_programs_on_the_gpu, mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu, native_wave_branches_on_the_gpu, per_lane_kernels_run_on_the_gpu, split_wave64_dead_scc_skips_exchange_barrier, split_wave64_wave_branches_on_the_gpu, the_lowering_agrees_with_the_hlsl_path_on_the_gpu, the_runtime_path_takes_the_split_form, the_split_form_agrees_with_the_wave64_lowering_on_the_gpu, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • no wave32 (17) — approximate_float_unary_ops_are_within_tolerance, derivatives_in_compute_run, doubles_match_cpu, exact_float_unary_ops_match_cpu, float_binary_tertiary_and_half_conversions_match_cpu, gpu_direct_rcp_f64_and_rsq_f64_edges, groupshared_barrier_and_atomics_run, half_precision_overloads_run, int64_bit_ops_match_cpu, integer_ops_match_cpu, raw_and_structured_buffer_atomics_run, s_setreg_b32_mode_bit3_does_not_underflow, texture_ops_run, typed_buffer_ops_run, uaddc_and_usubb_match_cpu, uav_array_3d_stores_loads_and_texture_atomics_run, wave_ops_match_cpu.
  • no GPU (16) — a_held_resource_goes_when_the_queue_is_past_its_batch, a_new_list_takes_no_copy_scratch_of_an_earlier_one, a_recording_outlives_the_reset_of_the_titles_allocator, a_reset_while_the_last_submit_runs_records_on_another_pc_list, a_resubmit_while_the_previous_submit_runs_is_noticed, an_internal_wait_is_listed_until_its_fence_reaches_the_value, copy_scratch_budget_counts_resources_until_gpu_completion, execute_indirect_reads_the_arguments_written_before_it, gpu_console_textures_upload_every_mip_and_slice, gpu_depth_buffer_created_for_unordered_access_is_placed, gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels, gpu_placed_console_depth_target_with_clear_value, gpu_raw_window_view_reaches_its_top, gpu_upload_batches_reuse_the_queues_upload_buffer, rejected_create_shader_cache_session_falls_back_to_working_in_memory_session, the_shaders_t_sharp_index_bound_fits_the_shared_heap.
  • no wave32 GPU (6) — dispatch_chain_divergent_forward_edges_3d, dispatch_chain_oversized_loop_matches_whole, dispatch_chain_payload_skips_middle_piece, dispatch_chain_payload_survives_reused_edge_slot, dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange.
  • no mesh shaders (5) — emitted_ms_primitive_attribute_reaches_the_pixel_shader, emitted_ms_ps_draw_a_triangle, gpu_geometry_mode_es_gs_strip, gpu_geometry_mode_es_gs_strip_with_branches, gpu_mesh_mode_two_passes.
  • D3D12 driver error 0x887A0020 (2) — pso_measurement_compiles_an_exact_synthetic_record, stale_blob_cannot_bypass_the_offline_pipeline_cap.
  • no GPU / DXC / mesh shaders (1) — gpu_geometry_direct_records.
  • no heap windows (1) — heap_window_out_of_memory_falls_back_to_the_switch_form.
  • no wave32 / wave64 (1) — blocks_are_written_in_reverse_post_order.
  • no xgameruntime.dll (1) — test_title_draws_with_a_root_signature_under_the_debug_layer.

The 32 assertion or execution failures reproduced individually on both revisions were a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, gpu_cmp_class_f16_preserves_snan, gpu_compute_coherent_and_cached_loads, gpu_compute_tg_size_counts_a_partial_last_wave, gpu_direct_image_get_resinfo_d16, gpu_direct_msaa_image_loads, gpu_ds_swizzle_and_bpermute_zero_inactive_lanes, gpu_f16_defaults_to_round_to_nearest_even, gpu_f32_compares_with_nan, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_frexp_exp_f32_denorm_control_flow, gpu_frexp_exp_f32_denorm_initial_mode, gpu_frexp_exp_f32_denorm_modes, gpu_frexp_exp_f32_denorm_setreg, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_image_get_resinfo_dim_2d_of_an_msaa_tsharp, gpu_image_get_resinfo_past_last_level, gpu_images_sample_load_store_atomic, gpu_ldexp_f32, gpu_ldexp_f64, gpu_mad_nf_f16_rounds_intermediate_in_binary16, gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_s_round_mode_controls_f16_rounding_across_modes, gpu_safe_s_barrier_multi_warp_and_early_endpgm, gpu_sdwa_f16_inline_constants, gpu_signed_bfe_arithmetic_shift, gpu_wave32_and_wave64_src_vccz_execz.

Historical verification and performance measurements on `fcc8247` and earlier revisions
  • fcc8247a9455 is a single commit on upstream c160d86ef2ef. It and the independently tested 54d5cd78da13 have the same complete Git tree, 72ad1a0bf8a6. Windows 11 Pro 26200.9974, Ryzen 7 7700X, Radeon RX 580 (31.0.21925.1001), Rust 1.100.0 MSVC, DXC 1.9.2609.5.
  • Release cargo build --release -p xcl on both. Median CPU time to translate 54 retail shaders to HLSL fell from 86.30 ms to 82.76 ms (4.1%) per batch. Each build ran 36 timed batches in alternating groups after warmup, on 18 vertex, 18 pixel and 18 compute programs with four memory windows. All 7,571,624 HLSL bytes and all translation metadata matched, including 45 static descriptors across 26 programs.
  • The direct backend produced byte-identical DXIL and static sampler descriptors for the same 54 shaders (1,953,284 bytes, 45 descriptors). All 54 outputs validated on both builds.
  • On the PR, cargo test -p xcl --lib -- static_samplers --test-threads=1 --nocapture passed with the default backend and again with --locked, XCL_DIRECT_DXIL=1 and XCL_REQUIRE_GPU=wave64. Both modes also passed with --locked on GitHub's merge acee405 with upstream 9039900 and on a clean local merge with upstream 85e3826 (tree 5fd5a66b687d, including Shaders: speed up translated pipeline compiles and add PSO measurements #1524). Each run reported 2 passed, 0 failed, 0 ignored and 0 skipped, including point/linear sampling on the RX 580.
  • cargo build --workspace succeeded on both. cargo test --workspace --no-fail-fast -- --test-threads=4 lost the library process on both. Rerunning every unreported case by name gave 836 reported passes on main and 837 on the PR. Each had the same 21 failed tests, 1 test-process crash and 42 ignored. Both pass counts include 21 explicit hardware skips.
  • The Windows CI command .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched passed locally on WARP with Windows SDK DXC 1.8.2502.11. It reported 858 passes (including 236 hardware skips), 0 failures, 42 ignored and 1 filtered. At that revision the hosted Windows run awaited maintainer approval. Hosted Windows CI
  • nnonno91 independently retested fcc8247 on the Ryzen 7 9800X3D iGPU and RTX 5090. The workspace reported 859 passes, 0 failures and 42 ignored on each adapter, including one skip on AMD and three on NVIDIA. On the same merge tree as acee405, both GPUs passed a sampler probe through both compilers and the direct-DXIL recompiler suite (195 passed, 0 failed, 18 ignored). Independent AMD and NVIDIA report
  • lows78 independently ran the earlier head be200ab on an RTX 4090 and reported 777 passed, 0 failed, 41 ignored. Earlier RTX 4090 report
RX 580 failures and hardware skips on both revisions

Both builds failed the same tests, gpu_cmp_class_f16_preserves_snan, gpu_compute_tg_size_counts_a_partial_last_wave, gpu_ds_swizzle_and_bpermute_zero_inactive_lanes, gpu_f16_defaults_to_round_to_nearest_even, gpu_f32_compares_with_nan, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_ldexp_f32, gpu_ldexp_f64, gpu_mad_nf_f16_rounds_intermediate_in_binary16, gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_s_round_mode_controls_f16_rounding_across_modes, gpu_safe_s_barrier_multi_warp_and_early_endpgm, gpu_sdwa_f16_inline_constants, gpu_signed_bfe_arithmetic_shift, gpu_wave32_and_wave64_src_vccz_execz.

Process exit 0xc0000005 in gpu_wave64_ps_whole_wave_reductions.

  • no heap windows (1) — heap_window_out_of_memory_falls_back_to_the_switch_form.
  • no mesh shaders (4) — emitted_ms_primitive_attribute_reaches_the_pixel_shader, emitted_ms_ps_draw_a_triangle, gpu_geometry_mode_es_gs_strip, gpu_mesh_mode_two_passes.
  • no wave32 (15) — approximate_float_unary_ops_are_within_tolerance, derivatives_in_compute_run, doubles_match_cpu, exact_float_unary_ops_match_cpu, float_binary_tertiary_and_half_conversions_match_cpu, groupshared_barrier_and_atomics_run, half_precision_overloads_run, int64_bit_ops_match_cpu, integer_ops_match_cpu, raw_and_structured_buffer_atomics_run, texture_ops_run, typed_buffer_ops_run, uaddc_and_usubb_match_cpu, uav_array_3d_stores_loads_and_texture_atomics_run, wave_ops_match_cpu.
  • no wave32 / wave64 (1) — blocks_are_written_in_reverse_post_order.

Regression run

scripts/smoke.ps1 -Game <local title> -Seconds 60 -Title Retail, offline release builds on the RX 580, XCL_ASYNC_PSO=0 and fresh title data for every run. From empty caches, main showed 291 frames at 12,162 MB and the PR showed 399 frames at 12,206 MB. The two blocks below used byte-identical warm caches, with 896 pairs of matching translated shader payloads and 897 shared DXIL entries. All four runs exited normally with zero crashes and device removals.

xcl-smoke v1
commit: 50a9fdef81cb796b8756a31defb0648301d002ce
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13836 MB
xcl-smoke v1
commit: a971a8ab36ecb38257f42476329004513c13492a
gpu: Radeon RX 580 Series
title: Retail
seconds: 60
exit: 0x0
frames shown: 1651 (PresentX 1651)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13841 MB
Historical retail runs on `fcc8247` and its predecessors

After pushing fcc8247, I ran scripts/smoke.ps1 -Game Retail -Seconds 60 on both release builds with XCL_ASYNC_PSO=0 and a fresh title data root for each run. All eight runs exited normally with zero crashes or device removals.

Starting DXIL cache and run order Frames, main / PR Peak process commit in MB, main / PR
Empty, main first 414 / 328 12,144 / 12,365
Matched warm cache, PR first 1,672 / 1,666 14,311 / 14,577
Matched warm cache, main first 1,671 / 1,666 14,184 / 14,442
Empty, PR first 394 / 339 12,455 / 12,341

The four warm runs started with byte-identical copies of the same 3,061-file cache. Each copy held both builds' original translated entries for 1,020 shared shader keys with matching DXIL and sampler payloads.

With empty caches and main first, the PR showed 79.2% of upstream's frames, below the 80% threshold. Reversing the order, the PR showed 86.0% of upstream's frames and met both thresholds. Both matched warm-cache pairs passed within six frames of main.

Earlier cache comparisons on the identical source tree

Previous head 54d5cd78da13 and the same upstream parent. Each row is a 60-second main/PR comparison.

Starting DXIL cache and run order Frames, main / PR Peak process commit in MB, main / PR
Empty, main first 395 / 350 12,404 / 12,383
Each build's own warm cache, main first 1,675 / 1,669 14,401 / 18,181
Copy of upstream's warm cache, PR first 1,673 / 1,550 14,386 / 22,039
Both revisions' entries, PR first 1,668 / 1,672 14,457 / 14,539
Both revisions' entries, main first 1,674 / 1,669 14,174 / 14,453

The first warm pair exceeded the 25% peak-commit limit (+26.2%). Using upstream's cache alone also exceeded it. XCL keys its translated entries by compiler source, so the PR had to translate again with that upstream-only cache. For the last two pairs, I verified the cached DXIL and sampler payloads matched for 1,020 shared shader keys, kept the original entries under each build's own key, and gave all four runs byte-identical copies of the resulting cache.

Not tested

Translation time at a971a8ab36ec, asynchronous PSO creation, later gameplay, or execution on another GPU at this head. The 4.1% timing in the historical results was measured on the earlier tree. Optional XCL_SAMPLE_* fixtures were unset in the workspace suites.

AI use

For the original series, OpenAI Codex used GPT-6.2 Astra (gpt-6.2-astra) at maximum reasoning effort (max) to write the optimization and regression test, rebase the patch, run the tests and comparisons and prepare this report.

OpenAI Codex in Orca, GPT-6.2 Astra (gpt-6.2-astra) at maximum reasoning effort (max), resolved the rebase, reviewed the complete diff on Philip’s behalf, ran the revision-specific checks, and updated the evidence.

@lows78

lows78 commented Nov 24, 2026

Copy link
Copy Markdown

Test report for #1573 at be200ab03d6b783e1e575ae693d225a0ba0f529a (clean tree; same file tree as the previous head 11cd98c), on an RTX 4090, to add a full-suite run without failures next to the RX 580 one. I am not a graphics developer: Claude Code ran this on my PC, and I can rerun things if that helps.

Tested

  • NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), Intel Core i9-14900KF, 32 GB RAM, Windows 11 Pro 10.0.26200, rustc 1.99.1 MSVC, DXC 1.8.2502.11, debug. XCL_SAMPLE_* unset.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4, one run per commit:
    • main 9e3831e: 776 passed, 0 failed, 41 ignored
    • this PR be200ab: 777 passed, 0 failed, 41 ignored
    • previous head 11cd98c: 777 passed, 0 failed, 41 ignored
  • SKIPPED, the same three on each: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
  • cargo test -p xcl --lib static_samplers -- --test-threads=4 on 11cd98c, 10 runs: 2 passed, 0 failed in each
  • constant_samplers from main against this PR's, called on the same decoded instructions (temporary test on 11cd98c, not part of the PR): 20,000 random sequences of s_mov_b32/b64, s_movk_i32, s_add_u32, v_mov_b32 and image_sample_lz with random block starts. 152,826 image instructions, 9,007 constant descriptors, all equal. With the PR's known.clear() removed, the same test fails.

Not tested

  • Translation time, retail titles (no smoke.ps1 run) and retail shaders, release builds, AMD, Intel, native wave64
  • The random sequences do not cover other scalar instructions that write SGPRs, or other image instructions

AI use

  • Claude Code, Claude Opus 5.5: ran the builds and tests, wrote the temporary test and this report

@nnonno91

nnonno91 commented Nov 24, 2026 •

Copy link
Copy Markdown

Retest of fcc8247a945560f0d288767260324d00204200d8 on Windows

  • The published head has the same Git tree as 54d5cd7 below. On the clean new head, cargo build --workspace --locked passed and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 859 passed, 0 failed, 42 ignored on each adapter. Both runs logged the heap_window_out_of_memory_falls_back_to_the_switch_form skip (heap windows off). The RTX 5090 also skipped gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no native wave64). These skips are included in Cargo's pass count.
  • I also compared current main at 9039900ba3710fda9d791db589d548b1aaeb3cf8 (includes Direct DXIL: memory windows through the descriptor heap (XCL_HEAP_WINDOWS) #1693) with a temporary local merge of this PR into it (tree ef008c6aba0e78b1f58fd40cf7b96cd609388e00). With XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, cargo test --locked -p xcl --lib gpu::recomp -- --test-threads=4 --show-output reported 194 passed, 0 failed, 18 ignored on main and 195 passed, 0 failed, 18 ignored with the PR on each GPU. The two RTX 5090 wave64 skips were the same on both trees. AMD logged no skips in this filter. The heap-window read/write and no-alias tests passed on both trees.
  • I reran the temporary one-window sampler probe below on both trees and both GPUs with the same command, adapting it to run split wave64 on the RTX 5090. All four invocations passed without skips. Both translators returned the expected point/linear/point values in wave32, AMD native wave64, and NVIDIA split wave64. All six generated HLSL and DXIL file hashes per adapter still matched between main and the local merge.
  • Same Windows, CPU, AMD driver, Rust, and DXC versions as below. The added adapter is an NVIDIA GeForce RTX 5090 (32.0.16.1742). OpenAI Codex (GPT-6 family, exact variant unavailable) adapted the probe, tested the new head and local merge, and updated this report.

Independent AMD check of both compiler paths at 54d5cd78da132668ee8a3be7ff239c83380b7f66 (rebased on c160d86ef2efe3a07e4dfb473e4fa72eafb413c0).

Tested

  • AMD Radeon(TM) Graphics (Ryzen 7 9800X3D integrated GPU, driver 32.0.21042.62), Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC, SDK DXC 1.8.2502.11. XCL_ADAPTER='AMD Radeon'. Unoptimized Rust builds, with debug info disabled on the PR.
  • cargo build --workspace --locked passed. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 859 passed, 0 failed, 42 ignored. One explicit hardware skip is included in the pass count (heap_window_out_of_memory_falls_back_to_the_switch_form, heap windows off). The bundled title passed.
  • With XCL_REQUIRE_GPU=wave64,mesh, cargo test --locked -p xcl --lib -- static_samplers --test-threads=1 --nocapture gave 2 passed, 0 failed, 0 ignored, 0 skips.
  • cargo test --locked -p xcl --test sampler_reuse_probe -- --exact reused_sampler_registers_match_across_compilers --test-threads=1 --nocapture ran the same temporary fixture at the base and PR (one pass each, no skips). A block with no image wrote to the sampler registers. The next block initialized them and reused those registers for three reads with point, linear, then point filtering. Both the HLSL and direct kernel translators produced exactly the expected two static sampler descriptors. Each generated kernel ran on the GPU in wave32 and native wave64. All four RGBA components per sample matched the expected bits for every lane, including red values 2.0 / 1.5 / 2.0.
  • SHA-256 matched base to PR for all six emitted files (HLSL source, DXC-compiled DXIL, and direct DXIL, for each wave size).

Not tested

Retail shader packs or titles, performance, or direct runtime routing through a title PSO.

AI use

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

@philip-roy-jones
philip-roy-jones force-pushed the recompiler-sampler-blocks-1269 branch from 54d5cd7 to fcc8247 Compare November 24, 2026 19:45
@DavidM1911

Copy link
Copy Markdown
Contributor

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

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

Thanks!

@ivall ivall added the goal:world-load Bears on the retail title getting past world loading label Nov 24, 2026
@Pipodi

Pipodi commented Nov 24, 2026

Copy link
Copy Markdown

Test report for fcc8247: one title run of the retail title, against main on the same machine. This PR does not change where the title stops presenting in its intro, at least on this card and in this setup.

Setup

  • RTX 4090 (driver 617.42), i9-13900K, 32 GB, Windows 11 Pro 26300, release.
  • main 689f2db against 689f2db + this PR (local merge, no conflicts).
  • Each run: 300 s, a new empty XCL_DXIL_CACHE, A pressed at 16 s and then every 15 s, XCL_NETWORK=0, default settings otherwise.
  • One run each.
main 689f2db + fcc8247
exit 0 0
frames shown 1,379 1,363
last 2 s window with presents 74.0 s 72.0 s
presents after it, to 300 s 0 0
skipped draws / dispatches 0 / 0 0 / 0
pipeline builds ≥ 2 s 0 1 (2.9 s, at 126 s)
peak commit 32.3 GB 32.1 GB

Both runs stop presenting at the same point and stay at 0 presents for the rest of the run. With one run each, this shows no change in the stop; it says nothing about the time this PR saves per translation.

Not tested: a warm cache, repeat runs, other GPUs.

AI use: Claude Code. Claude Sonnet 5.5 (a second session) made the two runs; Claude Opus 5.5 checked the counts against the run logs and wrote this report.

Sampler constants only reach an image instruction in the same block. Apply pending scalar writes at each image and discard them at the next block boundary. This skips register analysis on image-free blocks and after the last image in a block.

On the original PR head fcc8247, release translation of 54 retail VS, PS and CS programs took 81.15 ms against 86.50 ms on main c160d86. The generated HLSL and all 45 static sampler descriptors matched in that comparison.

Assisted-by: Codex (GPT-6.2 Astra, max reasoning effort)
@philip-roy-jones
philip-roy-jones force-pushed the recompiler-sampler-blocks-1269 branch from fcc8247 to a971a8a Compare November 25, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants