d3d12x: persistent on-disk pipeline library caching and coalesced descriptor heap staging #1006

Open
github-bot wants to merge 3 commits from github-bot/gh-1006 into main AGit
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 10:19 UTC · original
UnkwnDev:arc-pso-library → main · +1064 −12 · 9 files · 3 commits · open

This pull request implements persistent on-disk pipeline state library caching (ID3D12PipelineLibrary1) and coalesced descriptor heap staging in D3D12.X:

  1. Persistent on-disk pipeline library caching:
    In crates/xcl/src/hle/d3d12x/pipeline_library.rs, introduces an ID3D12PipelineLibrary1 caching layer to persist driver-compiled hardware PSOs under %LOCALAPPDATA%\xcl\pso\host-pipelines.bin.
    In translated_graphics_pso and translated_compute_pso (crates/xcl/src/hle/d3d12x/real.rs), compiled pipelines are looked up by a 128-bit hash across deterministic root signature content (note_root_signature), translated shader bytecodes, samplers, and fixed-size pipeline state fields including InputLayout and NodeMask. D3D12_BLEND_DESC, D3D12_DEPTH_STENCIL_DESC, and D3D12_RASTERIZER_DESC are hashed explicitly field-by-field to ignore alignment padding.
    save(now) checks pending store counts and SAVE_INTERVAL_MS before taking SAVE_IO, and present.rs calls save_async() so periodic frame-present saves dispatch a bounded background save thread rather than serializing and writing on the present thread. Forced shutdown/close paths continue using synchronous save(true). Telemetry summary logging at exit (log_summary()) reports graphics/compute load and store counts. Empty pipeline library creation passes a null slice pointer for clean fallback under vkd3d-proton / Wine.

  2. Coalesced descriptor heap staging:
    In crates/xcl/src/hle/d3d12x/console_heap.rs, copy_range batches multi-slot descriptor copies by calculating destination addresses and indices directly, splitting at 256-slot PAGE_SLOTS boundaries and clamping to remaining heap capacity on both source and destination heaps.

Rebased onto origin/main (568e7db), integrating pipeline_library load/store with create_graphics_pso_cached in real.rs, currently at commit 8d0d2a1.

Tested

  • Hardware: Intel Arc A770 16GB (Driver 32.0.101.9175), Windows 11 Pro 64-bit, MSVC 14.44.35207
  • Verified at head 8d0d2a1:
    • cargo test -p xcl --lib pipeline_library -- --test-threads=1: 8 passed, 0 failed
    • cargo test -p xcl --lib hle::d3d12x::real -- --test-threads=1: 46 passed, 0 failed
    • cargo check -p xcl --tests: passed
    • (cargo test -p xcl --lib console_heap -- --test-threads=1: 7 passed at 2727c0d; console_heap.rs unchanged in 8d0d2a1)

Regression run
Prior revision 19381fbd reported by @Toons29 on AMD Radeon RX 9070 (smoke rerun needed on head 8d0d2a1):

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 19381fbd91c689b948774a5f6c15b8a233998047
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1617 (PresentX 1617)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Not tested

  • scripts/smoke.ps1 at head 8d0d2a1 (no retail title on author machine)
  • Windows 10 versions older than build 19041

AI use

  • Antigravity (Gemini 4 Hydrogen) and Claude Code assisted with pipeline state hashing, lock ordering, descriptor heap range copying, and test verification.
