Repository navigation
xcl run: shader preparation in worker processes, only what earlier runs used; upstream main; sampler fix - #2624
Conversation
A placement sweeps pages belonging to unrelated targets idle for two seconds. Comparing device-wide bytes before and after the second cube can therefore fail when those old targets expire. Snapshot the mapped title-page and extra-page pool/tile identities for the cube and require the new and original resources to share all of them. Keep the existing placement-growth, reclamation and pixel-readback checks.
The existing PendingWait checks construct the comparison directly, and the submission check manually pushes a 32-bit wait. Exercise wait64_x itself so interpreting the trailing flags slot as a mask cannot return unnoticed. Check high counter bits, garbage flag upper halves, unfinished and equal counters, and the unchanged Wait32 mask; an already satisfied Wait64 must keep the submitted batch together. The production correction from Sr-0w PR #218 is already in upstream d4f17ca. This commit ports only the two original synthetic controls from42297943db3cfd4cf14ee37a7a0a53b8888d0d2c, byte-identical. Earlier separate negative controls captured both incorrect stored mask and a 2000ms false timeout/batch split with the old behavior. Fresh release focused run on official508a0c7 plus these tests:2passed,0failed,0ignored. Broader validation follows on this clean head. Assisted-by: OpenAI Codex (exact model variant not exposed)
The title-texture and VRAM tests serialise on TEST_LOCK and VRAM_TEST_LOCK and took them with .lock().unwrap(). When one holder panics (on main, placed_title_textures_share_vram_and_preserve_pixels fails on RDNA2, the packed-mip case #470 fixes), the mutex is poisoned and every later test that takes it fails with PoisonError, though it passes alone: transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory. The locks guard no data, so take them the way the crate's other test locks already do (ASYNC_TEST_LOCK, READING_CB_TEST_LOCK): unwrap_or_else(|e| e.into_inner()). Test code only. Measured on an RX 6650 XT, cargo test --workspace -- --test-threads=4: lib tests 647 passed, 3 failed before; 649 passed, 1 failed after. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A DPP instruction's text stopped at its registers too: the control that says which lane each lane's first source comes from (quad_perm, row_shl / shr / ror, row_mirror, row_half_mirror, row_share, row_xmask), the row and bank masks, bound_ctrl, fi, the sources' neg / abs and the DPP8 lane selects were left out, so `v_mov_b32_dpp v5, v1` stood for every one of them. The recompiler reads all of these; only the printed line dropped them. The text follows LLVM's: all 2229 lines of its gfx10 DPP16 and DPP8 tests in tests/data/llvm-amdgpu now read the same (none did), apart from the implicit vcc operands and the `_dpp8` suffix this disassembler has. A control RDNA2 has no name for is printed as `dpp_ctrl:<number>`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
D3DMetal (macOS, CrossOver) has no WARP adapter: EnumWarpAdapter returns 0x887A0004 (DXGI_ERROR_UNSUPPORTED), and the unwrap panics. The test uses WARP to exercise write_frame's decoder without a physical GPU, so it now reports "no WARP" through runner::skip_test, like the other d3d12x tests that need a device, and returns. Windows has WARP, so nothing changes there. (#258) Assisted-by: Claude Code (Claude Opus 4.6 wrote the change; Claude Opus 5.5 rebased it onto 077ce40 and switched it to skip_test)
gpu_depth_buffer_created_for_unordered_access_is_placed (#1353) first checks that a depth buffer without the UAV flag can't be placed in UNORDERED_ACCESS. Microsoft's D3D12 runtime refuses that state; vkd3d-proton under Wine does not validate it and creates the resource, so the test failed on every Linux run although the state XCL asks for (DEPTH_WRITE, from pc_initial_state) is accepted there too. The refusal is now asserted only when not under Wine; the rest of the test is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add integration contract tests for the raw x64 thunks emitted by crates/xcl/src/hle/d3d12x/guard.rs (make_guard, make_split, make_layout_split, make_tracer, make_call_tracer) using a mapped executable call trampoline so game-image caller paths are exercised alongside non-game runtime callers. Verified 3x via cargo test -p xcl --test d3d12x_guard_contract -- --test-threads=2 (5 passed, 0 failed, 0 ignored).
Adds host-driver parity integration tests for ID3D12Device::CreateCommittedResource (slot 27, Part of #480) comparing buffers, 2D/3D/RT/DS textures, invalid descriptors, and unknown console IID fallback against the unhooked PC driver on the same adapter. Verified with cargo test -p xcl --test d3d12_create_committed_resource -- --test-threads=1 (2 passed, 0 failed on NVIDIA GeForce GTX 1660 SUPER). Assisted-by: Antigravity (Gemini 4 Neon)
…gainst host D3D12 Adds host-driver parity integration tests for ID3D12Device::CreateDescriptorHeap (slot 14), GetDescriptorHandleIncrementSize (slot 15), and CreateFence (slot 36) (Part of #480) comparing descriptor layouts, increment sizes, fence values/Signal, ppv == null, invalid descriptor handling, and console IID fallback against the unhooked PC driver. Verified with cargo test -p xcl --test d3d12_descriptor_heap_and_fence -- --test-threads=1 (3 passed, 0 failed on NVIDIA GeForce GTX 1660 SUPER). Assisted-by: Antigravity (Gemini 4 Neon)
…est's heap D3D12CreateDevice gives every test the process's one device. Once another test adopted it (gpu_placed_console_depth_target_with_clear_value and others), the buffer coherent_buffer_sanitizes_console_flags_and_state places on its imported heap is adopted too, and its last Release goes to late_release::hold. While a queue of a test running in parallel still has work, the buffer is held, the heap pins the pages, and VirtualFree fails with ERROR_INVALID_PARAMETER (87). The test now retries VirtualFree for up to 10 s and still asserts that it succeeds. Part of #1487. Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add host D3D12 parity integration tests for ID3D12Device::CreatePlacedResource (slot 29), extending #480 without requiring retail game files or console DLLs: - Compare DEFAULT/UPLOAD/READBACK placed buffers (with Upload Map/Unmap write-read) against the unhooked PC driver on the same adapter. - Compare non-RT/DS textures (R8G8B8A8, BC1) and RT/DS textures (RTV/DSV with clear values) against the host driver. - Verify misaligned/out-of-bounds offset and null descriptor error parity, plus unknown console IID fallback to ID3D12Resource. Verified locally with: cargo test -p xcl --test d3d12_create_placed_resource -- --test-threads=1 (3 passed, 0 failed) Assisted-by: Antigravity (Gemini 4 Neon)
…t D3D12 Add host D3D12 parity integration tests for ID3D12Device::CreateQueryHeap (slot 39) and ID3D12Device::CreateCommandSignature (slot 41), extending #480 without requiring game files or console DLLs: - Compare OCCLUSION, TIMESTAMP, PIPELINE_STATISTICS, and SO_STATISTICS query heaps against the unhooked PC driver, plus invalid descriptors and unknown console IID fallback to ID3D12QueryHeap. - Compare DRAW, DRAW_INDEXED, and DISPATCH command signatures against the host driver, plus invalid strides/argument counts/node masks and unknown console IID fallback to ID3D12CommandSignature. Verified locally with: cargo test -p xcl --test d3d12_query_and_command_signature -- --test-threads=1 (2 passed, 0 failed) Assisted-by: Antigravity (Gemini 4 Neon)
…3D12 Add host D3D12 parity integration tests for CreateCommandQueue (slot 8), CreateCommandAllocator (slot 9), CreateCommandList (slot 12), CreateCommandList1 (slot 51), and CreateRootSignature (slot 16), extending #480 without requiring retail game files or console DLLs: - Compare DIRECT/COMPUTE/COPY queues and allocators against the host driver, including invalid descriptor parity and unknown console IID fallbacks. - Compare CreateCommandList and ID3D12Device4::CreateCommandList1 across queue types, mismatched-allocator failure parity, and console IID fallbacks. - Compare empty and parameterized serialized root signatures, console IID fallback, and XCL's empty root-signature fallback on malformed bytecode. Verified locally with: cargo test -p xcl --test d3d12_command_objects_and_root_sig -- --test-threads=1 (3 passed, 0 failed) Assisted-by: Antigravity (Gemini 4 Neon)
Register a synthetic title caller to exercise the console path at slot 8. Compare queue descriptions against the native call on the same device, including console flag stripping and DMA-to-copy translation. Part of #480. Assisted-by: OpenAI Codex (GPT-6.2 Sol)
Add an integration test suite over the generated d3d12_layout.rs table and its layout.rs helpers: unique names/iids, non-empty parent/method lists with the IUnknown head, IID round-trip through parse_guid/guid_string, chain() most-derived-first ordering with no non-versioned siblings, slot() for known methods and rejected for unknown/misspelled, and find/slot/chain consistency. A generator regression (bad IID, duplicate slot, chain leaking a non-versioned sibling) now fails in CI instead of silently misaligning D3D12.X slots.
Pin the public contract of the console descriptor heaps from a new non-runtime test file (register / start / slot / words_at / write / copy_words / unregister): window-0 placement, per-slot arithmetic for non-shared view heaps (index 2k, pc_srv base+2k*inc, pc_uav base+(2k+1)*inc, pc_gpu_uav +1 slot), sampler slot arithmetic (one 16-byte slot per index), T# image copy renumbering (word 0 = destination index), buffer V# kept verbatim, sampler S# index-in-word-3-[11:0] renumbering, end-of-heap bounds, start stability across slot calls, unregister forgets the heap, and non-shader-visible heaps report no GPU UAV.
a_new_list_takes_no_copy_scratch_of_an_earlier_one asserted while it held
COPY_SCRATCH. When an assert failed, the lock was poisoned; the test's
command list was then dropped during unwinding, its Release hook
(real::cl_release -> on_release -> release_copy_scratch) panicked on the
poisoned lock, and a panic there is non-unwinding, so the whole lib test
binary aborted ("thread caused non-unwinding panic. aborting.", exit
status 9). Every test result of that process was lost.
Measured under Wine 11.22 + vkd3d-proton v3.1 on an RTX 5060 Ti, where
gpu_more_atomics_sub_dword_scratch_valu hangs the GPU and the device is
removed for later tests (the fence then reads as complete, so this test's
"stays until the fence" check fails): main aborted in 2 of 2 runs; with
this change the binary runs to the end and reports the failures.
The checks are now read under the lock and asserted after it is released.
Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gpu_raw_window_view_reaches_its_top compiles a cs_6_6 shader that indexes ResourceDescriptorHeap, but checked only for a GPU and DXC. On a device without SM 6.6 (Windows 10's inbox D3D12, no Agility SDK) the pipeline is refused and the test failed with 0x80070057 at CreateComputePipelineState instead of skipping like the runner's GPU tests. It now checks the shader model first and skips with the same message (agility::format_no_sm66_message). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A panic was printed to stderr only. One of XCL's own threads that panics is gone for the rest of the run, and `xcl.log`, the file a report carries, had no line of it: in a retail title's run under Wine (RTX 4060 Ti) `xcl-sync-watchdog` panicked as it started (the race #1926 fixes) and the log reads like any other stall. The host installs a panic hook that writes the thread's name, the place and the message as an ERROR line, then calls the hook that was there. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
v_dot2_f32_f16 applied only NEG[2] to SRC2 and ignored NEG_HI[2]. SRC2 is an f32 operand, and for an f32 operand of a VOP3P instruction the NEG_HI bit is its ABS modifier, as v_fma_mix* already decodes it: - LLVM SIDefines.h, SISrcMods: "NEG_HI = ABS" - AMDGPUISelDAGToDAG.cpp, SelectVOP3PModsF32 calls SelectVOP3Mods, which folds fabs into the ABS bit - llvm.amdgcn.fdot2.ll, v_fdot2_abs_c: fabs(c) selects to "v_dot2_f32_f16 v0, v0, v1, v2 neg_hi:[0,0,1]" So |c| was read as c, and -|c| as -c. With v1 = v2 = 0x3C003C00 and v3 = -5.0, neg_hi:[0,0,1] gives 7.0 (was -3.0) and neg_lo:[0,0,1] neg_hi:[0,0,1] gives -3.0 (was 7.0). ABS is applied before NEG, as in v_fma_mix*. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…umulator The direct DXIL translator (XCL_DIRECT_DXIL=1) ignored NEG_HI[2] of v_dot2_f32_f16, the ABS of its f32 accumulator, as the HLSL path did before #1286. Apply it before NEG[2], as #1286 does in the HLSL path. #1286's GPU test failed with XCL_DIRECT_DXIL=1 on an RTX 5070 Ti (neg_hi:[0,0,1] with c = -5.0 gave -3.0, not 7.0) and passes with this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Covers GetResourceAllocationInfo (slot 25) and GetCustomHeapProperties (slot 26) through both the C++ and C ABIs, using a synthetic title-image caller so the console hooks are reached. The zero-width buffer is compared with the host's answer rather than UINT64_MAX, which vkd3d-proton does not return. Part of #480. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Compares XCL's hooked ID3D12Device::CreateReservedResource (slot 30) with the unhooked driver slot on the same adopted device, so both paths use one adapter even when XCL_ADAPTER selects a non-default GPU. Covers buffers and 2D/3D textures (GetDesc and GetResourceTiling, including a range starting at subresource 1), invalid descriptors, the console IID fallback, clear values and a null ppv. Skips go through runner::skip_test. Part of #480. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
detect_wave64 tells the wave size from the code: 32-bit EXEC writes and no 64-bit ones mean wave32, anything else wave64. A wave32 program that never writes EXEC has nothing in its code to tell, so it was translated as wave64: its cross-lane reads (v_readfirstlane, v_readlane, permutes) then span 64 threads instead of 32. The FSSM header has the answer: bit 5 of the flags word at +0xD4. Measured on a retail shader pack (26 698 programs): the bit is set for all 2 608 programs the code shows to be wave32 and clear for all 24 036 the code takes for wave64, except 54 compute programs with the bit set and no EXEC write in their code. 27 of those 54 have cross-lane instructions (v_readfirstlane, v_readlane, permutes, LDS). As wave32 all 54 translate completely and compile with DXC. fssm_wave64 takes wave32 from the header and leaves everything else to detect_wave64, so only those programs change. An unused field (0xDEADBEEF) and other FSSM versions say nothing. A compute program through the PSO hook (gpu_compute_e2e) shows the effect: 64 threads store v_readfirstlane of their thread id; with the flag threads 32..63 read thread 32, without it they read thread 0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In crates/xcl/src/gpu/dxil/lower.rs, Lw::salu unconditionally called read64 on _b64 saveexec/wrexec forms even in wave32 (!self.wave64) and unconditionally read sreg(127) (EXEC_HI) before branching on (!self.wave64 || name.ends_with("_b32")). On 32-bit-only source encodings such as m0 (SSRC0 = 124), wave32 S_AND_SAVEEXEC_B64 failed translation with Err("...: op"), and on SGPR sources it spuriously touched s[n+1] and EXEC_HI (s127).
Move source reads and EXEC_HI handling inside the wave32/_b32 vs wave64 _b64 branches to mirror HLSL (#191), and add unit/disassembly and wave32 RTX 4060 GPU regression tests in lower.rs.
Part of #1269
Assisted-by: Google Antigravity (Gemini 4 Neon)
In `crates/xcl/src/gpu/dxil/lanes.rs`, `Lw::ballot` called plain `WaveActiveBallot` even in pixel shaders (`self.gfx` with `ps: Some(_)`). Under SM 6.6, `WaveActiveBallot` excludes helper lanes, whereas `Lw::rla` already uses quad reads for pixel shader helper lanes and the HLSL path uses `ballot_px` / `quad_bits` + `ballot_px_quad` (PR #134 / #105 item 1). After `s_wqm_b32`/`s_wqm_b64`, dropping helper-lane bits from compare masks corrupted `v_cndmask` / `s_and_saveexec` values read via DPP quad derivatives and caused `v_readfirstlane` waterfall loops to spin until the loop budget. Port both parts of #105 item 1 and #134 to the direct DXIL translator: - Split `Lw::ballot_ps_quad(q)` out of `Lw::ballot_ps(cond)` in `crates/xcl/src/gpu/dxil/lanes.rs`: four `WaveActiveBallot` passes spread each quad member's bit `p` from live lanes back to bit `4k + p`, preserving the wave32-in-wave64 `gfx_half` select, constant-false `(0, 0)` short-circuit, and live-lanes-only entry `EXEC` (`setup_pixel` calls `gfx_common_init` before setting `self.gfx`). Non-VOPC PS masks (such as `v_add_co_u32` carries) route through `ballot_ps` -> `ballot_ps_quad`. - In `crates/xcl/src/gpu/dxil/lower_valu.rs`, evaluate plain pixel-shader VOPC compares per quad member (`p in 0..4`) by quad-reading VGPR source operands with `QuadReadLaneAt` (leaving SGPRs such as `v_readfirstlane` results and constants wave-uniform) and feeding the 4-bit quad mask to `Lw::ballot_ps_quad`, avoiding `QuadReadAcross*` on compare predicates that crash AMD RDNA2/3/4 `amdxc64` (#134). Add CPU/DXIL-validator and CI-WARP-safe GPU draw regression tests in `lanes.rs` (384/1024 wrong pixels pre-fix on RTX 4060 -> 0/1024 post-fix for both wave64 and wave32 pixel shaders, with zero `dx.op.quadOp` in VOPC pixel shaders). Part of #1269 Assisted-by: Google Antigravity (Gemini 4 Neon)
Seven upstream commits. Conflicts in four files: the README keeps both bullets; dxc.rs keeps the fork's compile_with (a compiler on a private heap) under upstream's compile_whole and linked form; a dispatch chain's refusal warning stays, with ComputeBuild::Chain; the split fixture keeps the fork's optional chain with upstream's timing block inside it. driver_cache::path is back: upstream's new test calls it. Software adapter: cargo test --release -p xcl --lib: 1531 passed, 1 failed, 25 ignored; 59 tests that open the hardware GPU not run. The failure, sparse's flush_parked_does_not_free_or_reuse_tiles_while_unmap_ is_in_flight, passed three times of three run alone (it reads the clock; a shader build was using the machine). Not run on a title yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…copies without asking readable() Taken as it is for a test on a title. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> # Conflicts: # crates/xcl/src/hle/d3d12x/list_x.rs # crates/xcl/src/host.rs
…ut their top mips while video memory fills up Taken as it is for a test on a title. The memory line keeps the fork's budget and commit text after the pull request's count of thinned textures. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The driver builds about two pipelines at a time for one process, so the preparation before a title (#2555) stood for minutes on each stretch of large compute programs. The stages are still translated in the host; the compute pipelines are built by worker processes of the same program, each on its own slice of the records: the processors less two, 16 at most, 3 GB of the commit left for each (XCL_PREPARE_WORKERS; 1: as before). With a list of the pipelines an earlier run used, only those are built before the title starts. A worker that fails is logged and the title starts; a worker ends when the host does. A worker reports every record while a title waits on it, and the host logs its progress every 5 s. Measured on a retail title, RTX 5090, 32 threads: the first 92 % of the steps in 85 s (one process: 84 % of one pass after several minutes). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…groups meet at a group barrier by default Taken as it is for a test on a title. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> # Conflicts: # crates/xcl/src/gpu/recomp/emit.rs
… a put-off dispatch waits for its pipeline at the submit instead of being dropped From #2547: pso_async::wait_for_submit, called by record_deferred (bind::wait_for_bound) before each put-off call is recorded; the SUBMIT_WAIT_MOST bound with its WARN and SUBMIT_GAVE_UP count; the test switches for the wait budget and the submit bound; catch_unwind around a worker's build; the four tests. Kept from the fork: Demand's waiters/by_submit/ahead counting (the submit counts once among the waiters through `ahead`, also for a late pipeline, and leaves with unwant_ahead when it gives up), waits_for/need_by_submit, the split LISTS locks (no lock held across the wait), the own allocator on the primary list, run_job (the panic catch wraps it and clears its thread-locals), the Wait struct (submit wait counters, 1 s logs, title held), BUILT_HERE/BUILT_AT_SUBMIT for a build the submit runs itself, the dred pipeline mark (now after the wait, so it names the built pipeline) and bound_pso. XCL_CS_PSO_WAIT_MS keeps its precedence: with it set, wait_for_submit leaves the wait to the call's resolve_wait as before. Without XCL_PSO_WAIT_MS and XCL_CS_PSO_WAIT_MS the submit's wait is the unbounded resolve_wait_for it already made. The list_x GPU test makes the pipeline late after the dispatch is put off, since the fork does not put off a late pipeline. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… record The two passes were added up (twice the records), and a worker's count moved every 200 records, so the screen stood on one number for many minutes. The workers' pass has its own heading and count, a worker reports every record, and the line under the bar says a large pipeline is compiling. Workers: the logical processors less four. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… put-off dispatches) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…iagnostic) A shader whose S# is taken for a heap entry it is not samples through entry 0: point, wrap, mip 0 only. With the switch that entry is linear, clamp, every mip, so a picture that changes with it shows such shaders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A program's S# constants were known only inside the block that set them. The console compiler sets an S# before a loop or an if and samples inside it; those samples went through sampler-heap entry 0 (point, wrap, mip 0): banded gradients, stepped glows, a lookup that wraps. The constants are followed through the program's branches: a register is a constant at a block's start when every block that leads there leaves it with the same one. On a retail title, RTX 5090: with entry 0 made linear (XCL_ZERO_SAMPLER_LINEAR=1) the bands and steps went, which showed the samples went through it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A run keeps the shaders of the pipelines it uses, each by its own key (used-shaders.txt beside the DXIL cache). With that list the preparation before a title translates only those records; the title translates another when it first uses it. XCL_PREPARE_ALL=1: every record, as without the list. XCL_PREPARE=0: no preparation, the title builds what it uses as it goes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…er it" This reverts commit fbfac4d.
…n the stages that draw A program's S# constants were known only inside the block that set them. The console compiler sets an S# before a loop or an if and samples inside it; those samples went through sampler-heap entry 0 (point, wrap, mip 0): banded gradients, stepped glows, a lookup that wraps. In vertex and pixel programs the constants are followed through the branches: a register is a constant at a block's start when every block that leads there leaves it with the same one. Not in the other programs: read this way on a retail title, compute programs gave ExecuteIndirect 2 055 counts out of range in 75 s (none before) and the device hung after 140 s. Why is not known yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
RTX 3090 Ti / 621.40 / Windows 10 / 32 GiB follow-up on
The independent timing of PSO worker gate waits is in #2628. AI use: OpenAI Codex (GPT-6) ran the comparison and drafted the report. Long-run update. One recording thread completed 37 large, cache-missing compute PSO builds in sequence between 773.010 and 1,443.620 s. Their logged driver durations total 670.124 s of that 670.610 s interval. The runtime stack samples caught the thread in |
|
Blocker for 16 GiB / capped Wine hosts (source-verified at exact head
I attempted the focused Windows-MSVC Wine test |
luckyteagirl
left a comment
There was a problem hiding this comment.
With XCL_PREPARE_WORKERS=2, XCL_ADAPTER unset, and a title config such as d3d12_adapter = "1" on a two-GPU host, the parent captures progress.adapter but this child Command does not pass it on. Each worker enters the CLI shaders --precompile path with startup=None, so Pipelines::for_adapter("auto") selects the default adapter; the title runtime still selects adapter 1. That means the workers can warm driver PSOs for the wrong device, and matching-DXIL cache entries can later be rejected and rebuilt on the title's adapter. Could the spawn pass the resolved adapter to children (for example via XCL_ADAPTER only when no explicit environment override exists) and test the config-only secondary-adapter case? This is source review; I did not run a two-GPU preparation test, and this point concerns the worker pipeline path rather than all translation-only preparation.
|
Independent NVIDIA test report on exact head Tested
Regression run nvidia-dev ( PR ( PR (with worker preparation over Not tested
AI use
|
|
Dual-PC NVIDIA full-workspace test run (debug) and RTX 5080 retail smoke (release) at exact head Tested
Not tested
AI use
|
|
+1 to @pickles976's byte/MB finding above (7182236787). I didn't see it before posting, sorry for the repeat. One new data point: it is still there at the current AI use: Claude Code (Claude Opus 5.5) checked the source at |
|
@pickles976 confirmed by reading the current I'm taking the fix, as a small PR against AI use: Claude Code (Claude Opus 5.5) read the source and wrote this comment. |
Brings
nvidia-devup to upstream main (through #2371) and adds the faster shader preparation before a title starts.What is in it
b49be183, includes Shaders: prebuild split compute dispatch-chain pieces under --pipelines #2338, DXC: compute programs are linked with their memory accessors (window switches no longer dominate DXC time) #174, Shaders: reuse offline compute PSOs and compact repeated atomic shaders #2371), with the fork's fixes kept.crates/xcl/src/shaders.rs): the stages are translated in the host; a pack's compute pipelines are built by worker processes, each on its own slice of the records. The driver builds about two pipelines at a time for one process, so one process stood for minutes on each stretch of large compute programs. Workers: logical processors less four, 3 GB of free commit each (XCL_PREPARE_WORKERS;1= one process as before). A worker that fails is logged and the title starts; a worker ends when the host does.shaders.rs,hle/d3d12x/pso_async.rs): a run keeps the shaders of the pipelines it uses inused-shaders.txtbeside the DXIL cache. With that list the preparation translates only those records, and the pipeline pass builds only the compute pipelines an earlier run used.XCL_PREPARE_ALL=1prepares every record.XCL_PREPARE=0skips preparation: the title builds what it uses as it goes.hle/d3d12x/present/preparation.rs): each pass has its own heading and count, a worker reports every record, the host logs progress every 5 s.gpu/recomp/mod.rs): an S# set before a branch or a loop is recognised as a static sampler after it. Before, those samples went through sampler-heap entry 0 (point, wrap, mip 0): banded gradients, stepped glows.XCL_ZERO_SAMPLER_LINEAR=1is a diagnostic for that entry.XCL_WAVE64_SPIN=1restores the counters).Tested
cargo test --release -p xcl --lib -- --test-threads=4atfbfac4d0: 1538 passed, 0 failed, 25 ignored; 59 tests that open the hardware GPU not run. The four tests added after it (the_shaders_of_a_used_set_are_kept_for_the_next_run,the_key_of_one_shader_is_the_key_of_a_set_of_it,preparation_workers_leave_two_processors_and_follow_the_commit_left,static_sampler_set_before_a_branch_is_a_constant_after_it) pass at the head.Not tested
AI use
🤖 Generated with Claude Code