Shaders: --precompile --used-only builds only the pipelines a title used #1982
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1982
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1982/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Eterst on GitHub · 2026-11-25 00:22 UTC · original
Eterst:shaders/precompile-used-only→main· +45 −3 · 4 files · 1 commits · merged 2026-11-25 01:53 UTCxcl shaders <pack> --precompile --pipelines --used-onlybuilds only the compute programs whose pipeline an earlier run of the title used. A retail pack's ~2 700 compute programs take a 32-lane NVIDIA card's driver hours, most of them programs the title never binds in the part it reached. The runtime already notes every pipeline a title uses by a hash of its shaders (used-pipelines.txtbeside the DXIL cache, read bypso_asyncto build them ahead in the next run); this reads the same file and computes the same key. Part of #1269.What is in it
crates/xcl/src/shaders.rs:--used-only,used_compute(the pipeline key of a compute program as the runtime makes it,real::shaders_keyof the one shader), the count of programs passed over in the summary; testused_only_keeps_the_compute_programs_an_earlier_run_used.crates/xcl/src/hle/d3d12x/pso_async.rs:earlier_used_keys()readsused-pipelines.txtwith the existing parser.crates/xcl/src/hle/d3d12x/real.rs:shaders_keyispub(crate).README.md: the option, next to--pipelines.Tested
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on354ce0c: 975 passed, 1 failed, 45 ignored; the failure ishle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory, which fails now and then onmaintoo on this machine (3 of 8 parallelmainruns);cargo test -p xcl --lib -- --test-threads=4again: 927 passed, 0 failed, 25 ignored. SKIPPED on this adapter: the same no-wave64 GPU tests as onmain.used-pipelines.txtof a few title runs (1 221 keys),XCL_DIRECT_DXIL=1: 824 compute programs built, 1 865 passed over, 0 errors in 43 min. The title then made its compute pipelines from those driver blobs.Regression run
main:
this PR:
Not tested
shaders_keybecomingpub(crate); the smoke runs do not use the new option.used-pipelines.txtuntil a run reaches them; a full--precompilestill builds everything.AI use
🤖 Generated with Claude Code
@raylitebull on GitHub · 2026-11-25 01:13 UTC · original
Code review on
354ce0c:pso_async::earlier_used_keys()(used-pipelines.txt), exposingreal::shaders_key(pub(crate)), and filtering compute precompilation viaused_computewhen--used-onlyis set (used_only_keeps_the_compute_programs_an_earlier_run_used) are clean and well-scoped.CIworkflow approved (currently running).Remaining before merge:
Build and test (Windows, no GPU)finishing green plus an AMD verification pass on354ce0c.@futurepro62 on GitHub · 2026-11-25 00:57 UTC · original · edited 2026-11-25 01:19 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
354ce0c(on its base689f2db).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 966 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.used_only_keeps_the_compute_programs_an_earlier_run_used.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 975 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main7994cd1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@JJAutoCompare on GitHub · 2026-11-25 01:45 UTC · original
PR #1982 test report
xcl-dev/xcl— Shaders:--precompile --used-onlybuilds only the pipelines a title used.354ce0c7189d0820ddf7d05bc5c662013ff7a5f4, fetched fromrefs/pull/1982/headonorigin.origin/mainat86719eec1e9fc4c36c5fb568ec4951fd47a31b88.git merge-tree --write-tree origin/main HEADexited 0 and produced tree995d6d1a3b7265a83eb20460ccc3a5374e91969a. The tracked checkout was clean.L:\XclTooling\neon-slot-3slot because it lacked a Git checkout. The run used the slot's target, temp and DXIL cache directories.Tested
32.0.101.9175,DoublePrecisionFloatShaderOps=0, wave range 8–32), Windows 11 Enterprise Evaluation build26200.9974, DXC/DXIL1.9.2609.5.rustc -Vreportedrustc 1.100.0 (0ef1bc386 2026-11-09). Cargo dev/test profiles, unoptimized with debug symbols and incremental compilation disabled.cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the GPU lock.cargo test -p xcl --lib <filter> -- --show-outputran each ofused_only_keeps_the_compute_programs_an_earlier_run_used,the_keys_of_a_file_are_read_and_other_lines_passed_overanda_pipeline_an_earlier_run_used_is_built_ahead_of_its_first_useoutside the lock. Each returned 1 passed, 0 failed, 0 ignored and 0 skipped.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputran once underInvoke-ArcTest.ps1with process-local execution policyBypassandXCL_ADAPTER=A770. Cargo exit 101. Across 19 test binaries and one doc-test target, Cargo reported 951 passed, 25 failed, 45 ignored. The 951 include 15 tests that emitted 25SKIPPEDnotices. The skipped tests and subcases do not count as coverage. The two failing targets werexcl --lib(24) andxcl --test e2e(1).L:\XclTooling\neon-slot-3\tmp\pr1982-suite.log.Failures
CreateComputePipelineStatereturned0x80070057in 20 tests.gpu::dxil::fuzz_tests—fuzz_validate_and_gpu_0(seed 2),fuzz_validate_and_gpu_1(506),fuzz_validate_and_gpu_2(1003),fuzz_validate_and_gpu_3(1501).gpu::dxil::ops_tests—doubles_match_cpu,groupshared_barrier_and_atomics_run.gpu::dxil::round_tests—gpu_direct_f32_round_modes_static,gpu_direct_f32_round_modes_dynamic_and_denormals.gpu::recomp::lower_dxil::tests—f64_programs_on_the_gpu.gpu::recomp::tests—gpu_clamp_and_omod_per_instruction,gpu_f64_literal_high_word,gpu_f64_compares_with_nan,gpu_f64_class_compare,gpu_f64_roots,gpu_f64_math_random,gpu_f64_rounding_and_conversions,gpu_frexp_f64_exp_and_mant,gpu_float_compares_random,gpu_ldexp_f64,gpu_rndne_f64.gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction—v_fma_f32overflow control returned bits2139095040, expected1946157055.gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips— pixel (0,0) measured 25.609375, expected 26.gpu::recomp::tests::gpu_valu_16_and_64_bit— lane 0v_add_f16failed the high-half preservation assertion.gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions— pixel 0 min/sum reduction returned[2, 217, 2], expected[2, 216, 2].e2e::test_title_runs_and_game_folder_is_untouched— dynamic depth bias (RSSetDepthBiasX(-1000.5), #94) produced a blue top-right pixel, expected green.SKIPPED notices
Not tested
--precompile --used-onlybehavior and the requiredscripts/smoke.ps1 -Game <folder>comparison between main and PR head. Main was checked for mergeability only, so the test failures have no same-run baseline.XCL_SAMPLE_*paths. No sample variables were set for this run.AI use
T3 Code / Codex (gpt-6.2-sol) ran the build and tests and drafted this report. Coordinator #2 (T3 Code / Antigravity,
gemini-4-neon) verified the counts againstpr1982-suite.logand published this report.@DavidM1911 on GitHub · 2026-11-25 03:31 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!