Shaders: support pixel shaders and direct DXIL in --measure-pso #2428
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by emusynths on 2026-11-25T18:54:29Z.
Extend
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.c636e54230. cargo build --workspace succeeded. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output reported 1424 passed, 4 failed, 46 ignored and 26 SKIPPED notices (1 driver cache control, 1 heap windows unavailable, 21 no wave64, 3 unsupported per-lane translation). The four NVIDIA compute fuzz failures match #1905.6bd684dwith a local test fixture reported successful sparse MRT, depth-only, and four-sample coverage PSO creation with zero error/corruption messages. That run used a test-only sample-count override. Report by thehollowedone.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
Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T19:13:53Z.
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
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T19:46:25Z.
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.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:04:29Z.
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
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:28:31Z.
Review: COMMENTED
No concrete source-level defect found. High-merit measurement functionality, but not merge-ready: the current head has no Windows Build/test check, and real GPU validation covers only one synthetic pixel shader. Please add representative CreateGraphicsPipelineState coverage for depth-only, coverage/MSAA, sparse/non-contiguous RT outputs, and varied formats—or explicitly narrow supported inputs—then provide current CI. The CLI is also not covered by the smoke run.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T21:19:08Z.
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.
Imported from ivall/xcl. Originally posted by emusynths on 2026-11-25T21:32:03Z.
@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.Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T22:39:38Z.
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.upstream-sync referenced this pull request2026-11-26 02:08:26 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:12:21Z.
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
upstream-sync referenced this pull request2026-11-26 05:05:05 +00:00
xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2580Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:04:55Z.
Triage (#1607) – head
90bfbd4#1802 also adds direct DXIL to
--measure-pso, for compute only, through a--backendflag and with--json. This PR followsXCL_DIRECT_DXILinstead and adds pixel shaders (a synthesized pass-through VS, RT/DSV formats from the PS signature,--pso-samples). The two overlap only in the direct compute path and conflict inmeasure_pso_result; whichever merges second needs to adapt. Main'smeasure_pso_resultstill takes compute records through DXC only.No problems found in the diff. The failing check is the PR description check, and the branch conflicts with main.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.