Shaders: support pixel shaders and direct DXIL in --measure-pso #2438
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!2438
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2438"
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?
@emusynths on GitHub · 2026-11-25 18:54 UTC · original
emusynths:nvidia_pso_compilation_wall→main· +424 −37 · 4 files · 1 commits · openExtend
xcl shaders --measure-psoso it can time cache-offCreateGraphicsPipelineStatefor console pixel shaders (in addition to compute shaders) and followXCL_DIRECT_DXIL(1for CS,allfor CS/PS) alongsideXCL_HEAP_WINDOWS. This gives workstreams 5 and 6 a reproducible upstream tool for measuring the cold NVIDIA graphics/PS compilation wall without a private local harness.Part of #2088.
What is in it
crates/xcl/src/shaders.rs: addpixel_interface,measure_passthrough_vs_hlsl,measure_graphics_rtv_dsv, andmeasure_graphics_pso_descto synthesize a minimal matching passthrough VS and RTV/DSV formats fromPsInterface, updatemeasure_pso_resultto handle both compute and pixel containers across HLSL andXCL_DIRECT_DXIL, and add unit/GPU tests (passthrough_vs_and_rtv_formats_match_ps_interface,pso_measurement_compiles_an_exact_synthetic_pixel_record,passthrough_vs_links_with_translated_pixel_shader).Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, debug tests / release smoke runs.Regression run
60 seconds per build, XCL_PRESS_AT=18:A,30:A,44:A,52:A and XCL_FRAME_DUMP=300.
main
PR head
Not tested
AMD, Intel, native wave64 and title-specific blend or vertex shader state on this revision.
AI use
@emirduran707 on GitHub · 2026-11-25 19:13 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
6bd684d5aac41b4ed07827e801fe5aadd9cd3cf6(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1350 passed, 3 failed, 46 ignored; 9 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;shaders::tests::pso_measurement_compiles_an_exact_synthetic_recordandshaders::tests::pso_measurement_compiles_an_exact_synthetic_pixel_record— both skipped because Windows Developer Mode is off so the driver cache cannot be disabled).shaders::tests::passthrough_vs_and_rtv_formats_match_ps_interfaceandshaders::tests::passthrough_vs_links_with_translated_pixel_shaderran and passed.main:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722) andfuzz_validate_and_gpu_3(seed 1599) on this GPU, plusgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier(from50a9fde/ #2074, fixed later onmainin #2420).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
pso_measurement_compiles_an_exact_synthetic_pixel_record(skipped: Developer Mode off); D3D12 debug layer; Intel GPUs.AI use
@SlopTart on GitHub · 2026-11-25 19:46 UTC · original
gpu_suite (cold cache): 160 passed / 4 failed, no crashes. Three are the known baseline trio on this lane; the fourth isgpu_promoted_uav_clear_values_pass_create_committed_resource, newly red on main since #2280 (report), unrelated to this PR.Targeted run of
passthrough_vs_and_rtv_formats_match_ps_interface,passthrough_vs_links_with_translated_pixel_shader,pso_measurement_compiles_an_exact_synthetic_pixel_recordand friends: 4 passed.@DavidM1911 on GitHub · 2026-11-25 20:04 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1 real failure, deterministic (also fails--test-threads=1, 1219/1):The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.
— Devin
@thehollowedone on GitHub · 2026-11-25 21:19 UTC · original
Independent synthetic NVIDIA check of #2438 head
6bd684d, aimed at the requested graphics-descriptor coverage. This was the PR head plus one uncommitted test-only fixture in a disposable checkout; the production code was unchanged.On Windows 11 build 26300, RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, DXC 1.8.2502.11, I compiled synthetic HLSL pixel shaders, paired them with the PR's
measure_passthrough_vs_hlsl, built descriptors throughmeasure_graphics_pso_desc, and called nativeCreateGraphicsPipelineStatewith the D3D12 debug layer enabled:SV_Target0, unbound slot 1, uintSV_Target2;NumRenderTargets=3, slot 1UNKNOWN, other slotsR32G32B32A32_FLOAT/_UINT. Creation passed.SV_Depth,NumRenderTargets=0,DSVFormat=D32_FLOAT. Creation passed.SV_Target0plusSV_Coverage: confirmed support for four samples, then changedSampleDesc.Countfrom the CLI's 1 to 4 for this test only. Creation passed.cargo test --offline --locked -p xcl --lib shaders::tests::synthetic_graphics_pso_descriptor_variants_create_on_gpu -- --exact --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored, 0 skipped (all three cases). D3D12 InfoQueue reported 0 error/corruption messages. This local fixture is not yet a committed regression test.Not tested: cold
ShaderCacheControltiming (it returns0x887A002Don this setup), a real retail pixel shader pack, graphics execution/readback, or the title's actual graphics PSO descriptor. The four-sample override does not mean the current CLI measures MSAA PSOs.AI-assisted: Codex (GPT-6, exact variant unavailable) wrote and ran the local fixture and drafted this report.
@emusynths on GitHub · 2026-11-25 21:32 UTC · original
@bmjask, please take another look at c636e54. The RTX 5090 now creates depth-only, sparse mixed-format, and 4× MSAA coverage PSOs in the GPU tests. A new end-to-end test verifies that the CLI uses four samples, and a retail cache-off CLI run succeeded. The PR description has the full-suite results and post-push smoke pair. Thanks to @thehollowedone for the independent debug-layer check on the earlier head.
@thehollowedone on GitHub · 2026-11-25 22:39 UTC · original
Independent Windows/NVIDIA check of #2438 head
c636e54on an RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1, DXC 1.8.2502.11. The checkout was clean for these stock results:cargo test --offline --locked -p xcl --lib measure_graphics_pso_links_representative_pixel_signatures -- --test-threads=1 --nocapture: 1 passed, 0 failed, no skip. The stock test creates depth-only, sparse mixed-format render-target, and 4× MSAA coverage PSOs.cargo test --offline --locked -p xcl --lib pso_measurement_compiles_an_exact_synthetic_pixel_record -- --test-threads=1 --nocapture: 1 passed, 0 failed, no skip, withXCL_D3D12_DEBUGunset.cargo test --offline --locked -p xcl --test shaders_e2e measure_pixel_pso_uses_requested_samples -- --test-threads=1 --nocapture: 1 passed, 0 failed, no skip; its assertion checksgraphics PSO samples: 4and the cache-off result.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,428 passed, 0 failed, 46 ignored across 37 test binaries. 26 explicitSKIPPEDnotices: 21 no wave64, 3 unsupported f16 forms, 1 no heap windows, and 1 existing compute PSO cache-control check rejected by the driver with0x80070057. All three focused tests above ran and passed in this suite.I also reproduced a separate debug-layer initialization bug in the pixel PSO measurement path: setting
XCL_D3D12_DEBUG=1made the stockpso_measurement_compiles_an_exact_synthetic_pixel_recordfail twice atCreateRootSignaturewith0x887A0005(device suspended).measure_pso_resultcreates a device throughPipelines::new, then callsrunner::graphics_wave32(); runner initialization enables the debug layer after the first device exists. The Agility helper already warns that late enabling can remove an existing device.This five-line local change in
Pipelines::newenables the requested layer before it creates its device:With that isolated, uncommitted change, the previously failing focused test passed 1/0 under
XCL_D3D12_DEBUG=1; the representative graphics PSO and CLI 4× sample tests also passed 1/0 each, with no skips. The full-suite counts above are from the unmodified PR head. No retail title or AMD hardware was tested. AI use: Codex (GPT-6; exact variant unavailable) traced the code, wrote and ran the local fix, and drafted this report.@DavidM1911 on GitHub · 2026-11-26 02:12 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.