D3D12.X: observe XboxBvhBuilder batched exports #2176

Open
rison1337 wants to merge 4 commits from upstream-pr/2186 into main
rison1337 commented 2026-11-25 08:17:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by rison1337 on 2026-11-25T08:17:03Z.


Stacked on #2085 and the preceding native-AS preparation branches. Immediate predecessor: feat/host-dxr-builds-core (d4d128f061a3). Only commit 16b46ee406b6 belongs to this PR; earlier commits are dependencies.

Observe XboxBvhBuilder batched exports for #1751. Calls reach the original builder first, then an opt-in observer records native shadow structures on the current recording segment. Compressed rehydration invalidates old mappings because its extra transforms are not reproduced.

What is in it

  • Resolver interception handles named/ordinal exports while preserving original calls and return values.
  • Select the active PC recording after a mid-list split; document XCL_HOST_DXR=1.

Tested

  • Ryzen 5 7500F, RTX 4060 8 GB, NVIDIA 615.78.08, CachyOS Linux, Rust 1.99.1; Windows x86_64-pc-windows-gnullvm cross-build, debug tests and release runtime. Executed under Proton Experimental, with DXC 1.9.2609.5 and the local vkd3d-proton compatibility build.
  • Complete library executable on this head, cross-built with cargo test --locked --target x86_64-pc-windows-gnullvm -p xcl --lib --no-run, then run through the local Proton runner with --test-threads=4: 1103 passed, 2 failed, 26 ignored; 24 explicit SKIPPED messages. XCL_HOST_RAYQUERY=1; the private shader sample was available through XCL_SAMPLE_RAYQUERY. No title bytes are committed.
  • Fresh main (568e7db7729c), same runner and hardware: 1096 passed, 2 failed, 26 ignored; 24 explicit SKIPPED messages. Both fail the same existing depth-state negative check (gpu_depth_buffer_created_for_unordered_access_is_placed) and XMA voice check (xma2_source_voice_decodes_and_manages_lifetime). Skips include unavailable hardware wave64 and Windows Developer Mode.
  • Final stack 24206a657b11: cargo build --locked --target x86_64-pc-windows-gnullvm --workspace and cargo test --locked --target x86_64-pc-windows-gnullvm --workspace --no-run passed after adapting the four integration-test accesses to the shared-DXIL Arc API in #2085.

Regression run

The repository's unchanged scripts/smoke.ps1 generated these blocks, using PowerShell 7.7.0 on Linux and a shell wrapper that executes the EXE through Proton. Z: is mapped for reading the Windows log path. Both clean-source runs use the same title/profile copy, 90 s, XCL_PSO_PRELOAD=0, no automatic input, and a separate Xwayland surface on a background workspace. The PR's opt-in flag is enabled where available. Coverage is startup/start screen/menu, not world loading or native traversal execution.

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 4060
title: 6ca5cab7
seconds: 90
exit: 0x0
frames shown: 1828 (PresentX 1828)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB
xcl-smoke v1
commit: 16b46ee406b6aefa387497779197cc00a7f2c95e
gpu: NVIDIA GeForce RTX 4060
title: 6ca5cab7
seconds: 90
exit: 0x0
frames shown: 1827 (PresentX 1827)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Both runs exited without recorded crashes or device removals. Wine prints 0 MB for process commit, so the memory-growth comparison is not established by this counter. The existing queue-drain warning may be present at timer shutdown.

Not tested

  • Native Windows, AMD and hardware wave64.
  • A green complete workspace GPU-suite run. The library failures reproduced on main are listed above; integration execution under Wine is reported separately below. Passing cases with SKIPPED output do not establish GPU coverage.
  • World loading, gameplay performance, arbitrary title geometry and cross-list/cross-queue publication. Earlier exploratory world loads hit OOM; the native consumer has not been confirmed executing in a title.
  • On final stack 24206a657b11, all 19 non-library workspace executables were attempted under Proton. e2e, pls_quota, gpu_compute_e2e and predication_e2e fail on both main and head. The resource/sync executable aborts with four test threads on both (main: access violation; head: division by zero), so no aggregate pass is claimed.
  • Resource/sync recheck with one test thread: main: test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.41s; final stack: test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.01s. The parallel failure cause is unresolved.

AI use

Codex (GPT-6 family; exact variant unavailable in this session) prepared the implementation, split the commits, cross-built the binaries, ran the listed Linux/Proton checks and drafted this description. No game data or console SDK headers are included.

