Repository navigation
Conversation
…README Integrates 10 open upstream PRs on top of upstream/main (c160d86): - xcl-dev#1643: per-queue cpu_writes worker threads (eliminating cross-queue head-of-line stalls) and atomic 64-bit immediate writes - xcl-dev#1618: skip DXC validator where the runtime accepts the BYPASS hash - xcl-dev#1535, xcl-dev#1536: PresentX COPY_SOURCE barrier and sparse upload COMMON state transitions - xcl-dev#1516: route stream graphics PSO creation through tracked path - xcl-dev#1478: avoid taking sparse state lock on resource final Release - xcl-dev#1473: implement S_QUADMASK_B32 and S_QUADMASK_B64 - xcl-dev#1621, xcl-dev#1625: frame clock revalidation and short uncompressed DirectStorage request zero-padding - xcl-dev#1557: accept no buffer context before Start in XMA2 voice test under Wine Verified under GE-Proton11-14 + vkd3d-proton ec20719452e916b: - Release build (x86_64-pc-windows-msvc): ok (32.14s) - Proton unit tests (heap_window_tests, dxil::core_tests, cpu_writes, frame, sparse, present, dstorage, xma2_source_voice, gpu_sparse_vram_descriptors_buffers_and_xmem, gpu_valu_float_and_int): 71 passed, 0 failed, 2 ignored, 0 skipped.
793c947 to
8b9fec0
Compare
|
Updated independent Windows / NVIDIA GPU verification on the rebased head Tested
Code review
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
|
@DavidM1911 yep doing it as soon as i have time. |
8b9fec0 to
b6f4f75
Compare
|
@DavidM1911 No more merge conflict if you want to test |
|
Diff audit on Only item needed before merge is an AMD (and/or Intel) verification pass on |
b6f4f75 to
a197d9e
Compare
Every DXC compile runs dxil.dll's validator, which signs the container: D3D12 refuses DXIL without a valid hash. Since xcl-dev#1426 XCL computes that hash itself (gpu::dxil::container::hash, the retail DXBC digest). A title's compiles and xcl shaders --precompile now run DXC with -Vd and sign the container here: the same bytes as before, without the validator's run. On 253 programs of a retail pack (every 100th, DXC 1.8.2502) the validator was 6.4 % of DXC's time (333.2 s -> 311.8 s one compile at a time, 7.4 % on the 1-8 MB programs) and refused none of them. For all 253, the digest of the -Vd container equals the signature dxil.dll wrote, and the rest of the container is identical. Tests keep the validator as their oracle, and XCL_DXC_VALIDATE=1 keeps it for a title too. Part of xcl-dev#1269.
a197d9e to
80fb8a4
Compare
|
Thanks for the audit. I have no AMD or Intel card, so those stay under Not tested. The driver gets the same bytes it gets on Since your audit the PR was rebased twice, onto |
|
@DavidM1911 Rebased again, onto |
Part of #1269.
Every DXC compile runs
dxil.dll's validator, which signs the container: D3D12 refuses DXIL without a valid hash. Since #1426, XCL computes that hash itself (gpu::dxil::container::hash, the retail DXBC digest). A title's compiles andxcl shaders --precompilenow run DXC with-Vdand sign the container in XCL: the same bytes as before, without the validator's run. On 253 programs of the retail title's pack the validator was 6.4 % of DXC's time and refused none of them.(The first revision of this PR used the runtime's BYPASS hash instead; it was reworked onto #1426's digest once that was merged, so it no longer depends on the runtime and the caches see the same DXIL as before.)
What is in it
crates/xcl/src/gpu/recomp/dxc.rs:compile_without_validator()turns it on for the process (XCL_DXC_VALIDATE=1keeps the validator);compile_hereadds-Vdandsignwrites the digest into the container DXC left unsigned. Tests:unsigned_containers_get_the_hash_the_validator_writes(four DXC-signed containers oftests/data/dxilget their own hash back after it is zeroed) andunvalidated_compiles_give_the_validators_container(a CS and a PS through DXC both ways: the same bytes).crates/xcl/src/host.rs: the title host turns it on.crates/xcl/src/shaders.rs:xcl shaders --precompileturns it on. The unit tests do not: the validator stays their oracle.README.md: one line.Tested
NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.24), AMD Ryzen 9 7900X, 32 GB RAM, Windows 11 Pro 26200, rustc 1.100.0
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0); tests in debug, runs in release.cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4onmain06c9f55with this change: 1267 passed, 0 failed, 46 ignored. SKIPPED: 21 GPU cases for want of wave64 on this card (among themgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,dispatch_chain_native_wave64_builds_wholeand thelower/lower_dxilwave64 comparisons), 3lower_dxilf16 / f32 per-lane cases the per-lane form refuses, andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Seen while testing, in code this PR does not touch:
06c9f55, the first suite run: the lib test binary stopped on a device removal (0x887a0006, device hung) while thehle::d3d12x::list_xcross-queueWait64BitValueXtests ran (the log ends withcross_queue_cycle_and_same_queue_fifo_do_not_deadlock's>= 0x702waits). The lib tests never turn this PR's path on (only the title host and--precompiledo); the lib binary alone, and then the whole suite above, passed.f087b99(the previous base): two tests failed with and without this change; Tests: two expectations that no longer match the code #2245 has fixed both onmain.c160d86:concurrent_cache_misses_compile_oncefailed once on its timing check (cached-only waited 1.09 s, limit 200 ms) and passed in the next run.With the
signcall removed,unvalidated_compiles_give_the_validators_containerfails; with the digest taken over the wrong bytes, both new tests fail.DXC time with and without the validator, on 253 programs of the retail title's
shaders.rpf(every 100th by name:xcl shaders --recompwithXCL_DUMP_HLSL,XCL_RECOMP_WINDOWS=4), with XCL's arguments (-HV 2021,-O1over 1 MB of HLSL) and the SDK'sdxc.exe, one compile at a time, the order alternating per program:-Vd-O1)All 253 compile both ways and the validator refused none. For all 253,
container::hashof the-Vdcontainer equals the hashdxil.dllwrote, and the rest of the container is identical.The same 253 in one process on 23 threads, one
IDxcCompiler3per thread as in XCL's pool: 38.8 s and 37.5 s validated, 35.8 s and 37.3 s with-Vd(alternating; the largest programs set the wall time); peak commit 3.7 – 3.8 GB either way.Retail title, 60 s runs of
scripts/smoke.ps1on the working tree before the commit, onc160d86: from an emptyXCL_DXIL_CACHE, the log hasDXC: compiles skip dxil.dll's validator and are signed by XCL, 12 compiles, 0 failures, 0 failed pipelines, 1393 frames; all 12 containers carry the correct hash and are byte for byte the onesmain's validator made for the same programs in its own run from an empty cache. On06c9f55, with the shared warm cache: 1593 and 1643 frames (main06c9f55: 1555 and 1625). No device removal or crash in these runs. The title stays in its menus in 60 s, so they show the output is unchanged, not a speed-up.One run of an earlier head (
8b9fec0, onc160d86) ended at 34.6 s with an access violation intitle_textures::refresh→subresources→ the detiler, reading title memory that was no longer mapped (the class of Textures: safe texture::uma_bytes constructs &'static [u8] over uncommitted sparse UMA windows #1393). This PR does not touch that path; the next run of the same build was clean, and no run of this change or ofmainon this machine has crashed since.Regression run
main(06c9f55), the second of two runs (the first showed 1555 frames):this PR's head:
Not tested
XCL_DXC_VALIDATE=1brings the validator back for a title.AI use