Recompiler: bound descriptor heap indices from T# and S# words to the heap #1206

Closed
duudiis wants to merge 2 commits from upstream-pr/1215 into main
duudiis commented 2026-11-24 13:18:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by duudiis on 2026-11-24T13:18:52Z.


Translated shaders index ResourceDescriptorHeap with T# word 0 and SamplerDescriptorHeap with S# word 3 [11:0], and both come from console memory. If a T# was read from memory the GPU never wrote, the index can be anything. On NVIDIA an index past the heap wraps onto an unrelated slot, and if that slot holds a descriptor of the wrong kind the GPU hangs with no DRED page fault (device removal 0x887a0005). A retail title's cutscene reads T#s from memory that skipped GPU work was meant to write. This PR keeps those indices inside the heap. The shared heap now ends in null-view guard slots, and every data-derived heap index in a translated shader is bounded to them, so a garbage T# reads zeros and its stores are dropped.

Idea from VIctory (GPL-3.0), reimplemented; no code taken.

Overlaps #610 (draft): it also puts null views at the end of the heap and sends T# indices that are not views to them. The approaches differ. #610 fixes the heap at 1 000 000 views, checks word 0 against a compile-time constant and also checks word 3's TYPE. This PR keeps the heap at its OPTIONS19 size and passes the bound at run time in an io slot. It also bounds S# indices and fills shader-visible sampler heaps to 2048. The two conflict in console_heap.rs, emit.rs and runner.rs, so only one of them should land.

What is in it

  • D3D12.X: reserve null-view guard slots at the end of the shared heap:
    • hle/d3d12x/console_heap.rs: the last 14 descriptors of the shared heap are guard slots. For each view kind the emitter declares (1D, 2D, 3D, CubeArray, 1DArray, 2DArray, 2DMS) there is a null SRV with a null UAV next to it, and no console heap is ever given these slots. view_limit returns the first guard slot when the shared heap is bound, and 0 otherwise or with XCL_HEAP_CLAMP=0.
    • gpu/recomp/mod.rs: IO_VIEW_LIMIT = io slot 113. Slot 112 is already IO_UMA_BASE_HI, so the new one goes next to it in the trap-temp range. Also adds VIEW_GUARD_KINDS and SAMPLER_HEAP_SLOTS.
    • bind.rs, console_list.rs and list_x.rs write the io slot for each translated draw and dispatch, from the heaps the list has bound.
    • real.rs: shader-visible PC sampler heaps get 2048 samplers. The slots past the title's are the zero S#'s point sampler.
  • Recompiler: bound heap indices from T# and S# words to the heap (gpu/recomp/emit.rs):
    • Each T# heap index (sample, get_lod, get_resinfo, load, store, atomics) becomes one select against xcl_vlast = io[IO_VIEW_LIMIT] - 1.
    • The UAV + 1 is applied after the bound. Before, word 0 0xFFFFFFFF wrapped the UAV index to 0.
    • S# indices become min(s & 0xFFF, 2047).
    • Shaders that index no heap produce the same HLSL as before.
    • gpu/recomp/runner.rs: the kernel test runner puts the guard slots after the test textures and fills its sampler heap the same way the runtime does.

Tested

  • NVIDIA GeForce RTX 5070 (12 GB), Intel Core i7-14700KF, Windows 11; Rust 1.98.0, release.
  • cargo build --workspace --release: ok.
  • cargo test --workspace --release -- --test-threads=4 on 757ece9: 744 passed, 0 failed, 41 ignored (lib: 701 passed, 0 failed, 21 ignored).
    • SKIPPED (no wave64): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware.
  • New tests:
    • shared_heap_guard_slots (console_heap.rs): passes.
    • heap_indices_are_bounded (gpu/recomp/tests.rs): passes, and fails with this head's emit.rs reverted.
    • gpu_heap_index_past_the_views_reads_the_guard (GPU): passes. On this NVIDIA GPU it also passes with emit.rs reverted, because the out-of-range reads there returned 0 and the stores were dropped. It shows that the guard path reads zeros and drops stores. It does not reproduce the hang.

Regression run
main (47efa2e):

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 5070
title: NYCMain
seconds: 60
exit: 0x0
frames shown: 386 (PresentX 387)
presents per 2 s (last 3): 11 11 14
device removals: 0
crashes: 0
peak commit: 15980 MB