<!-- greyfinch-sync:ivall/xcl:issue:5487670224 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2186). Originally posted by [rison1337](https://github.com/rison1337) on 2026-11-25T08:17:03Z. --- Stacked on #2085 and the preceding native-AS preparation branches. Immediate predecessor: [`feat/host-dxr-builds-core`](https://github.com/rison1337/xcl/tree/feat/host-dxr-builds-core) (`d4d128f061a3`). Only commit [`16b46ee406b6`](https://github.com/rison1337/xcl/commit/16b46ee406b6aefa387497779197cc00a7f2c95e) belongs to this PR; earlier commits are dependencies. Observe XboxBvhBuilder batched exports for #1751. Calls reach the original builder first, then an opt-in observer records native shadow structures on the current recording segment. Compressed rehydration invalidates old mappings because its extra transforms are not reproduced. **What is in it** - Resolver interception handles named/ordinal exports while preserving original calls and return values. - Select the active PC recording after a mid-list split; document `XCL_HOST_DXR=1`. **Tested** - Ryzen 5 7500F, RTX 4060 8 GB, NVIDIA 615.78.08, CachyOS Linux, Rust 1.99.1; Windows `x86_64-pc-windows-gnullvm` cross-build, debug tests and release runtime. Executed under Proton Experimental, with DXC 1.9.2609.5 and the local vkd3d-proton compatibility build. - Complete library executable on this head, cross-built with `cargo test --locked --target x86_64-pc-windows-gnullvm -p xcl --lib --no-run`, then run through the local Proton runner with `--test-threads=4`: **1103 passed, 2 failed, 26 ignored; 24 explicit SKIPPED messages**. `XCL_HOST_RAYQUERY=1`; the private shader sample was available through `XCL_SAMPLE_RAYQUERY`. No title bytes are committed. - Fresh `main` (`568e7db7729c`), same runner and hardware: **1096 passed, 2 failed, 26 ignored; 24 explicit SKIPPED messages**. Both fail the same existing depth-state negative check (`gpu_depth_buffer_created_for_unordered_access_is_placed`) and XMA voice check (`xma2_source_voice_decodes_and_manages_lifetime`). Skips include unavailable hardware wave64 and Windows Developer Mode. - Final stack `24206a657b11`: `cargo build --locked --target x86_64-pc-windows-gnullvm --workspace` and `cargo test --locked --target x86_64-pc-windows-gnullvm --workspace --no-run` passed after adapting the four integration-test accesses to the shared-DXIL `Arc` API in #2085. **Regression run** The repository's unchanged `scripts/smoke.ps1` generated these blocks, using PowerShell 7.7.0 on Linux and a shell wrapper that executes the EXE through Proton. `Z:` is mapped for reading the Windows log path. Both clean-source runs use the same title/profile copy, 90 s, `XCL_PSO_PRELOAD=0`, no automatic input, and a separate Xwayland surface on a background workspace. The PR's opt-in flag is enabled where available. Coverage is startup/start screen/menu, not world loading or native traversal execution. ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: NVIDIA GeForce RTX 4060 title: 6ca5cab7 seconds: 90 exit: 0x0 frames shown: 1828 (PresentX 1828) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` ``` xcl-smoke v1 commit: 16b46ee406b6aefa387497779197cc00a7f2c95e gpu: NVIDIA GeForce RTX 4060 title: 6ca5cab7 seconds: 90 exit: 0x0 frames shown: 1827 (PresentX 1827) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` Both runs exited without recorded crashes or device removals. Wine prints 0 MB for process commit, so the memory-growth comparison is not established by this counter. The existing queue-drain warning may be present at timer shutdown. **Not tested** - Native Windows, AMD and hardware wave64. - A green complete workspace GPU-suite run. The library failures reproduced on main are listed above; integration execution under Wine is reported separately below. Passing cases with SKIPPED output do not establish GPU coverage. - World loading, gameplay performance, arbitrary title geometry and cross-list/cross-queue publication. Earlier exploratory world loads hit OOM; the native consumer has not been confirmed executing in a title. - On final stack `24206a657b11`, all 19 non-library workspace executables were attempted under Proton. `e2e`, `pls_quota`, `gpu_compute_e2e` and `predication_e2e` fail on both main and head. The resource/sync executable aborts with four test threads on both (main: access violation; head: division by zero), so no aggregate pass is claimed. - Resource/sync recheck with one test thread: main: test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.41s; final stack: test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.01s. The parallel failure cause is unresolved. **AI use** Codex (GPT-6 family; exact variant unavailable in this session) prepared the implementation, split the commits, cross-built the binaries, ran the listed Linux/Proton checks and drafted this description. No game data or console SDK headers are included.
DavidM1911 commented 2026-11-25 16:12:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T15:39:47Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7167188782 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2186#issuecomment-7167188782). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T15:39:47Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 07:40:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:32Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252620027 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2186#issuecomment-7252620027). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:40:32Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 07:32:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:32:48Z.


Triage (#1607) – head 16b46ee

Stacked PR: only 16b46ee belongs here. Its base commits are #2184, #2185 and #2085; #2085 was closed as a duplicate of #2767, so the stack needs a rebase onto #2767 (or main once it lands). The overlap with #2184/#2185/#2187-#2189 comes from the stack, not from a duplicate.
No other open or merged PR hooks XboxBvhBuilder's batched build/rehydrate/copy exports (resolver.rs intercept, host_bvh.rs build/rehydrate/copy). Nothing changes without XCL_HOST_DXR=1. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304186646 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2186#issuecomment-7304186646). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:32:48Z. --- **Triage (#1607)** – head 16b46ee Stacked PR: only 16b46ee belongs here. Its base commits are #2184, #2185 and #2085; #2085 was closed as a duplicate of #2767, so the stack needs a rebase onto #2767 (or main once it lands). The overlap with #2184/#2185/#2187-#2189 comes from the stack, not from a duplicate. No other open or merged PR hooks XboxBvhBuilder's batched build/rehydrate/copy exports (resolver.rs intercept, host_bvh.rs build/rehydrate/copy). Nothing changes without XCL_HOST_DXR=1. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2186:upstream-pr/2186'
git switch 'upstream-pr/2186'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2186'
git switch 'upstream-pr/2186'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2186'
git switch 'upstream-pr/2186'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2186'
git switch 'main'
git merge --squash 'upstream-pr/2186'
git switch 'main'
git merge --ff-only 'upstream-pr/2186'
git switch 'main'
git merge 'upstream-pr/2186'
git push origin 'main'
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!2176
No description provided.