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 |
|
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
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