Repository navigation
Conversation
A retail title submits 200k+ shader blobs across parallel loading threads while >98% are duplicates of ~3.6k-19k unique shaders. Previously shader::capture held the global STATE mutex across readable(), heap-copying every duplicate into a Vec, fnv64(), and classify(), and then ran account_xbox() (FSSM decompression and RDNA2 disassembly) synchronously on the title's loading threads. Validate readable(), hash the slice in place without copying duplicates, and classify unique blobs outside STATE. Offload non-dump account_xbox() to a low-priority worker thread (xcl-shader-stats) that stats() flushes with a bounded wait before reading STATE so report.json and e2e counts stay identical. Assisted-by: Antigravity IDE (Gemini 4 Neon)
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Test report for exact head Tested
main: PR: Not tested: AMD, the head merged onto current AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety by a Claude Opus 5.5 sub-agent before it was built. |
|
AMD run on the exact head Tested
Not tested
AI use
|
|
Linux / AMD RDNA4 (RADV) test report for head Environment
Tested (debug test binary under Wine,
Not tested: full workspace suite, retail title run, native Windows. AI use: T3 Code / Antigravity (Gemini 4 Neon) merged, built, ran the tests on this machine, and drafted this report. |
Move shader validation, in-place FNV-1a hashing, and container classification outside the global
STATElock ingpu::shader::capture, and offload non-dumpaccount_xboxFSSM decompression and RDNA2 instruction counting to a low-priority background worker flushed byshader::stats().A retail title submits 200k+ shader blobs across parallel loading threads while >98% are duplicates of ~3.6k-19k unique shaders (e.g. 204,736 submissions for 3,579 unique shaders in the first 60 s, 15.67M RDNA2 instructions). Previously
shader::captureheld the globalSTATEmutex acrossreadable(), heap-copying every duplicate into aVec<u8>,fnv64(), andclassify(), and then ranaccount_xbox()synchronously on the title's loading threads.What is in it
crates/xcl/src/gpu/shader.rs: runreadable()andfnv64()directly on the borrowed slice outsideSTATE, skip allocatingVec<u8>on duplicate hashes, avoidStringallocations on existing stage/kind keys, classify unique blobs outsideSTATE, and offload non-dumpaccount_xbox()to a low-priorityxcl-shader-statsworker thread with a bounded flush instats().crates/xcl/src/gpu/shader.rs: unit tests covering concurrent multi-thread deduplication, deterministic worker flush onstats(), and unreadable-pointer rejection.Tested
rustc 1.98.0-nightly (096694416 2026-06-29)(x86_64-pc-windows-msvc), Windows SDK DXC 1.8.2502.11 (10.0.26100.0).cargo test -p xcl --lib gpu::shader::tests: 7 passed, 0 failed, 0 ignored..\scripts\test.ps1(debug): 675 passed, 3 failed (pre-existing Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718 cubemap reuse flakeplaced_title_textures_share_vram_and_preserve_pixels+ 2PoisonErrorcascades), 21 ignored; 2 GPU tests skipped (no wave64:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware). On a second lib run (cargo test --workspace --tests -- --test-threads=4), all 3 Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718 tests passed (677 passed, 1 failed from pre-existing Memory: a sparse alloc/free loop makes a new 64 MiB pool each cycle; lib tests fill a 12 GB card (#348's test) #913 OOM incross_queue_cycle_and_same_queue_fifo_do_not_deadlock, which passed in isolation: 1 passed, 0 failed).cargo test -p xcl --test '*' -- --test-threads=4(all integration tests includinge2e.rs): 41 passed, 0 failed, 20 ignored.scripts/smoke.ps1):report.jsonpreserved exactunique=3579,rdna2_instructions=15665903,xbox_hw_stages={"CS":2734,"PS":508,"VS":228}on bothmainand PR head, while frames shown increased from 500 to 694 in 60 s.Regression run
main:
PR:
Not tested
XCL_DUMP_SHADERS=1disk dump path (behavior unchanged, not exercised during smoke run).XCL_SAMPLE_*sample-data tests (environment variables unset).AI use
shader::capture, wrote the implementation, unit tests, commit message, and PR description; all builds, tests, and smoke runs were executed on the hardware named above.