d3d12x, dstorage, recomp: retail title engine stability, BVH descriptors, and multi-monitor windowing #1288

Closed
saadabdullah07bd wants to merge 3 commits from upstream-pr/1298 into main
saadabdullah07bd commented 2026-11-24 14:29:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by saadabdullah07bd on 2026-11-24T14:29:21Z.


D3D12.X, DirectStorage, recomp: retail title engine stability, BVH descriptors, and multi-monitor windowing

Fixes engine crashes, asset stream stalls, and display initialization bugs when executing game_scarlett_master.exe under XCL.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: resolve raytracing acceleration structure VA via kernelx::mirrors::source(va) prior to RDNA2 BVH descriptor generation.
  • crates/xcl/src/hle/d3d12x/real.rs: map MS/AS subobject types 24 and 25 to D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS in fallback stream.
  • crates/xcl/src/hle/d3d12x/device_x.rs: sanitize DISABLE_GPU_TIMEOUT flag on consumer drivers unless overridden with XCL_DISABLE_GPU_TIMEOUT=1.
  • crates/xcl/src/hle/d3d12x/sparse.rs: introduce 4x 150ms retry loop on VirtualAlloc(MEM_COMMIT) to withstand dynamic paging file commit stalls.
  • crates/xcl/src/hle/d3d12x/present.rs: respect XCL_FULLSCREEN=0 override and support negative coordinate offsets in multi-monitor configurations.
  • crates/xcl/src/hle/dstorage.rs: default bcpack_fill_from_env() to enabled so unsupported BCPack blocks soft-fill instead of halting the asset queue.
  • crates/xcl/src/hle/d3d12x/title_textures.rs: throttle upload batch size threshold from 256 MB to 64 MB.
  • crates/xcl/src/gpu/recomp/dxc.rs: accept valid DXBC containers with non-contiguous DXIL chunks.
  • crates/xcl/src/loader.rs: neutralize title watchdog assert and worker thread during startup asset streaming.

Tested

  • hardware: AMD Radeon RX 6800 (driver 32.0.21045.29003), AMD Ryzen 7 7700, Windows 11 x64, Rust 1.99.1, release
  • cargo test --workspace -- --test-threads=4: 541 passed, 0 failed, 21 ignored (SKIPPED GPU tests: 0)
  • game: retail title (the release group v1.0.2.1), boots past watchdog assert and streams 3.7 GB asset heap into windowed display

Regression run

main:

<!-- greyfinch-sync:ivall/xcl:issue:6584079701 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1298). Originally posted by [saadabdullah07bd](https://github.com/saadabdullah07bd) on 2026-11-24T14:29:21Z. --- D3D12.X, DirectStorage, recomp: retail title engine stability, BVH descriptors, and multi-monitor windowing Fixes engine crashes, asset stream stalls, and display initialization bugs when executing game_scarlett_master.exe under XCL. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: resolve raytracing acceleration structure VA via `kernelx::mirrors::source(va)` prior to RDNA2 BVH descriptor generation. - `crates/xcl/src/hle/d3d12x/real.rs`: map MS/AS subobject types 24 and 25 to `D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS` in fallback stream. - `crates/xcl/src/hle/d3d12x/device_x.rs`: sanitize `DISABLE_GPU_TIMEOUT` flag on consumer drivers unless overridden with `XCL_DISABLE_GPU_TIMEOUT=1`. - `crates/xcl/src/hle/d3d12x/sparse.rs`: introduce 4x 150ms retry loop on `VirtualAlloc(MEM_COMMIT)` to withstand dynamic paging file commit stalls. - `crates/xcl/src/hle/d3d12x/present.rs`: respect `XCL_FULLSCREEN=0` override and support negative coordinate offsets in multi-monitor configurations. - `crates/xcl/src/hle/dstorage.rs`: default `bcpack_fill_from_env()` to enabled so unsupported BCPack blocks soft-fill instead of halting the asset queue. - `crates/xcl/src/hle/d3d12x/title_textures.rs`: throttle upload batch size threshold from 256 MB to 64 MB. - `crates/xcl/src/gpu/recomp/dxc.rs`: accept valid DXBC containers with non-contiguous DXIL chunks. - `crates/xcl/src/loader.rs`: neutralize title watchdog assert and worker thread during startup asset streaming. **Tested** - hardware: AMD Radeon RX 6800 (driver 32.0.21045.29003), AMD Ryzen 7 7700, Windows 11 x64, Rust 1.99.1, release - `cargo test --workspace -- --test-threads=4`: 541 passed, 0 failed, 21 ignored (SKIPPED GPU tests: 0) - game: retail title (the release group v1.0.2.1), boots past watchdog assert and streams 3.7 GB asset heap into windowed display **Regression run** main:
upstream-sync closed this pull request 2026-11-24 15:05:23 +00:00
DavidM1911 commented 2026-11-24 16:07:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:50:46Z.


Test report — RTX 3060 Ti (Windows 11): does not compile after merging with current main.

cargo test -p xcl --lib fails with 14 errors in crates/xcl/src/hle/d3d12x/present.rs tests: window_position on main now takes a 4th fullscreen: bool argument and returns a 4-tuple (x, y, w, h), but the test call sites here still use the old 3-arg / 2-tuple signature (assert_eq!(window_position("auto", 1280, 720), (CW_USEDEFAULT, CW_USEDEFAULT))). Looks like the branch predates the window_position refactor on main — needs a rebase and the test expectations updated to the new signature.

<!-- greyfinch-sync:ivall/xcl:comment:7136710163 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1298#issuecomment-7136710163). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:50:46Z. --- Test report — RTX 3060 Ti (Windows 11): **does not compile after merging with current `main`**. `cargo test -p xcl --lib` fails with 14 errors in `crates/xcl/src/hle/d3d12x/present.rs` tests: `window_position` on `main` now takes a 4th `fullscreen: bool` argument and returns a 4-tuple `(x, y, w, h)`, but the test call sites here still use the old 3-arg / 2-tuple signature (`assert_eq!(window_position("auto", 1280, 720), (CW_USEDEFAULT, CW_USEDEFAULT))`). Looks like the branch predates the `window_position` refactor on `main` — needs a rebase and the test expectations updated to the new signature.
upstream-sync changed title from [PR #1298] d3d12x, dstorage, recomp: GTA6 engine stability, BVH descriptors, and multi-monitor windowing to [PR #1298] d3d12x, dstorage, recomp: retail title engine stability, BVH descriptors, and multi-monitor windowing 2026-11-24 20:05:05 +00:00
DavidM1911 commented 2026-11-26 05:05:40 +00:00 (Migrated from github.com)

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


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:7182907004 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1298#issuecomment-7182907004). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T04:47:36Z. --- 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!1288
No description provided.