Repository navigation
Conversation
…sses A root signature with CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED or SAMPLER_HEAP_DIRECTLY_INDEXED has the console put the 32-bit address of the bound view heap / sampler heap into user SGPRs after the root arguments, the view heap's first. XCL left these registers 0, so the shaders read their descriptors from address 0 on. Measured on a retail title: 110 of 153 root signatures at its first screen have one of the flags. All 540 of its compute shaders with such a root signature that were built (218 with the view heap flag, 3 with the sampler heap flag, 319 with both) have exactly one user SGPR more per flag than their arguments take; those with both load T# from the first. The pixel shaders of 49 572 pipelines with the sampler flag have one more as well (by where their m0 comes from). The pictures of its loading screen took a wrapping sampler instead of the clamping one they ask for: a flickering line at their top edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
An independent confirmation of the cause, from a world-load compute shader, and one result on a world-loading run with this PR. Counts only. Setup: RTX 3070 Laptop 8 GB (32-lane waves, split wave64), driver 32.0.16.2124, i7-11800H, 32 GB RAM, Windows 10 19045, rustc 1.100.0, release. Same retail title as on #1269 ( The registers, measured before this PR (local logging in
This PR in a world-loading run: Not tested: the pixel-shader and sampler-heap halves of the PR; console-list replays; AMD; the full suite on the PR's head (@futurepro62's report above covers it). AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
XCL PR #1803 verificationHead STOR-WINLAB ran Windows x64 build Tested
Workspace failures and skips
Not tested Matched AI use T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against |
|
Correction (25 Nov, after the in-title check in #1803 (comment)): the claim below that the flag rule gets sampler-only stages wrong does not hold in the title. It was an inference, not a measurement: the pack holds stages, not pipelines, and I assumed such a stage could be bound under a root signature that has both flags. Measured at pipeline creation over 10,000 (shader, root signature) pairs, those stages come with root signatures that have only the sampler flag, and the VS and PS of a pipeline agree. So the headline's second half, the third point's conclusion and the fourth point are withdrawn. The format, the counts and the other points are unchanged. Original comment follows, unedited. The console container states, per stage, which heap bases a shader wants and in which user-data dword. Decoded offline for every stage of the retail title's shader pack, it confirms this PR's placement, and points at one case the flag rule gets wrong: stages that use only the sampler heap. The format (a 20-byte entry per root slot / range in a table the stage record points to, with types 5 = view-heap base and 6 = sampler-heap base) is written up in #724 (comment). No run of the title is behind this comment; it is a Python decoder over the pack, checked against disassembly for a few programs.
Not tested: any of this in the title; ES / GS registers (only compute and mesh were checked against code). AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the decoder and the counts) did this and drafted the comment. |
# Conflicts: # crates/xcl/src/hle/d3d12x/bind.rs # crates/xcl/src/hle/d3d12x/console_list.rs
|
Correction: my first version of this comment said the flags alone aren't enough. A run of the title says they are, so I'm leaving the PR as it is. I compared each stage's table with the flags of the root signature its pipeline is created with, at every pipeline creation in the first 75 s of the title: no mismatch. At the last count that was 10,000 distinct (shader, root signature) pairs:
So the stages that use only the sampler heap are real, mesh ones included (my pack decoding missed those), but their root signatures have only the sampler flag: VS and PS of a pipeline agree too. In every pair with a heap entry, the arguments also end where the PR puts the addresses. This ran on a local tree with the PR merged and other changes (RTX 2070 SUPER, release, 1.0.2.1), not on the PR's head. Not covered: pipelines created later than that, other titles, and any FSSM block after the first of a container (some VS have two). The 102 pixel pipelines in the description that don't take m0 from after their arguments are not explained by this. AI use: Claude Code (Claude Opus 5.5) wrote the check, ran it and wrote this. |
|
Thanks for checking it independently. Two things that may save you time:
Offline only, as before (a decoder over the pack, plus the unit tests and the suite on #2217); nothing here was run in the title. AI use: Claude Code (Claude Fable 5.2) wrote this reply. |
|
@CharlyRien thanks. Our comments crossed: you answered the first version of mine, which was wrong, and I had just replaced it with a measurement (above). In short: in the title, 10,000 (shader, root signature) pairs at pipeline creation had no mismatch between your table and the root signature's flags, the 1,095 sampler-only ones included. So the flags are enough for what I measured, and I won't lift #2217 into this PR. If a pipeline turns up where they differ, the table is the way to go. On the sets: yours is right that sampler-only mesh stages exist. The run has 115 such MS / AS pairs; my pack decoding only took the first FSSM block of containers it could match by name and missed them. No need to compare containers for that. AI use: Claude Code (Claude Opus 5.5) wrote this. |
|
@veyn-sudo understood, and thanks for running it: that settles the point I raised. The sampler-only stages exist, but I only had the pack (stages, no pipelines) and assumed one could be bound under a root signature with both flags. Your 10,000 pairs show that does not happen where you measured, and that the VS and PS of a pipeline agree, which I had also guessed wrong. I have put a correction at the top of my earlier comment so that nobody reads it as an open objection to this PR. Nothing to change here from my side. #2217 stays what its description says: a No run of mine is behind this reply. AI use: Claude Code (Claude Fable 5.2) wrote this reply. |
|
I checked what happens to the guest descriptor-heap bases when a command list changes state. I ran five standalone Rust CPU cases against the clean merge preview of
This covers the guest state used by ordinary translated draws and dispatches. Native wrapper execution, GPU descriptor reads, and any effect on title loading remain unverified. I used Codex GPT-6.2 Sol for the fixture and a separate GPT-6.2 Sol agent at high reasoning to verify the source and results. I reviewed and approved this comment before posting. |
|
Following up on my CPU tests, I ran GTA VI on Windows with an RTX 3080 to check whether this change affected what appeared on screen during loading. I compared stock Both builds reached loading. In all four captures from each run, the center of the screen stayed uniformly gray while frames were still being presented. The last interval with any presents ended about 66 seconds after loading began in both runs. Stock then recorded 50 seconds with zero presents, and the PR build recorded 52 seconds. Both exited cleanly. I saw no open-world scene in either run. On this setup, adding #1803 alone didn’t visibly advance loading. I couldn’t verify whether the title exercised the changed descriptor-heap binding path during that interval, so the run leaves its effect on GPU descriptor reads open. I used Codex GPT-6.2 Sol to run the comparison and a separate GPT-6.2 Sol agent at high reasoning to independently verify the build revisions, timings, and capture measurements. I reviewed and approved this comment before posting. |
…#2296, xcl-dev#2297, xcl-dev#2320, xcl-dev#2323, xcl-dev#2329, xcl-dev#2333 Integrates shader heap-base addresses (xcl-dev#1803), fenced superseded texture unmaps (xcl-dev#2270), cross-queue VRAM heap reclamation fencing (xcl-dev#2275, using create_raw_fence under Wine), PcCall frame clamping and orphan PSO drop (xcl-dev#2296), PSO pointer guards (xcl-dev#2297), KickoffX idle spare list switching (xcl-dev#2320, preserving UnadoptGuard), console-list descriptor heap binding (xcl-dev#2323), ClearUnorderedAccessView PC handles (xcl-dev#2329), and dispatch_chain PSO retention (xcl-dev#2333).
…guments) Conflicts: bind.rs State keeps both the allocator's alloc_pool note and the new heaps field; bind_abi keeps the tree's window-0 lookup and its shadowed-memory refusal and reads the heaps with the layout and arguments; SetDescriptorHeaps both marks the heaps changed (the shared view heap is bound again) and records their console addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecuteIndirect) Supersedes xcl-dev#724; its commits are kept with their authors. Conflicts: - bind.rs State keeps the tree's heap_bound and xcl-dev#1803's heaps next to the record buffers and scratch; reset clears the heaps and holds the record buffers for the old allocator; forget takes the state out of the sharded map (bind::STATES) and holds its buffers. HashMap is imported again for the PR's maps. - console_list.rs Layout keeps xcl-dev#1803's heaps and the PR's inline_ms; with_heaps and user_data_ms both stay. - device_x.rs keeps xcl-dev#1887's log of a refused signature and the PR's companion Dispatch signature; the CreateCommandSignature doc is back above its function (the merge had put it above indirect_arg_bytes). - real.rs console slots keep the tree's #131 / xcl-dev#132 FlushCacheRange and the PR's DispatchMesh at xcl-dev#127. - list_x.rs: the PR's bound_heaps test helper removes the list from its own part of the sharded recording map. DispatchMesh slot: xcl-dev#1984 mapped the newer layout's xcl-dev#129 to the older xcl-dev#126, this PR to xcl-dev#127, where it hooks DispatchMesh. Kept xcl-dev#127: it is the shift of two slots the other methods have, and xcl-dev#1984's own reading of the newer layout (xcl-dev#126 / xcl-dev#127 the shading-rate methods, the older xcl-dev#124 / xcl-dev#125) puts its xcl-dev#128 at the older xcl-dev#126. xcl-dev#1984's test is rewritten for (129, 127) and checks that the older slot runs bind::dispatch_mesh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arguments xcl-dev#1803 gives compute and graphics stages whose root signature has CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED / SAMPLER_HEAP_DIRECTLY_INDEXED the 32-bit addresses of the view heap and the sampler heap set, in the user SGPRs after their arguments. The two-pass mesh path left them 0: its io blocks are made by two_pass_io, not bind_abi. Decoding the root-layout table of every stage in a retail title's shader pack (testers' report on the two-pass PRs) found the mesh stages' root arguments from s16 exactly as user_data_ms packs them, and all but 23 mesh stages taking the heap addresses right after them (view heap, then sampler heap): s23 / s24 for the most common layout of three tables, a root view and two constants, its code loading a V# from s23 + index * 32. With xcl-dev#1803 and the addresses in the two-pass compute pass, a tester logged s23 / s24 holding the heap bases in 10 000 of 10 000 binds. two_pass_io now appends them with console_list::with_heaps after the compute pass's user_data_ms and after the pixel shader's user_data_gfx; bind_two_pass_stage reads the list's heaps with its layout and arguments. Test: two_pass_heap_addresses_follow_the_arguments (the mesh layout's s23 / s24, either heap alone, none without the flags, the pixel shader's after its arguments from s8); it fails without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v#1803, xcl-dev#1984, xcl-dev#541, xcl-dev#2092 and the heaps' addresses in the two-pass stages)
…1946, xcl-dev#1803, xcl-dev#2297, xcl-dev#2320, xcl-dev#2333 Carries forward still-open high-value upstream PRs onto upstream/main (2898511) + our updated Wine PR stack (xcl-dev#867, xcl-dev#1395-successor, xcl-dev#871, xcl-dev#877, xcl-dev#1732). Preserves UnadoptGuard in xcl-dev#2320 KickoffX reset_one. Assisted-by: Antigravity (Gemini 4 Neon)
…1946, xcl-dev#1803, xcl-dev#2297, xcl-dev#2320, xcl-dev#2333 Carries forward still-open high-value upstream PRs onto upstream/main (2898511) + our updated Wine PR stack (xcl-dev#867, xcl-dev#1395-successor, xcl-dev#871, xcl-dev#877, xcl-dev#1732). Preserves UnadoptGuard in xcl-dev#2320 KickoffX reset_one. Assisted-by: Antigravity (Gemini 4 Neon)
A root signature with
CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED(0x400) orSAMPLER_HEAP_DIRECTLY_INDEXED(0x800) has the console pass the 32-bit address of the bound view heap / sampler heap in user SGPRs after the root arguments, the view heap's first. XCL left these registers 0, so shaders that index the heaps themselves read their descriptors from address 0 on. On a retail title this showed as a flickering line at the top of the loading pictures: they ask for a clamping sampler and got a wrapping one.What is in it
console_list.rs: the root signature's two flags inLayout::heaps;with_heapsappends the addresses after the arguments; unit testconsole_heap.rs:base, the 32-bit address of a heap's slotsbind.rs,list_x.rs:SetDescriptorHeapsremembers the heaps' addresses per list (reset by Reset / ClearState), and draws and dispatches pass themTested
cargo test --workspace -- --test-threads=4: 892 passed, 0 failed, 42 ignored (run on the same tree; only the commit message was reworded after it). SKIPPED:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)heap_addresses_follow_the_argumentsRegression run
main:
PR:
Not tested
console_list.rs) are unchanged: they still get no heap addressesAI use
🤖 Generated with Claude Code