**@⁠UnkwnDev** on GitHub · 2026-11-24 10:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006) `UnkwnDev:arc-pso-library` → `main` · +1064 −12 · 9 files · 3 commits · open This pull request implements persistent on-disk pipeline state library caching (`ID3D12PipelineLibrary1`) and coalesced descriptor heap staging in D3D12.X: 1. Persistent on-disk pipeline library caching: In `crates/xcl/src/hle/d3d12x/pipeline_library.rs`, introduces an `ID3D12PipelineLibrary1` caching layer to persist driver-compiled hardware PSOs under `%LOCALAPPDATA%\xcl\pso\host-pipelines.bin`. In `translated_graphics_pso` and `translated_compute_pso` (`crates/xcl/src/hle/d3d12x/real.rs`), compiled pipelines are looked up by a 128-bit hash across deterministic root signature content (`note_root_signature`), translated shader bytecodes, samplers, and fixed-size pipeline state fields including `InputLayout` and `NodeMask`. `D3D12_BLEND_DESC`, `D3D12_DEPTH_STENCIL_DESC`, and `D3D12_RASTERIZER_DESC` are hashed explicitly field-by-field to ignore alignment padding. `save(now)` checks pending store counts and `SAVE_INTERVAL_MS` before taking `SAVE_IO`, and `present.rs` calls `save_async()` so periodic frame-present saves dispatch a bounded background save thread rather than serializing and writing on the present thread. Forced shutdown/close paths continue using synchronous `save(true)`. Telemetry summary logging at exit (`log_summary()`) reports graphics/compute load and store counts. Empty pipeline library creation passes a null slice pointer for clean fallback under vkd3d-proton / Wine. 2. Coalesced descriptor heap staging: In `crates/xcl/src/hle/d3d12x/console_heap.rs`, `copy_range` batches multi-slot descriptor copies by calculating destination addresses and indices directly, splitting at 256-slot `PAGE_SLOTS` boundaries and clamping to remaining heap capacity on both source and destination heaps. Rebased onto `origin/main` (`568e7db`), integrating `pipeline_library` load/store with `create_graphics_pso_cached` in `real.rs`, currently at commit `8d0d2a1`. **Tested** - Hardware: Intel Arc A770 16GB (Driver 32.0.101.9175), Windows 11 Pro 64-bit, MSVC 14.44.35207 - Verified at head `8d0d2a1`: - `cargo test -p xcl --lib pipeline_library -- --test-threads=1`: 8 passed, 0 failed - `cargo test -p xcl --lib hle::d3d12x::real -- --test-threads=1`: 46 passed, 0 failed - `cargo check -p xcl --tests`: passed - (`cargo test -p xcl --lib console_heap -- --test-threads=1`: 7 passed at `2727c0d`; `console_heap.rs` unchanged in `8d0d2a1`) **Regression run** Prior revision `19381fbd` reported by `@Toons29` on AMD Radeon RX 9070 (smoke rerun needed on head `8d0d2a1`): ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 19381fbd91c689b948774a5f6c15b8a233998047 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1617 (PresentX 1617) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` **Not tested** - `scripts/smoke.ps1` at head `8d0d2a1` (no retail title on author machine) - Windows 10 versions older than build 19041 **AI use** - Antigravity (Gemini 4 Hydrogen) and Claude Code assisted with pipeline state hashing, lock ordering, descriptor heap range copying, and test verification.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:40:05 +00:00
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 11:55 UTC · original

Linux / AMD RDNA3 run: the new pipeline-library corruption test fails deterministically under Wine.

Merged state: head onto main, clean merge, full suite 729 passed / 12 failed / 41 ignored; 11 known Wine-lane failures + mirror flake (#42 / #718) and one extra:

  • hle::d3d12x::pipeline_library::tests::corrupted_blob_falls_back_to_empty_library - fails 2/2 in isolation, panic at crates/xcl/src/hle/d3d12x/pipeline_library.rs:309: library created after rejection.

Reading: the test corrupts the on-disk blob, expects the loader to reject it and start empty; on this rig the loader path apparently produces/accepts a library after rejection. Could be Wine path/fs behavior (file still seen as valid at open time, or the reject path keyed on something environment-dependent), or a real ordering hole in the reject-and-recreate path. Deterministic here, so easy to reproduce on a Wine lane if you want a second datapoint.

The rest of the new pipeline_library tests pass on this rig, including the persistence round-trips.

Counts only, no game data.

Not tested: retail titles (none here), Windows, RDNA4.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 11:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7130726065) Linux / AMD RDNA3 run: the new pipeline-library corruption test fails deterministically under Wine. **Merged state:** head onto main, clean merge, full suite 729 passed / 12 failed / 41 ignored; 11 known Wine-lane failures + mirror flake (#42 / #718) and one extra: - `hle::d3d12x::pipeline_library::tests::corrupted_blob_falls_back_to_empty_library` - fails 2/2 in isolation, panic at `crates/xcl/src/hle/d3d12x/pipeline_library.rs:309`: `library created after rejection`. Reading: the test corrupts the on-disk blob, expects the loader to reject it and start empty; on this rig the loader path apparently produces/accepts a library after rejection. Could be Wine path/`fs` behavior (file still seen as valid at open time, or the reject path keyed on something environment-dependent), or a real ordering hole in the reject-and-recreate path. Deterministic here, so easy to reproduce on a Wine lane if you want a second datapoint. The rest of the new `pipeline_library` tests pass on this rig, including the persistence round-trips. Counts only, no game data. **Not tested:** retail titles (none here), Windows, RDNA4. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 12:12 UTC · original

Thanks for catching this.

The root cause was Rust slice passing semantics interacting with vkd3d-proton. In open(), creating the fallback empty library called device.CreatePipelineLibrary(&[]). In windows-rs, an empty slice passes s_ptr(), which evaluates to a non-null dangling pointer (

**@⁠UnkwnDev** on GitHub · 2026-11-24 12:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7131126700) Thanks for catching this. The root cause was Rust slice passing semantics interacting with vkd3d-proton. In open(), creating the fallback empty library called device.CreatePipelineLibrary(&[]). In windows-rs, an empty slice passes s_ptr(), which evaluates to a non-null dangling pointer (
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 12:32 UTC · original

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib pipeline: 10 passed, 0 failed — includes the new pipeline_library tests (corrupted_blob_falls_back_to_empty_library verified: a bad on-disk blob logs the rejection and starts fresh).
  • Scope note: ~438 changed lines, slightly over the ~400-line guideline; the caching + heap-staging changes may want splitting, maintainer's call. A retail smoke run is probably still needed before merge per CONTRIBUTING (runtime change).

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7131570663) Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug. - `cargo test -p xcl --lib pipeline`: **10 passed, 0 failed** — includes the new `pipeline_library` tests (`corrupted_blob_falls_back_to_empty_library` verified: a bad on-disk blob logs the rejection and starts fresh). - Scope note: ~438 changed lines, slightly over the ~400-line guideline; the caching + heap-staging changes may want splitting, maintainer's call. A retail smoke run is probably still needed before merge per CONTRIBUTING (runtime change). AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 12:44 UTC · original

Fix verification from the Wine/RDNA3 lane: re-merged the updated head dfcd403 onto current main and re-ran corrupted_blob_falls_back_to_empty_library, which failed 2/2 for me at the previous head (my comment above, panic library created after rejection at pipeline_library.rs:309).

It now passes in isolation on the merged lane (3c335f4, release profile). The empty-slice dangling-pointer explanation matches what I saw on the Wine side too: the rejection log fired but the "empty" library came back as a valid creation.

Fixed on this axis. Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 12:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7131855480) Fix verification from the Wine/RDNA3 lane: re-merged the updated head `dfcd403` onto current main and re-ran `corrupted_blob_falls_back_to_empty_library`, which failed 2/2 for me at the previous head (my comment above, panic `library created after rejection` at `pipeline_library.rs:309`). It now passes in isolation on the merged lane (`3c335f4`, release profile). The empty-slice dangling-pointer explanation matches what I saw on the Wine side too: the rejection log fired but the "empty" library came back as a valid creation. Fixed on this axis. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 14:52 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA test of dfcd403, 3 runs of 130 s in a row of a retail title: the library was saved and loaded again, but no pipeline was taken from it in either rerun, so the second and third runs were no faster than the first.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton 3.1 with the relaxed-vtable patch from #175 and a local dxil-spirv patch, VKD3D_CONFIG=ignore_shared_fence. RTX 4070 12 GB (driver 615.71.09, 32-lane waves), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), DXC 1.9.2609.5, XCL_NETWORK=0, XCL_PSO_PRELOAD=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through XCL_PRESS_AT. dfcd403 merged onto main 67a3735 + #684 (e56dbc3) without conflicts. No host-pipelines.bin existed before run 1.

Tested

  • cargo test --release -p xcl --lib for pipeline_library and console_heap under Wine, on the merge: 7 passed, 0 failed.
run 1 (no library yet) run 2 run 3
loaded host pipeline library at start – 2,832 B 5,600 B
last saved pipeline library line 2,832 B, 0 graphics loaded, 0 compute loaded 5,600 B, 0 graphics loaded, 0 compute loaded 8,176 B, 0 graphics loaded, 0 compute loaded
loaded … PSO from pipeline library lines 0 0 0
compute PSO with the translated console CS lines 344 344 399
burst of pipeline creation ([SHADER] lines) 60 s to 70 s 60 s to 70 s 60 s to 70 s
last 2 s with a present 100.2 s 102.1 s 99.1 s

The stall after 100 s is the one of #662 in all three; in run 2 one compute pipeline of 1,108,268 B of DXIL was being built from 101 s to 128 s. The file grew by about the same amount each run.

Read

  • pipeline_library.rs:118 and :132: the name of a pipeline mixes in pRootSignature's raw interface pointer. That is an address of this run, not the root signature's content, so the next run only finds a pipeline if its root signature happens to land at the same address. I think this is why nothing was loaded and why the file grows each run instead of settling, but I could not read the names out of vkd3d-proton's blob to show it; LoadGraphicsPipeline failing for another reason under vkd3d-proton would look the same in these logs. The description says the hash covers root signatures; would hashing the root signature's bytes be what was meant?
  • pipeline_library.rs:102 (graphics_pso_name): of the pipeline's state the name takes the topology type, the number of render targets, the depth format, the sample count and the cull mode. Two pipelines of the same shaders that differ only in blend state, depth test or a render target's format get one name. What does LoadGraphicsPipeline do then on the drivers you tested: refuse the mismatching description, or hand back the stored pipeline?
  • console_heap.rs:417 (copy_range): the loop it replaces resolved every slot of the range with slot() and left out one that is in no heap; this one resolves the first and computes the rest. Can a title's count run past the end of its heap here? If it can, the copy now writes there.

Not tested: a native D3D12 driver, where the library stores real driver blobs (8 KB after three runs of about 500 translated pipelines each (report.json: 477, 476, 540) suggests vkd3d-proton stores next to nothing here); the preload of #690 on; the rest of the test suite; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the tests and the title three times with XCL_PRESS_AT, compared the logs and wrote this report.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 14:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7135086668) Linux (Wine + vkd3d-proton) + NVIDIA test of `dfcd403`, 3 runs of 130 s in a row of a retail title: the library was saved and loaded again, but no pipeline was taken from it in either rerun, so the second and third runs were no faster than the first. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton 3.1 with the relaxed-vtable patch from #175 and a local dxil-spirv patch, `VKD3D_CONFIG=ignore_shared_fence`. RTX 4070 12 GB (driver 615.71.09, 32-lane waves), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), DXC 1.9.2609.5, `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0`. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through `XCL_PRESS_AT`. `dfcd403` merged onto `main` `67a3735` + #684 (`e56dbc3`) without conflicts. No `host-pipelines.bin` existed before run 1. **Tested** - `cargo test --release -p xcl --lib` for `pipeline_library` and `console_heap` under Wine, on the merge: 7 passed, 0 failed. | | run 1 (no library yet) | run 2 | run 3 | |---|---|---|---| | `loaded host pipeline library` at start | – | 2,832 B | 5,600 B | | last `saved pipeline library` line | 2,832 B, 0 graphics loaded, 0 compute loaded | 5,600 B, 0 graphics loaded, 0 compute loaded | 8,176 B, 0 graphics loaded, 0 compute loaded | | `loaded … PSO from pipeline library` lines | 0 | 0 | 0 | | `compute PSO with the translated console CS` lines | 344 | 344 | 399 | | burst of pipeline creation (`[SHADER]` lines) | 60 s to 70 s | 60 s to 70 s | 60 s to 70 s | | last 2 s with a present | 100.2 s | 102.1 s | 99.1 s | The stall after 100 s is the one of #662 in all three; in run 2 one compute pipeline of 1,108,268 B of DXIL was being built from 101 s to 128 s. The file grew by about the same amount each run. **Read** - `pipeline_library.rs:118` and `:132`: the name of a pipeline mixes in `pRootSignature`'s raw interface pointer. That is an address of this run, not the root signature's content, so the next run only finds a pipeline if its root signature happens to land at the same address. I think this is why nothing was loaded and why the file grows each run instead of settling, but I could not read the names out of vkd3d-proton's blob to show it; `LoadGraphicsPipeline` failing for another reason under vkd3d-proton would look the same in these logs. The description says the hash covers root signatures; would hashing the root signature's bytes be what was meant? - `pipeline_library.rs:102` (`graphics_pso_name`): of the pipeline's state the name takes the topology type, the number of render targets, the depth format, the sample count and the cull mode. Two pipelines of the same shaders that differ only in blend state, depth test or a render target's format get one name. What does `LoadGraphicsPipeline` do then on the drivers you tested: refuse the mismatching description, or hand back the stored pipeline? - `console_heap.rs:417` (`copy_range`): the loop it replaces resolved every slot of the range with `slot()` and left out one that is in no heap; this one resolves the first and computes the rest. Can a title's count run past the end of its heap here? If it can, the copy now writes there. **Not tested:** a native D3D12 driver, where the library stores real driver blobs (8 KB after three runs of about 500 translated pipelines each (`report.json`: 477, 476, 540) suggests vkd3d-proton stores next to nothing here); the preload of #690 on; the rest of the test suite; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the tests and the title three times with `XCL_PRESS_AT`, compared the logs and wrote this report.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 15:38 UTC · original

Thank you for the detailed profiling and analysis (@⁠Royalflamejlh). All three points have been addressed in commit \2e6c458:

  1. Deterministic root signature hashing across process runs:

    • As you correctly identified, hashing the transient raw COM interface pointer address caused each fresh application launch to generate new PSO names under ASLR, preventing warm library lookups and causing the cache file to grow with duplicate driver entries on reruns.
    • We introduced
      ote_root_signature(raw: usize, hash: u64)\ and
      oot_signature_hash(rs). Root signatures now record their deterministic content hash (from their serialized bytecode for title-created signatures, and from static sampler keys and parameters for XCL ABI signatures). In subsequent runs, \pRootSignature\ resolves to its deterministic content hash regardless of host memory address.
  2. Differentiating full pipeline state:

    • Expanded \graphics_pso_name\ to hash all fixed-size POD pipeline state fields: \BlendState, \RasterizerState, \DepthStencilState, all active \RTVFormats, \DSVFormat, \SampleMask, \SampleDesc, and \Flags. Pipelines differing in blend mode, depth/stencil test, or target formats will not collide on the same cache name.
  3. **Heap bounds check in \copy_range**:

    • \Slot\ now tracks
      emaining\ capacity to the end of the heap (\h.n.saturating_sub(k)).
    • \copy_range\ and \copy_console_slots\ clamp
      = n.min(src.remaining).min(dst.remaining), preventing out-of-bounds copies if a title requests a range exceeding its allocated heap.
**@⁠UnkwnDev** on GitHub · 2026-11-24 15:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7136364239) Thank you for the detailed profiling and analysis (@⁠Royalflamejlh). All three points have been addressed in commit \2e6c458\: 1. **Deterministic root signature hashing across process runs**: - As you correctly identified, hashing the transient raw COM interface pointer address caused each fresh application launch to generate new PSO names under ASLR, preventing warm library lookups and causing the cache file to grow with duplicate driver entries on reruns. - We introduced \ ote_root_signature(raw: usize, hash: u64)\ and \ oot_signature_hash(rs)\. Root signatures now record their deterministic content hash (from their serialized bytecode for title-created signatures, and from static sampler keys and parameters for XCL ABI signatures). In subsequent runs, \pRootSignature\ resolves to its deterministic content hash regardless of host memory address. 2. **Differentiating full pipeline state**: - Expanded \graphics_pso_name\ to hash all fixed-size POD pipeline state fields: \BlendState\, \RasterizerState\, \DepthStencilState\, all active \RTVFormats\, \DSVFormat\, \SampleMask\, \SampleDesc\, and \Flags\. Pipelines differing in blend mode, depth/stencil test, or target formats will not collide on the same cache name. 3. **Heap bounds check in \copy_range\**: - \Slot\ now tracks \ emaining\ capacity to the end of the heap (\h.n.saturating_sub(k)\). - \copy_range\ and \copy_console_slots\ clamp \ = n.min(src.remaining).min(dst.remaining)\, preventing out-of-bounds copies if a title requests a range exceeding its allocated heap.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 16:53 UTC · original · edited 2026-11-24 17:04 UTC

@⁠UnkwnDev 2e6c458 fixes the names: in two reruns on Linux (Wine + vkd3d-proton) + NVIDIA the library was loaded, its pipelines were taken from it and the file stopped growing. What it holds is only what the title made before its last save, though, and here that leaves out nearly all the compute pipelines of the world load (327 of 334 in run 1), which were built again in each rerun.

Setup: as in my comment above, except: 2e6c458 merged onto main b7aa9f3 + #684 (e56dbc3) without conflicts, runs of 125 s, and the A press came at 16 s instead of 44.8 s, so the times are not comparable with that comment's. No host-pipelines.bin existed before run 1.

Tested

  • cargo test --release -p xcl --lib for pipeline_library and console_heap under Wine, on the merge: 7 passed, 0 failed.
run 1 (no library yet) run 2 run 3
loaded host pipeline library at start – 7,184 B 7,184 B
saved pipeline library lines 4, the last at 86.3 s: 7,184 B none none
the first 5 translated pipelines built loaded from the library (4 graphics, 1 compute) loaded from the library (4 graphics, 1 compute)
compute pipelines built before 70 s 8 0 0
compute pipelines built from 70 s on 334 344 382
last 2 s with a present 87.4 s 88.4 s 76.1 s
the title's null write at game+0x23cf683 116.5 s 118.5 s 105.5 s

With dfcd403 the file grew from 2,832 to 8,176 B over three runs and nothing was loaded.

Run 3 followed a 3 minute offline shader pass on this machine that filled other caches, so its earlier end is not the library's doing. One more start between runs 2 and 3 ended at 32.9 s in the fault that #751 is about (msvcrt.dll+0xa52b under title_textures::subresources); it is not in the table.

Read

  • pipeline_library.rs:248 (save) runs from present.rs:755 at most every 20 s, and at a clean exit (present.rs:318, loader.rs:415). In run 1 the last save was at 86.3 s, 327 of the 334 world-load compute pipelines were made after it, the last present was at 87.4 s and the run ended in the title's watchdog. So those pipelines never reached the file, and run 2 built 344 again. Would a save that does not depend on a present (after a number of stores, or from the worker that stored) be in scope here?
  • pipeline_library.rs:264: a save with nothing added returns before the log line, so a rerun that loads everything prints no count of what it loaded. I counted loads from the builds that were missing. One line at exit with the two counters would let a tester see the hit rate.
  • pipeline_library.rs:117: a root signature that was never noted hashes to 0. The four note_root_signature calls are in real.rs (:3402, :3423, :4990, :5002 on the merge). No pipeline reaches a name that way on this tree: the three callers of the two name functions (real.rs:3587, :3986, :4004) take the root signature from abi_rs_for (:3580, :3962), which notes it on both of its paths (:3402, :3423).
  • pipeline_library.rs:140 and :150 hash the raw bytes of D3D12_BLEND_DESC and D3D12_DEPTH_STENCIL_DESC, padding included (3 bytes after each RenderTargetWriteMask, 2 after StencilWriteMask). Here the names were stable (the file did not grow), so the padding was the same from run to run on this path; I did not check that it must be.

Not tested: a native D3D12 driver, where the library stores real driver blobs (the 7,184 B file holds 36 pipelines, 21 graphics and 15 compute, at 112 B of blob each, so vkd3d-proton stores next to nothing here; compute builds took under 1 s in all in run 1, and about 34 s in run 2: two took 19.2 s and 14.4 s (902 KB and 727 KB of DXIL) and finished at 107.2 s and 121.6 s, after the last present, and the other 342 took 0.5 s together); the heap clamp in copy_range in a title run (its test passes); AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the new commit, built the tree, ran the tests and the runs, compared the logs and wrote this reply.

Edited 2026-11-24: the Not tested line said the library held "about 140" pipelines (it holds 36) and gave run 1's compute build time without run 2's; the third Read point was a question, which the tree answers. Nothing else changed.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 16:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7138366740) · edited 2026-11-24 17:04 UTC @⁠UnkwnDev `2e6c458` fixes the names: in two reruns on Linux (Wine + vkd3d-proton) + NVIDIA the library was loaded, its pipelines were taken from it and the file stopped growing. What it holds is only what the title made before its last save, though, and here that leaves out nearly all the compute pipelines of the world load (327 of 334 in run 1), which were built again in each rerun. **Setup:** as in my comment above, except: `2e6c458` merged onto `main` `b7aa9f3` + #684 (`e56dbc3`) without conflicts, runs of 125 s, and the A press came at 16 s instead of 44.8 s, so the times are not comparable with that comment's. No `host-pipelines.bin` existed before run 1. **Tested** - `cargo test --release -p xcl --lib` for `pipeline_library` and `console_heap` under Wine, on the merge: 7 passed, 0 failed. | | run 1 (no library yet) | run 2 | run 3 | |---|---|---|---| | `loaded host pipeline library` at start | – | 7,184 B | 7,184 B | | `saved pipeline library` lines | 4, the last at 86.3 s: 7,184 B | none | none | | the first 5 translated pipelines | built | loaded from the library (4 graphics, 1 compute) | loaded from the library (4 graphics, 1 compute) | | compute pipelines built before 70 s | 8 | 0 | 0 | | compute pipelines built from 70 s on | 334 | 344 | 382 | | last 2 s with a present | 87.4 s | 88.4 s | 76.1 s | | the title's null write at `game+0x23cf683` | 116.5 s | 118.5 s | 105.5 s | With `dfcd403` the file grew from 2,832 to 8,176 B over three runs and nothing was loaded. Run 3 followed a 3 minute offline shader pass on this machine that filled other caches, so its earlier end is not the library's doing. One more start between runs 2 and 3 ended at 32.9 s in the fault that #751 is about (`msvcrt.dll+0xa52b` under `title_textures::subresources`); it is not in the table. **Read** - `pipeline_library.rs:248` (`save`) runs from `present.rs:755` at most every 20 s, and at a clean exit (`present.rs:318`, `loader.rs:415`). In run 1 the last save was at 86.3 s, 327 of the 334 world-load compute pipelines were made after it, the last present was at 87.4 s and the run ended in the title's watchdog. So those pipelines never reached the file, and run 2 built 344 again. Would a save that does not depend on a present (after a number of stores, or from the worker that stored) be in scope here? - `pipeline_library.rs:264`: a save with nothing added returns before the log line, so a rerun that loads everything prints no count of what it loaded. I counted loads from the builds that were missing. One line at exit with the two counters would let a tester see the hit rate. - `pipeline_library.rs:117`: a root signature that was never noted hashes to 0. The four `note_root_signature` calls are in `real.rs` (`:3402`, `:3423`, `:4990`, `:5002` on the merge). No pipeline reaches a name that way on this tree: the three callers of the two name functions (`real.rs:3587`, `:3986`, `:4004`) take the root signature from `abi_rs_for` (`:3580`, `:3962`), which notes it on both of its paths (`:3402`, `:3423`). - `pipeline_library.rs:140` and `:150` hash the raw bytes of `D3D12_BLEND_DESC` and `D3D12_DEPTH_STENCIL_DESC`, padding included (3 bytes after each `RenderTargetWriteMask`, 2 after `StencilWriteMask`). Here the names were stable (the file did not grow), so the padding was the same from run to run on this path; I did not check that it must be. **Not tested:** a native D3D12 driver, where the library stores real driver blobs (the 7,184 B file holds 36 pipelines, 21 graphics and 15 compute, at 112 B of blob each, so vkd3d-proton stores next to nothing here; compute builds took under 1 s in all in run 1, and about 34 s in run 2: two took 19.2 s and 14.4 s (902 KB and 727 KB of DXIL) and finished at 107.2 s and 121.6 s, after the last present, and the other 342 took 0.5 s together); the heap clamp in `copy_range` in a title run (its test passes); AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the new commit, built the tree, ran the tests and the runs, compared the logs and wrote this reply. **Edited 2026-11-24:** the *Not tested* line said the library held "about 140" pipelines (it holds 36) and gave run 1's compute build time without run 2's; the third *Read* point was a question, which the tree answers. Nothing else changed.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 18:13 UTC · original

@⁠Royalflamejlh Thanks for the detailed profile and trace analysis. We have updated the branch with commit 8dbf4cb addressing all three points:

  1. Batch store save trigger:
    store_graphics and store_compute now trigger save(false) whenever a batch of 16 new pipelines accumulates (BATCH_SAVE_THRESHOLD = 16). In save(), batch_ready bypasses the 20s interval throttle so world-loading compute pipelines compiled in the background without active frame presentation are flushed directly to disk. In addition, report::write_final() now flushes the library on termination to ensure trailing pipelines are persisted.

  2. Structure padding sanitization:
    Rather than hashing raw byte slices of descriptor structs, hash_blend_desc, hash_depth_stencil_desc, and hash_rasterizer_desc explicitly hash individual fields. This prevents undefined padding bytes (such as the 3 alignment bytes following each RenderTargetWriteMask and 2 bytes following StencilWriteMask) from affecting name hashes across compilers and platforms. Verified via unit test padding_bytes_do_not_affect_pipeline_hash.

  3. Telemetry summary logging:
    Added log_summary() which outputs D3D12.X: pipeline library summary: {gl} graphics loaded, {cl} compute loaded, {gs} graphics stored, {cs} compute stored. This runs on save(true) during clean exit, window close, and report::write_final(), making cache hit rates visible on runs where zero new pipelines were stored.

**@⁠UnkwnDev** on GitHub · 2026-11-24 18:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7140342702) @⁠Royalflamejlh Thanks for the detailed profile and trace analysis. We have updated the branch with commit `8dbf4cb` addressing all three points: 1. Batch store save trigger: `store_graphics` and `store_compute` now trigger `save(false)` whenever a batch of 16 new pipelines accumulates (`BATCH_SAVE_THRESHOLD = 16`). In `save()`, `batch_ready` bypasses the 20s interval throttle so world-loading compute pipelines compiled in the background without active frame presentation are flushed directly to disk. In addition, `report::write_final()` now flushes the library on termination to ensure trailing pipelines are persisted. 2. Structure padding sanitization: Rather than hashing raw byte slices of descriptor structs, `hash_blend_desc`, `hash_depth_stencil_desc`, and `hash_rasterizer_desc` explicitly hash individual fields. This prevents undefined padding bytes (such as the 3 alignment bytes following each `RenderTargetWriteMask` and 2 bytes following `StencilWriteMask`) from affecting name hashes across compilers and platforms. Verified via unit test `padding_bytes_do_not_affect_pipeline_hash`. 3. Telemetry summary logging: Added `log_summary()` which outputs `D3D12.X: pipeline library summary: {gl} graphics loaded, {cl} compute loaded, {gs} graphics stored, {cs} compute stored`. This runs on `save(true)` during clean exit, window close, and `report::write_final()`, making cache hit rates visible on runs where zero new pipelines were stored.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 18:23 UTC · original

Thanks for the thorough review and catch.

  1. Root signature hashing:
    graphics_pso_name and compute_pso_name now incorporate deterministic root signature content hashes (note_root_signature) rather than ephemeral COM pointer addresses. The content hash is recorded at root signature creation and remains stable across process lifetimes and ASLR.

  2. copy_range page boundary handling:
    In crates/xcl/src/hle/d3d12x/console_heap.rs, copy_range now splits multi-slot copies across PAGE_SLOTS (256-slot) boundaries, querying slot() for each run so destination descriptors are renumbered using each page's distinct GLOBAL shared heap allocation. Range copying is clamped to remaining heap capacity for both source and destination heaps. Added a test in console_heap.rs verifying that descriptors copied across the page boundary receive the correct page-1 indices.

Tested clean at head a771990 (cargo test -p xcl pipeline_library: 6/6 passed; cargo test -p xcl console_heap: 4/4 passed).

**@⁠UnkwnDev** on GitHub · 2026-11-24 18:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7140585181) Thanks for the thorough review and catch. 1. Root signature hashing: graphics_pso_name and compute_pso_name now incorporate deterministic root signature content hashes (note_root_signature) rather than ephemeral COM pointer addresses. The content hash is recorded at root signature creation and remains stable across process lifetimes and ASLR. 2. copy_range page boundary handling: In crates/xcl/src/hle/d3d12x/console_heap.rs, copy_range now splits multi-slot copies across PAGE_SLOTS (256-slot) boundaries, querying slot() for each run so destination descriptors are renumbered using each page's distinct GLOBAL shared heap allocation. Range copying is clamped to remaining heap capacity for both source and destination heaps. Added a test in console_heap.rs verifying that descriptors copied across the page boundary receive the correct page-1 indices. Tested clean at head a771990 (cargo test -p xcl pipeline_library: 6/6 passed; cargo test -p xcl console_heap: 4/4 passed).
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-24 18:53 UTC · original

Updated branch at 19381fb following a self-review pass:

  1. InputLayout and NodeMask hashing: graphics_pso_name in crates/xcl/src/hle/d3d12x/pipeline_library.rs now hashes all D3D12_INPUT_ELEMENT_DESC fields (SemanticName, SemanticIndex, Format, InputSlot, AlignedByteOffset, InputSlotClass, InstanceDataStepRate) plus NodeMask so graphics pipelines differing only in vertex input layout do not collide. Also forwarded non-console GS bytecode to graphics_pso_name in crates/xcl/src/hle/d3d12x/real.rs.
  2. Save I/O serialization: save() now acquires SAVE_IO across library serialization and write_atomically() so concurrent batch-threshold saves and present/shutdown saves cannot race on remove_file/rename or overwrite newer snapshots with older ones.
  3. Trace parity: load_graphics cache hits now also record PSO_SHADERS under XCL_TRACE_FRAME.

Verified at 19381fb: cargo test -p xcl --lib pipeline_library (7/7 passed), console_heap (4/4 passed), real (28/28 passed). Note: scripts/smoke.ps1 still needs to be re-run against 19381fb to update the regression block.

**@⁠UnkwnDev** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7141286652) Updated branch at 19381fb following a self-review pass: 1. InputLayout and NodeMask hashing: graphics_pso_name in crates/xcl/src/hle/d3d12x/pipeline_library.rs now hashes all D3D12_INPUT_ELEMENT_DESC fields (SemanticName, SemanticIndex, Format, InputSlot, AlignedByteOffset, InputSlotClass, InstanceDataStepRate) plus NodeMask so graphics pipelines differing only in vertex input layout do not collide. Also forwarded non-console GS bytecode to graphics_pso_name in crates/xcl/src/hle/d3d12x/real.rs. 2. Save I/O serialization: save() now acquires SAVE_IO across library serialization and write_atomically() so concurrent batch-threshold saves and present/shutdown saves cannot race on remove_file/rename or overwrite newer snapshots with older ones. 3. Trace parity: load_graphics cache hits now also record PSO_SHADERS under XCL_TRACE_FRAME. Verified at 19381fb: cargo test -p xcl --lib pipeline_library (7/7 passed), console_heap (4/4 passed), real (28/28 passed). Note: scripts/smoke.ps1 still needs to be re-run against 19381fb to update the regression block.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 19:30 UTC · original

@⁠UnkwnDev 19381fb does it: on Linux (Wine + vkd3d-proton) + NVIDIA the world load's compute pipelines now reach the file and the next run loads them. Three runs in a row from no library, by the new summary line: run 2 loaded 103 graphics and 224 compute pipelines, run 3 loaded 118 and 293, and 5 compute pipelines were still built.

Setup: as in my first comment, except: 19381fb merged onto main c160d86 + #684 (e56dbc3) without conflicts, runs of 125 s, the A press at 16.2 to 18.5 s, all three after the 3 minute offline shader pass my last reply mentions. No host-pipelines.bin existed before run 1.

Tested

  • cargo test --release -p xcl --lib for pipeline_library and console_heap under Wine, on the merge: 11 passed, 0 failed.
run 1 (no library yet) run 2 run 3
loaded host pipeline library at start – 72,128 B 93,320 B
saved pipeline library lines (after the last present) 26 (5) 8 (2) 1 (1)
the file after the run 72,128 B 93,320 B 95,096 B
summary: graphics / compute loaded 0 / 1 103 / 224 118 / 293
summary: graphics / compute stored 106 / 258 28 / 79 5 / 4
compute pipelines built by the driver 261 80 5
last 2 s with a present 84.1 s 78.1 s 84.6 s
the title's null write at game+0x23cf683 113.6 s 106.6 s 114.0 s

The summary line came at the end of each run, which here is the title's watchdog, so report::write_final is reached on that way out too.

The runs did not get shorter as more was loaded: run 2 ended 7.0 s sooner than run 1, run 3 0.4 s later. My guess at why: the file holds about 200 B for each pipeline under vkd3d-proton, too little to be the driver's compiled code, so a load would still leave the driver its work; I did not time a load. What ends these runs is the stall of #662; the 5 compute pipelines run 3 still had to build took 34.1 s between them, and one that is still building when the watchdog fires cannot be stored.

Read

  • pipeline_library.rs:370: save takes SAVE_IO before the check for nothing added at :374, and present.rs:755 calls it on every present. So while a batch save from a build thread serializes and writes, each present waits for that write. With a 95 KB file I would not expect it to show here; I did not time it. Would it on a native driver, where the file is large? The two cheap checks could come before the lock.
  • pipeline_library.rs:289, :330 and :377: every 16 stores the whole library is serialized and written again, on the thread that built the sixteenth. Here that was 21 of run 1's 26 writes, of at most 70.5 KB. Has it been timed where a pipeline's blob is megabytes?

Not tested: a native D3D12 driver; the copy_range change in a title run (its tests pass); the preload of #690 on; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the new commits, built the tree, ran the tests and the three runs, compared the logs and wrote this reply.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 19:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7142205066) @⁠UnkwnDev `19381fb` does it: on Linux (Wine + vkd3d-proton) + NVIDIA the world load's compute pipelines now reach the file and the next run loads them. Three runs in a row from no library, by the new summary line: run 2 loaded 103 graphics and 224 compute pipelines, run 3 loaded 118 and 293, and 5 compute pipelines were still built. **Setup:** as in my first comment, except: `19381fb` merged onto `main` `c160d86` + #684 (`e56dbc3`) without conflicts, runs of 125 s, the A press at 16.2 to 18.5 s, all three after the 3 minute offline shader pass my last reply mentions. No `host-pipelines.bin` existed before run 1. **Tested** - `cargo test --release -p xcl --lib` for `pipeline_library` and `console_heap` under Wine, on the merge: 11 passed, 0 failed. | | run 1 (no library yet) | run 2 | run 3 | |---|---|---|---| | `loaded host pipeline library` at start | – | 72,128 B | 93,320 B | | `saved pipeline library` lines (after the last present) | 26 (5) | 8 (2) | 1 (1) | | the file after the run | 72,128 B | 93,320 B | 95,096 B | | summary: graphics / compute loaded | 0 / 1 | 103 / 224 | 118 / 293 | | summary: graphics / compute stored | 106 / 258 | 28 / 79 | 5 / 4 | | compute pipelines built by the driver | 261 | 80 | 5 | | last 2 s with a present | 84.1 s | 78.1 s | 84.6 s | | the title's null write at `game+0x23cf683` | 113.6 s | 106.6 s | 114.0 s | The summary line came at the end of each run, which here is the title's watchdog, so `report::write_final` is reached on that way out too. The runs did not get shorter as more was loaded: run 2 ended 7.0 s sooner than run 1, run 3 0.4 s later. My guess at why: the file holds about 200 B for each pipeline under vkd3d-proton, too little to be the driver's compiled code, so a load would still leave the driver its work; I did not time a load. What ends these runs is the stall of #662; the 5 compute pipelines run 3 still had to build took 34.1 s between them, and one that is still building when the watchdog fires cannot be stored. **Read** - `pipeline_library.rs:370`: `save` takes `SAVE_IO` before the check for nothing added at `:374`, and `present.rs:755` calls it on every present. So while a batch save from a build thread serializes and writes, each present waits for that write. With a 95 KB file I would not expect it to show here; I did not time it. Would it on a native driver, where the file is large? The two cheap checks could come before the lock. - `pipeline_library.rs:289`, `:330` and `:377`: every 16 stores the whole library is serialized and written again, on the thread that built the sixteenth. Here that was 21 of run 1's 26 writes, of at most 70.5 KB. Has it been timed where a pipeline's blob is megabytes? **Not tested:** a native D3D12 driver; the `copy_range` change in a title run (its tests pass); the preload of #690 on; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the new commits, built the tree, ran the tests and the three runs, compared the logs and wrote this reply. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 03:10 UTC · original

Regression run of 19381fbd on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 19381fbd91c689b948774a5f6c15b8a233998047
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1617 (PresentX 1617)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-25 03:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7151658736) Regression run of `19381fbd` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 19381fbd91c689b948774a5f6c15b8a233998047 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1617 (PresentX 1617) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-25 07:31 UTC · original

@⁠Royalflamejlh @⁠Toons29 Applied the lock-ordering refinement from review and rebased onto origin/main (568e7db) at commit 2727c0d (merging create_graphics_pso_cached with pipeline_library load/store in real.rs):

  • pipeline_library::save(now) now performs the cheap pending-count / SAVE_INTERVAL_MS checks before touching SAVE_IO, and non-forced present-frame saves (!now) use SAVE_IO.try_lock() so frame presentation never stalls behind a background batch write.
  • Re-verified at 2727c0d: pipeline_library (7 passed), console_heap (7 passed), hle::d3d12x::real (46 passed), cargo check -p xcl --tests clean.

A fresh scripts/smoke.ps1 run will be needed on 2727c0d since the branch was updated and rebased after 19381fbd.

**@⁠UnkwnDev** on GitHub · 2026-11-25 07:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7155961104) @⁠Royalflamejlh @⁠Toons29 Applied the lock-ordering refinement from review and rebased onto `origin/main` (`568e7db`) at commit `2727c0d` (merging `create_graphics_pso_cached` with `pipeline_library` load/store in `real.rs`): - `pipeline_library::save(now)` now performs the cheap pending-count / `SAVE_INTERVAL_MS` checks before touching `SAVE_IO`, and non-forced present-frame saves (`!now`) use `SAVE_IO.try_lock()` so frame presentation never stalls behind a background batch write. - Re-verified at `2727c0d`: `pipeline_library` (7 passed), `console_heap` (7 passed), `hle::d3d12x::real` (46 passed), `cargo check -p xcl --tests` clean. A fresh `scripts/smoke.ps1` run will be needed on `2727c0d` since the branch was updated and rebased after `19381fbd`.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 08:48 UTC · original

@⁠UnkwnDev 2727c0d does what you say for the point I raised: save(false) now returns before SAVE_IO when nothing is pending, or when fewer than 16 are and the last save was under 20 s ago, and otherwise only tries the lock (pipeline_library.rs:364 to :380), so a present no longer waits for another thread's write. It still writes the file itself when it gets to a due save first (the run's first, 16 pending, or 20 s since the last): the present thread made 17 of the 96 saves in these runs, each the run's first or 20 to 25 s after the one before. On Linux (Wine + vkd3d-proton) + NVIDIA the library still saves and loads across runs.

Setup: as in my earlier comments, except: 2727c0d merged onto main 568e7db + #684 (e56dbc3), 100 s runs, A pressed at 16.2 to 18.5 s. No host-pipelines.bin before runs 1, 4 and 5.

Tested

run 1 (no library) run 2 run 3 run 4 (no library) run 5 (no library)
library at start – 3,624 B 69,752 B – –
summary: graphics / compute loaded (no summary, below) 10 / 9 86 / 226 0 / 3 0 / 1
compute pipelines built by the driver 8 250 66 333 283
last 2 s with a present 81.5 s 86.4 s 82.9 s 76.4 s 80.1 s
  • Runs 4 and 5 started with no file, so their 3 and 1 compute loads were of pipelines stored earlier in the same run.
  • Run 1 ended at 82.5 s with process ends with status 0x3 from inside d3d12core.dll (vkd3d-proton), before the summary line, on the thread that had built all 8 of its compute pipelines (the last at 55.6 s), not the present thread. That was 1 s after its last present; the other four began the world load's burst of compute builds near their last presents, at 76 to 84 s, and run 1 had built none of it: its 8 builds match the 10 and 9 that runs 4 and 5 made before their bursts. Wine's error channel was off in run 1 and its console shows no message before the end; runs 4 and 5 repeated its start from no library with it on and did not end that way. Four other runs here have ended with status 3 since 23 Nov, all on another card, a tree without this pull request and winevulkan.dll at the top of the stack. One run in five is too few to say whether it is the change.

Not tested: the unit tests at 2727c0d; whether a loaded pipeline saves the driver's time here; Windows; AMD and Intel.

AI use: Claude Code (Claude Opus 5.5) read the change, ran the title and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 08:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7157502745) @⁠UnkwnDev `2727c0d` does what you say for the point I raised: `save(false)` now returns before `SAVE_IO` when nothing is pending, or when fewer than 16 are and the last save was under 20 s ago, and otherwise only tries the lock (`pipeline_library.rs:364` to `:380`), so a present no longer waits for another thread's write. It still writes the file itself when it gets to a due save first (the run's first, 16 pending, or 20 s since the last): the present thread made 17 of the 96 saves in these runs, each the run's first or 20 to 25 s after the one before. On Linux (Wine + vkd3d-proton) + NVIDIA the library still saves and loads across runs. **Setup:** as in my earlier comments, except: `2727c0d` merged onto `main` `568e7db` + #684 (`e56dbc3`), 100 s runs, A pressed at 16.2 to 18.5 s. No `host-pipelines.bin` before runs 1, 4 and 5. **Tested** | | run 1 (no library) | run 2 | run 3 | run 4 (no library) | run 5 (no library) | |---|---|---|---|---|---| | library at start | – | 3,624 B | 69,752 B | – | – | | summary: graphics / compute loaded | (no summary, below) | 10 / 9 | 86 / 226 | 0 / 3 | 0 / 1 | | compute pipelines built by the driver | 8 | 250 | 66 | 333 | 283 | | last 2 s with a present | 81.5 s | 86.4 s | 82.9 s | 76.4 s | 80.1 s | - Runs 4 and 5 started with no file, so their 3 and 1 compute loads were of pipelines stored earlier in the same run. - Run 1 ended at 82.5 s with `process ends with status 0x3` from inside `d3d12core.dll` (vkd3d-proton), before the summary line, on the thread that had built all 8 of its compute pipelines (the last at 55.6 s), not the present thread. That was 1 s after its last present; the other four began the world load's burst of compute builds near their last presents, at 76 to 84 s, and run 1 had built none of it: its 8 builds match the 10 and 9 that runs 4 and 5 made before their bursts. Wine's error channel was off in run 1 and its console shows no message before the end; runs 4 and 5 repeated its start from no library with it on and did not end that way. Four other runs here have ended with status 3 since 23 Nov, all on another card, a tree without this pull request and `winevulkan.dll` at the top of the stack. One run in five is too few to say whether it is the change. **Not tested:** the unit tests at `2727c0d`; whether a loaded pipeline saves the driver's time here; Windows; AMD and Intel. **AI use:** Claude Code (Claude Opus 5.5) read the change, ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-25 09:23 UTC · original

@⁠Royalflamejlh Good observation on the present thread still performing due saves when it reached the 20 s / 16-pending threshold first (17 of 96 saves). Pushed commit 8d0d2a1 so present.rs now calls pipeline_library::save_async(), which runs the atomic save_due pre-check and dispatches a single-flight xcl-pso-save background thread when due. Frame presentation now performs zero serialization or file I/O, while shutdown paths keep synchronous save(true). Re-verified pipeline_library (8/8), hle::d3d12x::real (46/46), and cargo check -p xcl --tests.

**@⁠UnkwnDev** on GitHub · 2026-11-25 09:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7158275509) @⁠Royalflamejlh Good observation on the present thread still performing due saves when it reached the 20 s / 16-pending threshold first (17 of 96 saves). Pushed commit `8d0d2a1` so `present.rs` now calls `pipeline_library::save_async()`, which runs the atomic `save_due` pre-check and dispatches a single-flight `xcl-pso-save` background thread when due. Frame presentation now performs zero serialization or file I/O, while shutdown paths keep synchronous `save(true)`. Re-verified `pipeline_library` (8/8), `hle::d3d12x::real` (46/46), and `cargo check -p xcl --tests`.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-25 10:53 UTC · original

@⁠UnkwnDev 8d0d2a1 does it: on Linux (Wine + vkd3d-proton) + NVIDIA the present thread made 0 of the library's saves in 2 runs (31 and 3 saves), and the next run still loaded what the first saved.

Setup: as in my earlier comments, except: 8d0d2a1 merged onto main 568e7db + #684, 100 s runs, XCL_PSO_PRELOAD=0, WINEDEBUG=err+all,fixme-all, A pressed at 16.4 s in both runs. No host-pipelines.bin before run 1.

Tested

run 1 (no library) run 2
library at start – 88,960 B
saves on the present thread 0 0
saves on a thread that logs nothing else, a new one each time 5 2
saves on build threads 25 0
save at XCL_RUN_SECONDS (100.0 s) 1 1
summary: graphics / compute loaded 0 / 3 123 / 324
compute pipelines built by the driver 321 3
last 2 s with a present 74.6 s 82.7 s
  • Build threads still write the file themselves: store_pipeline calls save(false) once 16 are pending (pipeline_library.rs:324), which made 25 of run 1's 31 saves, between 72.9 and 73.6 s.
  • A run between these two is left out: it ran while another job was filling this machine's disk, its log has seven gaps of 4 to 14 s in the 2 s activity line, and the title took none of four A presses (no gamepad buttons line, 590 frames on the start screen). It loaded the same 88,960 B and stored nothing, so run 2 began with run 1's file.

Not tested: the suite at this head; a run that ends other than by XCL_RUN_SECONDS (a crash, the title's watchdog); Windows; AMD and Intel.

AI use: Claude Code (Claude Opus 5.5) read the change, ran the title and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-25 10:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7160299817) @⁠UnkwnDev `8d0d2a1` does it: on Linux (Wine + vkd3d-proton) + NVIDIA the present thread made 0 of the library's saves in 2 runs (31 and 3 saves), and the next run still loaded what the first saved. **Setup:** as in my earlier comments, except: `8d0d2a1` merged onto `main` `568e7db` + #684, 100 s runs, `XCL_PSO_PRELOAD=0`, `WINEDEBUG=err+all,fixme-all`, A pressed at 16.4 s in both runs. No `host-pipelines.bin` before run 1. **Tested** | | run 1 (no library) | run 2 | |---|---|---| | library at start | – | 88,960 B | | saves on the present thread | 0 | 0 | | saves on a thread that logs nothing else, a new one each time | 5 | 2 | | saves on build threads | 25 | 0 | | save at `XCL_RUN_SECONDS` (100.0 s) | 1 | 1 | | summary: graphics / compute loaded | 0 / 3 | 123 / 324 | | compute pipelines built by the driver | 321 | 3 | | last 2 s with a present | 74.6 s | 82.7 s | - Build threads still write the file themselves: `store_pipeline` calls `save(false)` once 16 are pending (`pipeline_library.rs:324`), which made 25 of run 1's 31 saves, between 72.9 and 73.6 s. - A run between these two is left out: it ran while another job was filling this machine's disk, its log has seven gaps of 4 to 14 s in the 2 s activity line, and the title took none of four A presses (no `gamepad buttons` line, 590 frames on the start screen). It loaded the same 88,960 B and stored nothing, so run 2 began with run 1's file. **Not tested:** the suite at this head; a run that ends other than by `XCL_RUN_SECONDS` (a crash, the title's watchdog); Windows; AMD and Intel. **AI use:** Claude Code (Claude Opus 5.5) read the change, ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-25 16:05 UTC · original

Rebased onto origin/main (0829441) and pushed commit 7866911 addressing the remaining review points:

  1. Non-blocking threshold saves (@Royalflamejlh):

    • store_pipeline in crates/xcl/src/hle/d3d12x/pipeline_library.rs now triggers save_async() instead of synchronous save(false) at BATCH_SAVE_THRESHOLD (16), so build threads no longer serialize or write host-pipelines.bin inline.
    • save_async() coordinates a SAVE_REQUESTED flag with BG_SAVING so stores arriving while write_atomically is in flight are drained by the xcl-pso-save worker; synchronous save(true) remains only on shutdown/flush paths (WM_CLOSE, DLL_PROCESS_DETACH, report::write_final).
  2. Root signature hashing (@vladbondarenko97):

    • Verified graphics_pso_name and compute_pso_name use root_signature_hash / note_root_signature (no raw COM pointer addresses hashed). Also preserved the empty-fallback root signature hash in dev_create_root_signature, noted dispatch_chain::build root signatures, preserved dred::label on graphics library cache hits, and added unit test root_signature_hash_is_stable_across_com_pointers.
  3. Paged copy_range and bounds checks (@vladbondarenko97):

    • Updated copy_range in crates/xcl/src/hle/d3d12x/console_heap.rs to split across both PAGE_SLOTS (256-slot view pages) and SAMPLER_PAGE_SLOTS (8-slot sampler pages from origin/main), clamp n to src.remaining.min(dst.remaining), reject mismatched src.sampler != dst.sampler, and resolve unmapped sampler slots per-slot so exhausted shared sampler heaps keep reserved index 0.
    • Added unit test copy_range_crosses_noncontiguous_pages_and_clamps_oob verifying cross-page descriptor index mapping across non-contiguous view and sampler pages as well as OOB source/destination clamping.

Verified after the final edit on Windows (Intel Arc A770):

  • cargo test -p xcl --lib pipeline_library -- --test-threads=1: 9 passed, 0 failed
  • cargo test -p xcl --lib console_heap -- --test-threads=1: 10 passed, 0 failed
  • cargo test -p xcl --lib hle::d3d12x::real -- --test-threads=1: 57 passed, 0 failed
  • cargo clippy --workspace --all-targets --locked: zero errors or new warnings in our touched lines/files (full -- -D warnings fails on pre-existing origin/main lints such as clippy::approx_constant in lower_valu.rs, lower_wide.rs, and recomp/lower.rs).
**@⁠UnkwnDev** on GitHub · 2026-11-25 16:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7167590603) Rebased onto `origin/main` (`0829441`) and pushed commit `7866911` addressing the remaining review points: 1. **Non-blocking threshold saves (`@Royalflamejlh`)**: - `store_pipeline` in `crates/xcl/src/hle/d3d12x/pipeline_library.rs` now triggers `save_async()` instead of synchronous `save(false)` at `BATCH_SAVE_THRESHOLD` (16), so build threads no longer serialize or write `host-pipelines.bin` inline. - `save_async()` coordinates a `SAVE_REQUESTED` flag with `BG_SAVING` so stores arriving while `write_atomically` is in flight are drained by the `xcl-pso-save` worker; synchronous `save(true)` remains only on shutdown/flush paths (`WM_CLOSE`, `DLL_PROCESS_DETACH`, `report::write_final`). 2. **Root signature hashing (`@vladbondarenko97`)**: - Verified `graphics_pso_name` and `compute_pso_name` use `root_signature_hash` / `note_root_signature` (no raw COM pointer addresses hashed). Also preserved the empty-fallback root signature hash in `dev_create_root_signature`, noted `dispatch_chain::build` root signatures, preserved `dred::label` on graphics library cache hits, and added unit test `root_signature_hash_is_stable_across_com_pointers`. 3. **Paged `copy_range` and bounds checks (`@vladbondarenko97`)**: - Updated `copy_range` in `crates/xcl/src/hle/d3d12x/console_heap.rs` to split across both `PAGE_SLOTS` (256-slot view pages) and `SAMPLER_PAGE_SLOTS` (8-slot sampler pages from `origin/main`), clamp `n` to `src.remaining.min(dst.remaining)`, reject mismatched `src.sampler != dst.sampler`, and resolve unmapped sampler slots per-slot so exhausted shared sampler heaps keep reserved index `0`. - Added unit test `copy_range_crosses_noncontiguous_pages_and_clamps_oob` verifying cross-page descriptor index mapping across non-contiguous view and sampler pages as well as OOB source/destination clamping. Verified after the final edit on Windows (Intel Arc A770): - `cargo test -p xcl --lib pipeline_library -- --test-threads=1`: 9 passed, 0 failed - `cargo test -p xcl --lib console_heap -- --test-threads=1`: 10 passed, 0 failed - `cargo test -p xcl --lib hle::d3d12x::real -- --test-threads=1`: 57 passed, 0 failed - `cargo clippy --workspace --all-targets --locked`: zero errors or new warnings in our touched lines/files (full `-- -D warnings` fails on pre-existing `origin/main` lints such as `clippy::approx_constant` in `lower_valu.rs`, `lower_wide.rs`, and `recomp/lower.rs`).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:32 UTC · original

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.

**@⁠DavidM1911** on GitHub · 2026-11-26 03:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7181804793) 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.
github-bot force-pushed github-bot/gh-1006 from 7866911370 to ec5bac9930 2026-11-26 06:17:08 +00:00 Compare
Author
Owner

@⁠UnkwnDev on GitHub · 2026-11-26 05:19 UTC · original

@⁠DavidM1911 Rebased onto origin/main (b49be18) at commit ec5bac9:

  • Resolved the additive unit-test conflict in crates/xcl/src/hle/d3d12x/console_heap.rs preserving both upstream sampler-heap tests and copy_range_crosses_noncontiguous_pages_and_clamps_oob.
  • Updated compute_container in real.rs for ComputeBuild (mode != ComputeBuild::Chain) and populated the remaining field in uav_clear_handles_translate_console_slots in list_x.rs.
  • Zero conflict markers verified across crates/.

Verification on Windows (Intel Arc A770, --test-threads=1):

  • cargo test -p xcl --lib pipeline_library: 9 passed, 0 failed
  • cargo test -p xcl --lib console_heap: 13 passed, 0 failed
  • cargo test -p xcl --lib hle::d3d12x::real: 60 passed, 0 failed
**@⁠UnkwnDev** on GitHub · 2026-11-26 05:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#issuecomment-7183377807) @⁠DavidM1911 Rebased onto `origin/main` (`b49be18`) at commit `ec5bac9`: - Resolved the additive unit-test conflict in `crates/xcl/src/hle/d3d12x/console_heap.rs` preserving both upstream sampler-heap tests and `copy_range_crosses_noncontiguous_pages_and_clamps_oob`. - Updated `compute_container` in `real.rs` for `ComputeBuild` (`mode != ComputeBuild::Chain`) and populated the `remaining` field in `uav_clear_handles_translate_console_slots` in `list_x.rs`. - Zero conflict markers verified across `crates/`. Verification on Windows (Intel Arc A770, `--test-threads=1`): - `cargo test -p xcl --lib pipeline_library`: 9 passed, 0 failed - `cargo test -p xcl --lib console_heap`: 13 passed, 0 failed - `cargo test -p xcl --lib hle::d3d12x::real`: 60 passed, 0 failed
Author
Owner

@⁠vladbondarenko97 on GitHub · 2026-11-24 14:25 UTC · original · reviewed

Two problems I checked against the head (dfcd403) and main (930e8b4):

1. The pipeline library cannot hit in a later run. graphics_pso_name and compute_pso_name in pipeline_library.rs mix in rs_ptr, the raw COM pointer of desc.pRootSignature:

let rs_ptr = desc.pRootSignature.as_ref().map_or(0, |rs| windows::core::Interface::as_raw(rs) as usize as u64);
h1 = (h1 ^ rs_ptr).wrapping_mul(0x100_0000_01b3);

That address is different in every process, so a name stored by one run never matches in the next, and the persistent library always misses. Hashing the root signature's serialized blob (or the hash XCL already uses for the root signature, e.g. the [SHADER] rootsig <hash> value) would keep the names stable.

2. copy_range writes the wrong descriptor index when a copy crosses a 256-slot page. For view heaps, slot() (console_heap.rs:331–338 on main) gives each page its own place in the shared heap: index = first + 2 * (k - k0), with first per page from page_of. copy_range instead computes dst.index + k * 2 for every k, as if the shared heap were contiguous across pages. Once dst.k + k crosses into the next page, w[0] gets an index in the wrong place of the shared heap, and the shader reads another descriptor. There is also no check that dst.k + n stays inside the heap (h.n) before writing dst.at + k * step.

Calling slot() (or page_of) per destination slot when the range crosses a page, or splitting the copy at page boundaries, would fix both.

Review assisted by Claude Code (Claude Opus 5.5); I checked both points against the code above. Not run.

**@⁠vladbondarenko97** on GitHub · 2026-11-24 14:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1006#pullrequestreview-6040983734) · **reviewed** Two problems I checked against the head (`dfcd403`) and `main` (`930e8b4`): **1. The pipeline library cannot hit in a later run.** `graphics_pso_name` and `compute_pso_name` in `pipeline_library.rs` mix in `rs_ptr`, the raw COM pointer of `desc.pRootSignature`: ```rust let rs_ptr = desc.pRootSignature.as_ref().map_or(0, |rs| windows::core::Interface::as_raw(rs) as usize as u64); h1 = (h1 ^ rs_ptr).wrapping_mul(0x100_0000_01b3); ``` That address is different in every process, so a name stored by one run never matches in the next, and the persistent library always misses. Hashing the root signature's serialized blob (or the hash XCL already uses for the root signature, e.g. the `[SHADER] rootsig <hash>` value) would keep the names stable. **2. `copy_range` writes the wrong descriptor index when a copy crosses a 256-slot page.** For view heaps, `slot()` (console_heap.rs:331–338 on `main`) gives each page its own place in the shared heap: `index = first + 2 * (k - k0)`, with `first` per page from `page_of`. `copy_range` instead computes `dst.index + k * 2` for every `k`, as if the shared heap were contiguous across pages. Once `dst.k + k` crosses into the next page, `w[0]` gets an index in the wrong place of the shared heap, and the shader reads another descriptor. There is also no check that `dst.k + n` stays inside the heap (`h.n`) before writing `dst.at + k * step`. Calling `slot()` (or `page_of`) per destination slot when the range crosses a page, or splitting the copy at page boundaries, would fix both. *Review assisted by Claude Code (Claude Opus 5.5); I checked both points against the code above. Not run.*
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1006/head:github-bot/gh-1006'
git switch 'github-bot/gh-1006'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1006'
git switch 'github-bot/gh-1006'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1006'
git switch 'github-bot/gh-1006'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1006'
git switch 'main'
git merge --squash 'github-bot/gh-1006'
git switch 'main'
git merge --ff-only 'github-bot/gh-1006'
git switch 'main'
git merge 'github-bot/gh-1006'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.