This PR (757ece9):

xcl-smoke v1
commit: 757ece9795bc1f047661c77c039645d1893bb949
gpu: NVIDIA GeForce RTX 5070
title: NYCMain
seconds: 60
exit: 0x0
frames shown: 1600 (PresentX 1600)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 16739 MB

The main run went first with a cold shader and driver cache (both builds share the cache folder), so most of the frame difference is the cache, not this change. Both runs cover boot and the intro, not the cutscene that reads garbage T#s.

Not tested

  • AMD GPUs.
  • The retail title past its intro with this exact head: the smoke runs stop at 60 s, before the cutscene that reads garbage T#s.
  • Whether the guarded reads (zeros) let the cutscene draw correctly.

AI use

  • Claude Code, Claude Opus 5.5: wrote the code, the tests and this description.
<!-- greyfinch-sync:ivall/xcl:issue:6582688794 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1215). Originally posted by [duudiis](https://github.com/duudiis) on 2026-11-24T13:18:52Z. --- Translated shaders index `ResourceDescriptorHeap` with T# word 0 and `SamplerDescriptorHeap` with S# word 3 [11:0], and both come from console memory. If a T# was read from memory the GPU never wrote, the index can be anything. On NVIDIA an index past the heap wraps onto an unrelated slot, and if that slot holds a descriptor of the wrong kind the GPU hangs with no DRED page fault (device removal 0x887a0005). A retail title's cutscene reads T#s from memory that skipped GPU work was meant to write. This PR keeps those indices inside the heap. The shared heap now ends in null-view guard slots, and every data-derived heap index in a translated shader is bounded to them, so a garbage T# reads zeros and its stores are dropped. Idea from VIctory (GPL-3.0), reimplemented; no code taken. Overlaps #610 (draft): it also puts null views at the end of the heap and sends T# indices that are not views to them. The approaches differ. #610 fixes the heap at 1 000 000 views, checks word 0 against a compile-time constant and also checks word 3's TYPE. This PR keeps the heap at its OPTIONS19 size and passes the bound at run time in an io slot. It also bounds S# indices and fills shader-visible sampler heaps to 2048. The two conflict in `console_heap.rs`, `emit.rs` and `runner.rs`, so only one of them should land. **What is in it** - `D3D12.X: reserve null-view guard slots at the end of the shared heap`: - `hle/d3d12x/console_heap.rs`: the last 14 descriptors of the shared heap are guard slots. For each view kind the emitter declares (1D, 2D, 3D, CubeArray, 1DArray, 2DArray, 2DMS) there is a null SRV with a null UAV next to it, and no console heap is ever given these slots. `view_limit` returns the first guard slot when the shared heap is bound, and 0 otherwise or with `XCL_HEAP_CLAMP=0`. - `gpu/recomp/mod.rs`: `IO_VIEW_LIMIT` = io slot 113. Slot 112 is already `IO_UMA_BASE_HI`, so the new one goes next to it in the trap-temp range. Also adds `VIEW_GUARD_KINDS` and `SAMPLER_HEAP_SLOTS`. - `bind.rs`, `console_list.rs` and `list_x.rs` write the io slot for each translated draw and dispatch, from the heaps the list has bound. - `real.rs`: shader-visible PC sampler heaps get 2048 samplers. The slots past the title's are the zero S#'s point sampler. - `Recompiler: bound heap indices from T# and S# words to the heap` (`gpu/recomp/emit.rs`): - Each T# heap index (sample, get_lod, get_resinfo, load, store, atomics) becomes one select against `xcl_vlast = io[IO_VIEW_LIMIT] - 1`. - The UAV `+ 1` is applied after the bound. Before, word 0 0xFFFFFFFF wrapped the UAV index to 0. - S# indices become `min(s & 0xFFF, 2047)`. - Shaders that index no heap produce the same HLSL as before. - `gpu/recomp/runner.rs`: the kernel test runner puts the guard slots after the test textures and fills its sampler heap the same way the runtime does. **Tested** - NVIDIA GeForce RTX 5070 (12 GB), Intel Core i7-14700KF, Windows 11; Rust 1.98.0, release. - `cargo build --workspace --release`: ok. - `cargo test --workspace --release -- --test-threads=4` on `757ece9`: 744 passed, 0 failed, 41 ignored (lib: 701 passed, 0 failed, 21 ignored). - SKIPPED (no wave64): `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`. - New tests: - `shared_heap_guard_slots` (`console_heap.rs`): passes. - `heap_indices_are_bounded` (`gpu/recomp/tests.rs`): passes, and fails with this head's `emit.rs` reverted. - `gpu_heap_index_past_the_views_reads_the_guard` (GPU): passes. On this NVIDIA GPU it also passes with `emit.rs` reverted, because the out-of-range reads there returned 0 and the stores were dropped. It shows that the guard path reads zeros and drops stores. It does not reproduce the hang. **Regression run** main (`47efa2e`): ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 5070 title: NYCMain seconds: 60 exit: 0x0 frames shown: 386 (PresentX 387) presents per 2 s (last 3): 11 11 14 device removals: 0 crashes: 0 peak commit: 15980 MB ``` This PR (`757ece9`): ``` xcl-smoke v1 commit: 757ece9795bc1f047661c77c039645d1893bb949 gpu: NVIDIA GeForce RTX 5070 title: NYCMain seconds: 60 exit: 0x0 frames shown: 1600 (PresentX 1600) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 16739 MB ``` The main run went first with a cold shader and driver cache (both builds share the cache folder), so most of the frame difference is the cache, not this change. Both runs cover boot and the intro, not the cutscene that reads garbage T#s. **Not tested** - AMD GPUs. - The retail title past its intro with this exact head: the smoke runs stop at 60 s, before the cutscene that reads garbage T#s. - Whether the guarded reads (zeros) let the cutscene draw correctly. **AI use** - Claude Code, Claude Opus 5.5: wrote the code, the tests and this description.
Aniseto commented 2026-11-24 14:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-24T13:25:20Z.


Ran the new heap-bound tests on an NVIDIA Blackwell part at 757ece9:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib heap_indices
1 passed; 0 failed; 0 ignored      (exit 0)

XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu_heap_index
1 passed; 0 failed; 0 ignored      (exit 0)

XCL_ADAPTER=nvidia cargo test -p xcl --lib console_heap
4 passed; 0 failed; 0 ignored      (exit 0)

gpu_heap_index_past_the_views_reads_the_guard runs on the GPU here and reads the guard slot as expected; heap_indices_are_bounded and the console-heap unit set are unaffected. This is a debug build on a Blackwell part with driver 32.0.16.2124 (the author's run was release on an RTX 5070).

Not tested: retail titles, RDNA2/RDNA4 and Intel GPUs, Wine, native wave64.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified.

<!-- greyfinch-sync:ivall/xcl:comment:7132805973 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1215#issuecomment-7132805973). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-24T13:25:20Z. --- Ran the new heap-bound tests on an NVIDIA Blackwell part at `757ece9`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl --lib heap_indices 1 passed; 0 failed; 0 ignored (exit 0) XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu_heap_index 1 passed; 0 failed; 0 ignored (exit 0) XCL_ADAPTER=nvidia cargo test -p xcl --lib console_heap 4 passed; 0 failed; 0 ignored (exit 0) ``` `gpu_heap_index_past_the_views_reads_the_guard` runs on the GPU here and reads the guard slot as expected; `heap_indices_are_bounded` and the console-heap unit set are unaffected. This is a debug build on a Blackwell part with driver 32.0.16.2124 (the author's run was release on an RTX 5070). Not tested: retail titles, RDNA2/RDNA4 and Intel GPUs, Wine, native wave64. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified.
DavidM1911 commented 2026-11-24 14:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:47:13Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib recomp: 191 passed, 0 failed.

Note: the full d3d12x lib filter currently aborts with 0xc0000005 on unmodified main too (pre-existing, unrelated to this PR); the PR's own tests were run by name and pass.

<!-- greyfinch-sync:ivall/xcl:comment:7133335161 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1215#issuecomment-7133335161). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:47:13Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - cargo test -p xcl --lib recomp: 191 passed, 0 failed. Note: the full `d3d12x` lib filter currently aborts with 0xc0000005 on unmodified `main` too (pre-existing, unrelated to this PR); the PR's own tests were run by name and pass.
jessenic commented 2026-11-25 10:10:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jessenic on 2026-11-25T09:59:03Z.


A measurement that supports this PR's explanation of the 0x887a0005 removal, from a retail title on an RTX 5070 Ti, on a tree without this PR. I'm now testing the PR on the same setup and will add the result here.

Setup: RTX 5070 Ti 16 GB (driver 610.88), Windows 11 Pro 26300, release, Series S profile. A local integration branch on main 8f5fca5 with #1323, #1405, #1464, #1291, #1342, #1156, #2009, #1993 and others. XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:256. The title reaches the intro cutscene's title card and then loses the device 7–9 s after its first #101, in every run (about 10 so far). DRED shows no list in progress and no page fault, and Windows logs no TDR event (nvlddmkm) for it.

Where the removal comes from: cdb attached to the game at #101, with breakpoints on D3D12Core!*RemoveDevice* (public Microsoft symbols):

  • The device is removed inside an ExecuteCommandLists, in two runs one of XCL's own sparse uploads (sparse::State::submit_slot). The chain is nvwgf2umx → D3D12Core!CDevice::UMSetError_ → CDevice::ProcessDriverErrors → NDXGI::CDevice::RemoveDevice.
  • The error the NVIDIA user-mode driver passes to UMSetError_ is 0x88760870 (D3DDDIERR_DEVICEREMOVED). So the list submitted then is not the cause. The kernel had already marked the device lost, and the next submission found out.
  • The kernel's device execution state, the 5th argument of CD3D12TelemetryHelper::LogRemoveDeviceEvent, is 6, D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT. It is not a page fault (7), a hang (3) or out of memory (5).

A DMA fault with no page fault and no TDR fits what this PR describes: the GPU stops on a heap index that lands on a descriptor of the wrong kind. Two more things about main's guard, seen while applying this PR on top of it:

  • main's MIMG guard (5195e27) passes any word 0 below 2 097 151. The shared heap is smaller than that, so an index between its end and 2M still runs past it.
  • Its implicit-LOD sample path sends an invalid T# to heap index 0. With XCL_HEAP_WINDOWS=1, slot 0 is memory window 0's raw buffer UAV, so a T# that fails the check samples a buffer UAV as a texture.

When I combined this PR with main's guard, I sent the invalid-T# fallback to xcl_vlast + 1u (the guard slot when the heap is bounded, 0 when it is not), not to 0. That may be worth doing in the PR if it gets rebased onto main.

AI use: Claude Code (Claude Opus 5.5) ran the debugger sessions on the machine above and wrote this note.

<!-- greyfinch-sync:ivall/xcl:comment:7159064976 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7159064976). Originally posted by [jessenic](https://github.com/jessenic) on 2026-11-25T09:59:03Z. --- **A measurement that supports this PR's explanation of the `0x887a0005` removal, from a retail title on an RTX 5070 Ti, on a tree without this PR.** I'm now testing the PR on the same setup and will add the result here. **Setup:** RTX 5070 Ti 16 GB (driver 610.88), Windows 11 Pro 26300, release, Series S profile. A local integration branch on `main` `8f5fca5` with #1323, #1405, #1464, #1291, #1342, #1156, #2009, #1993 and others. `XCL_HEAP_WINDOWS=1 XCL_COHERENT_HEAPS=sparse:256`. The title reaches the intro cutscene's title card and then loses the device 7–9 s after its first `#101`, in every run (about 10 so far). DRED shows no list in progress and no page fault, and Windows logs no TDR event (`nvlddmkm`) for it. **Where the removal comes from:** cdb attached to the game at `#101`, with breakpoints on `D3D12Core!*RemoveDevice*` (public Microsoft symbols): - The device is removed inside an `ExecuteCommandLists`, in two runs one of XCL's own sparse uploads (`sparse::State::submit_slot`). The chain is `nvwgf2umx` → `D3D12Core!CDevice::UMSetError_` → `CDevice::ProcessDriverErrors` → `NDXGI::CDevice::RemoveDevice`. - The error the NVIDIA user-mode driver passes to `UMSetError_` is `0x88760870` (`D3DDDIERR_DEVICEREMOVED`). So the list submitted then is not the cause. The kernel had already marked the device lost, and the next submission found out. - The kernel's device execution state, the 5th argument of `CD3D12TelemetryHelper::LogRemoveDeviceEvent`, is **6, `D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT`**. It is not a page fault (7), a hang (3) or out of memory (5). A DMA fault with no page fault and no TDR fits what this PR describes: the GPU stops on a heap index that lands on a descriptor of the wrong kind. Two more things about `main`'s guard, seen while applying this PR on top of it: - `main`'s MIMG guard (`5195e27`) passes any word 0 below 2 097 151. The shared heap is smaller than that, so an index between its end and 2M still runs past it. - Its implicit-LOD sample path sends an invalid T# to heap index 0. With `XCL_HEAP_WINDOWS=1`, slot 0 is memory window 0's raw buffer UAV, so a T# that fails the check samples a buffer UAV as a texture. When I combined this PR with `main`'s guard, I sent the invalid-T# fallback to `xcl_vlast + 1u` (the guard slot when the heap is bounded, 0 when it is not), not to 0. That may be worth doing in the PR if it gets rebased onto `main`. **AI use:** Claude Code (Claude Opus 5.5) ran the debugger sessions on the machine above and wrote this note.
jessenic commented 2026-11-25 15:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jessenic on 2026-11-25T14:12:24Z.


Follow-up to my note above: with this PR, the removal 7–9 s after the title's first #101 is gone in 3 of 3 runs on the RTX 5070 Ti. Without the PR it happened in every run (about 10).

Same tree and setup as the note: the PR's two commits were cherry-picked onto the integration branch, with the conflicts against main's 5195e27 guard resolved as described there. Every compute pipeline was precompiled for the new translation first (12 threads, 3.8 h). Pixel and vertex programs were not precompiled.

run first #101 how it ends
1 (a second precompile was using the CPU and GPU) 355 s no removal until the run ended at 420 s; no presents after #101 + 2 s
2 195 s the same: no removal in 225 s, no presents after #101 + 2 s
3 191 s 0x887a0005 at 284 s, #101 + 94 s
  • The silence after #101 is not a hang on the GPU. A thread dump (cdb attached 20 s after #101, then detached) shows the title's render thread in bind::graphics_bound → pso_async::resolve_wait, waiting for a graphics pipeline that is still being built. One thread is in DXC and the other pipeline workers are idle. This PR changes the HLSL of every pixel and vertex program that reads an image, so on a cold cache the world's first draws wait for DXC and the driver. Graphics pipelines of 0.74 MB of DXIL took about 9 s each in the driver. #1798 (a draw does not wait for a graphics pipeline still being built), or precompiling --only ps / --only vs, should cover this.
  • Run 3's removal came 1.2 s after one of those huge graphics pipelines finished building (huge, wanted at once). So it is a later and different fault, probably the world's own mesh and pixel programs. The textured-world report on #505 explains why those read garbage descriptors without #1803 (the heaps' addresses in the user SGPRs). I'm testing a tree with #1803 next.

Not tested: AMD; Series X; more than 3 runs; a scripts/smoke.ps1 regression run; this PR alone on main.

AI use: Claude Code (Claude Opus 5.5) ran the runs and the debugger on the machine above and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7164919059 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7164919059). Originally posted by [jessenic](https://github.com/jessenic) on 2026-11-25T14:12:24Z. --- **Follow-up to [my note above](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7159064976): with this PR, the removal 7–9 s after the title's first `#101` is gone in 3 of 3 runs on the RTX 5070 Ti.** Without the PR it happened in every run (about 10). Same tree and setup as the note: the PR's two commits were cherry-picked onto the integration branch, with the conflicts against `main`'s `5195e27` guard resolved as described there. Every compute pipeline was precompiled for the new translation first (12 threads, 3.8 h). Pixel and vertex programs were not precompiled. | run | first `#101` | how it ends | |---|---|---| | 1 (a second precompile was using the CPU and GPU) | 355 s | no removal until the run ended at 420 s; no presents after `#101` + 2 s | | 2 | 195 s | the same: no removal in 225 s, no presents after `#101` + 2 s | | 3 | 191 s | `0x887a0005` at 284 s, **`#101` + 94 s** | - **The silence after `#101` is not a hang on the GPU.** A thread dump (cdb attached 20 s after `#101`, then detached) shows the title's render thread in `bind::graphics_bound` → `pso_async::resolve_wait`, waiting for a graphics pipeline that is still being built. One thread is in DXC and the other pipeline workers are idle. This PR changes the HLSL of every pixel and vertex program that reads an image, so on a cold cache the world's first draws wait for DXC and the driver. Graphics pipelines of 0.74 MB of DXIL took about 9 s each in the driver. #1798 (a draw does not wait for a graphics pipeline still being built), or precompiling `--only ps` / `--only vs`, should cover this. - **Run 3's removal came 1.2 s after one of those huge graphics pipelines finished building** (`huge, wanted at once`). So it is a later and different fault, probably the world's own mesh and pixel programs. The textured-world report on #505 explains why those read garbage descriptors without #1803 (the heaps' addresses in the user SGPRs). I'm testing a tree with #1803 next. **Not tested:** AMD; Series X; more than 3 runs; a `scripts/smoke.ps1` regression run; this PR alone on `main`. **AI use:** Claude Code (Claude Opus 5.5) ran the runs and the debugger on the machine above and wrote this comment.
jessenic commented 2026-11-25 16:12:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jessenic on 2026-11-25T15:28:57Z.


Correction to my comment above: "gone in 3 of 3" was wrong. With a warm cache, this PR delays the removal; it does not prevent it.

In those three runs the world drew almost nothing after #101. Draws waited for the graphics pipelines this PR's changed HLSL had made cold, and run 3's removal came as soon as drawing resumed. So those runs could not tell "fixed" from "delayed".

Run 4 had the graphics driver blobs from runs 1–3 already cached. Same tree and switches, cdb attached at #101 with a breakpoint on CD3D12TelemetryHelper::LogRemoveDeviceEvent:

  • the world drew from #101 on (up to about 980 draws every 2 s, 1–2 presents every 2 s);
  • the device was removed at #101 + 18.7 s, with execution state 6 (D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT) and 0x887a0005, as without the PR.

Without the PR this removal came at #101 + 7–9 s. With it, it came at + 18.7 s in this one warm run, so the PR may move it, but one run is not enough to say. The fault itself is still there on this tree. My guess in the earlier comment, "a later and different fault", is not supported: the kernel's reason is the same.

I'm next checking whether the page budget's evictions take part (a run without XCL_PAGE_BUDGET_MB), and testing a tree with #1803.

AI use: Claude Code (Claude Opus 5.5) ran the run and the debugger and wrote this correction.

<!-- greyfinch-sync:ivall/xcl:comment:7166910579 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7166910579). Originally posted by [jessenic](https://github.com/jessenic) on 2026-11-25T15:28:57Z. --- **Correction to [my comment above](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7164919059): "gone in 3 of 3" was wrong. With a warm cache, this PR delays the removal; it does not prevent it.** In those three runs the world drew almost nothing after `#101`. Draws waited for the graphics pipelines this PR's changed HLSL had made cold, and run 3's removal came as soon as drawing resumed. So those runs could not tell "fixed" from "delayed". Run 4 had the graphics driver blobs from runs 1–3 already cached. Same tree and switches, cdb attached at `#101` with a breakpoint on `CD3D12TelemetryHelper::LogRemoveDeviceEvent`: - the world drew from `#101` on (up to about 980 draws every 2 s, 1–2 presents every 2 s); - the device was removed at `#101` + 18.7 s, with execution state 6 (`D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT`) and `0x887a0005`, as without the PR. Without the PR this removal came at `#101` + 7–9 s. With it, it came at + 18.7 s in this one warm run, so the PR may move it, but one run is not enough to say. The fault itself is still there on this tree. My guess in the earlier comment, "a later and different fault", is not supported: the kernel's reason is the same. I'm next checking whether the page budget's evictions take part (a run without `XCL_PAGE_BUDGET_MB`), and testing a tree with #1803. **AI use:** Claude Code (Claude Opus 5.5) ran the run and the debugger and wrote this correction.
DavidM1911 commented 2026-11-26 04:07:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:05:38Z.


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7182287485 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1215#issuecomment-7182287485). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T04:05:38Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1206
No description provided.