Tests: compare CreateReservedResource against the host D3D12 driver #617

Manually merged
github merged 1 commit from gh-pr/617/head into gh-pr/617/base 2026-11-26 04:27:24 +00:00
Owner

@⁠towiice on GitHub · 2026-11-24 02:33 UTC · original
towiice:tests/d3d12-create-reserved-resource → main · +477 −0 · 1 files · 1 commits · merged 2026-11-25 19:23 UTC

Adds host-driver parity integration tests for ID3D12Device::CreateReservedResource (vtable slot 30) with no console files or game data. Part of #480.

Captures the unhooked PC driver's CreateReservedResource function pointer before d3d12x::backend() hooks the singleton device's vtable in place, verifies the slot was hooked, and compares XCL's hooked path directly against the raw host driver on the same adapter.

What is in it

  • crates/xcl/tests/d3d12_create_reserved_resource.rs:
    • pc_reserved_resources_match_host_driver: compares HRESULT, GetDesc(), and GetResourceTiling() (total_tiles, packed_mip_info, tile_shape, subresource_tiling[0]) against the unhooked host driver across valid buffers (64 KiB, 256 KiB), 2D textures (8x8 RGBA8, 256x256 RGBA8 with 4 mips, 128x128 BC7), a 3D volume texture (64x64x64 RGBA8), and invalid descriptors (Width = 0 buffer, ROW_MAJOR 2D texture). Comparing directly against the host driver's GetResourceTiling works on both AMD standard-tile and NVIDIA packed-mip-tail drivers.
    • unknown_console_iid_falls_back_to_pc_resource_interface: verifies the unhooked host driver returns E_NOINTERFACE for an unknown console IID while XCL retries with IID_ID3D12Resource and returns a usable resource.
    • reserved_resource_clear_value_and_null_ppv_match_host: compares a render-target reserved texture with D3D12_CLEAR_VALUE and a ppv == null call against the host driver.

Tested

  • Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, 4 GB VRAM, wave32), driver 610.88, Windows 11 x64 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm, llvm-mingw 23.1.6 UCRT), DXC v1.9.2609, debug build (cargo build --workspace).
  • cargo test -p xcl --test d3d12_create_reserved_resource -- --test-threads=4: 3 passed, 0 failed, 0 ignored (1.09 s).
  • Full suite on commit eba5e09 (same tree as 5497e00, base cb868b2), same GPU (driver 32.0.16.1088), Rust 1.100.0 x86_64-pc-windows-gnullvm, debug, run with Claude Code: cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 685 passed, 3 failed, 41 ignored. Failed: placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory (xcl lib, which this PR does not touch; main was not rerun this time). SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware. The 3 new tests passed.

Not tested

  • AMD and Intel GPUs (only tested on NVIDIA Turing / GTX 1650 SUPER).
  • MSVC toolchain (built and tested with stable-x86_64-pc-windows-gnullvm).
  • Retail game titles (test-only change under crates/xcl/tests/, no runtime files touched).

AI use

  • Antigravity (Gemini 4 Neon) helped write the test file and the original PR description. Claude Code (Claude Sonnet 5.5) later squashed the commits, ran the full suite and updated this description.
**@⁠towiice** on GitHub · 2026-11-24 02:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/617) `towiice:tests/d3d12-create-reserved-resource` → `main` · +477 −0 · 1 files · 1 commits · merged 2026-11-25 19:23 UTC Adds host-driver parity integration tests for `ID3D12Device::CreateReservedResource` (vtable slot 30) with no console files or game data. Part of #480. Captures the unhooked PC driver's `CreateReservedResource` function pointer before `d3d12x::backend()` hooks the singleton device's vtable in place, verifies the slot was hooked, and compares XCL's hooked path directly against the raw host driver on the same adapter. **What is in it** - `crates/xcl/tests/d3d12_create_reserved_resource.rs`: - `pc_reserved_resources_match_host_driver`: compares `HRESULT`, `GetDesc()`, and `GetResourceTiling()` (`total_tiles`, `packed_mip_info`, `tile_shape`, `subresource_tiling[0]`) against the unhooked host driver across valid buffers (`64 KiB`, `256 KiB`), 2D textures (`8x8` RGBA8, `256x256` RGBA8 with 4 mips, `128x128` BC7), a 3D volume texture (`64x64x64` RGBA8), and invalid descriptors (`Width = 0` buffer, `ROW_MAJOR` 2D texture). Comparing directly against the host driver's `GetResourceTiling` works on both AMD standard-tile and NVIDIA packed-mip-tail drivers. - `unknown_console_iid_falls_back_to_pc_resource_interface`: verifies the unhooked host driver returns `E_NOINTERFACE` for an unknown console IID while XCL retries with `IID_ID3D12Resource` and returns a usable resource. - `reserved_resource_clear_value_and_null_ppv_match_host`: compares a render-target reserved texture with `D3D12_CLEAR_VALUE` and a `ppv == null` call against the host driver. **Tested** - Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, 4 GB VRAM, wave32), driver 610.88, Windows 11 x64 build 10.0.26300 (26H2), Rust 1.100.0 (`stable-x86_64-pc-windows-gnullvm`, llvm-mingw 23.1.6 UCRT), DXC `v1.9.2609`, debug build (`cargo build --workspace`). - `cargo test -p xcl --test d3d12_create_reserved_resource -- --test-threads=4`: **3 passed, 0 failed, 0 ignored** (1.09 s). - Full suite on commit `eba5e09` (same tree as `5497e00`, base `cb868b2`), same GPU (driver 32.0.16.1088), Rust 1.100.0 `x86_64-pc-windows-gnullvm`, debug, run with Claude Code: `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **685 passed, 3 failed, 41 ignored**. Failed: `placed_title_textures_share_vram_and_preserve_pixels`, `transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory` (`xcl` lib, which this PR does not touch; `main` was not rerun this time). SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. The 3 new tests passed. **Not tested** - AMD and Intel GPUs (only tested on NVIDIA Turing / GTX 1650 SUPER). - MSVC toolchain (built and tested with `stable-x86_64-pc-windows-gnullvm`). - Retail game titles (test-only change under `crates/xcl/tests/`, no runtime files touched). **AI use** - Antigravity (Gemini 4 Neon) helped write the test file and the original PR description. Claude Code (Claude Sonnet 5.5) later squashed the commits, ran the full suite and updated this description.
Compares XCL's hooked ID3D12Device::CreateReservedResource (slot 30) with
the unhooked driver slot on the same adopted device, so both paths use one
adapter even when XCL_ADAPTER selects a non-default GPU. Covers buffers and
2D/3D textures (GetDesc and GetResourceTiling, including a range starting at
subresource 1), invalid descriptors, the console IID fallback, clear values
and a null ppv. Skips go through runner::skip_test.

Part of #480.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:23 +00:00
github manually merged commit eba5e09dd4 into gh-pr/617/base 2026-11-26 04:27:24 +00:00
Author
Owner

@⁠CryingLaughing on GitHub · 2026-11-24 03:03 UTC · original

Tested

  • Clean head 60f232c6f98a799882cd20b19bd9ca40596cbba7 on NVIDIA GeForce RTX 4080, driver 621.01, Intel Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC x64, debug. XCL_ADAPTER=4080, XCL_REQUIRE_GPU=1, all XCL_SAMPLE_* variables unset. The XCL backend logged the RTX 4080.
  • Built with cargo test -p xcl --test d3d12_create_reserved_resource --locked -j 4 --no-run --message-format=json and ran the resulting executable with --test-threads=1 --show-output. The clean head passed 3/3 with zero skips.
  • To control for the two-device selection problem, I ran the same three tests with a fixture-only edit that used the very same adopted ID3D12Device for both creation paths. It asserted the pointer equaled real::device_raw() before obtaining the original slot with real::orig_fn(xcl_raw, CREATE_RESERVED_RESOURCE_SLOT). The raw driver slot and hooked slot were distinct. Both creation paths and both tiling queries used that device. This run also passed 3/3 with zero skips, including the small RGBA8 texture and the packed-mip comparison. The fixture logged the RTX 4080 as LUID 00000000:0000f0ad.

Using the original slot on the adopted backend device makes the comparison same-adapter by construction and removes the extra default-device creation. orig_fn requires an adopted object, so the pointer check is useful to retain.

Not tested

  • The stock fixture's host LUID, other drivers or GPUs, the full workspace suite on this PR, release builds, and retail titles.

AI use

  • OpenAI Codex (GPT-6 family, exact variant unavailable) prepared the fixture control, ran the tests, and drafted this report.
**@⁠CryingLaughing** on GitHub · 2026-11-24 03:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7120723411) **Tested** - Clean head `60f232c6f98a799882cd20b19bd9ca40596cbba7` on NVIDIA GeForce RTX 4080, driver 621.01, Intel Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC x64, debug. `XCL_ADAPTER=4080`, `XCL_REQUIRE_GPU=1`, all `XCL_SAMPLE_*` variables unset. The XCL backend logged the RTX 4080. - Built with `cargo test -p xcl --test d3d12_create_reserved_resource --locked -j 4 --no-run --message-format=json` and ran the resulting executable with `--test-threads=1 --show-output`. The clean head passed 3/3 with zero skips. - To control for the [two-device selection problem](https://github.com/ivall/xcl/pull/617#issuecomment-7120480637), I ran the same three tests with a fixture-only edit that used the very same adopted `ID3D12Device` for both creation paths. It asserted the pointer equaled `real::device_raw()` before obtaining the original slot with `real::orig_fn(xcl_raw, CREATE_RESERVED_RESOURCE_SLOT)`. The raw driver slot and hooked slot were distinct. Both creation paths and both tiling queries used that device. This run also passed 3/3 with zero skips, including the small RGBA8 texture and the packed-mip comparison. The fixture logged the RTX 4080 as LUID `00000000:0000f0ad`. Using the original slot on the adopted backend device makes the comparison same-adapter by construction and removes the extra default-device creation. `orig_fn` requires an adopted object, so the pointer check is useful to retain. **Not tested** - The stock fixture's host LUID, other drivers or GPUs, the full workspace suite on this PR, release builds, and retail titles. **AI use** - OpenAI Codex (GPT-6 family, exact variant unavailable) prepared the fixture control, ran the tests, and drafted this report.
Author
Owner

@⁠towiice on GitHub · 2026-11-24 03:08 UTC · original · edited 2026-11-24 03:27 UTC

Thanks @⁠caua-an and @⁠CryingLaughing for catching the multi-GPU adapter mismatch and testing the fix! Updated in c2edeb6 to use the adopted backend device (real::device_raw()) with real::orig_fn(xcl_raw, 30) for both paths so host and XCL always run on the same adapter even with XCL_ADAPTER set. Re-tested on NVIDIA GeForce GTX 1650 SUPER (cargo test -p xcl --test d3d12_create_reserved_resource -- --test-threads=1): 3 passed, 0 failed (0.91 s).

**@⁠towiice** on GitHub · 2026-11-24 03:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7120813147) · edited 2026-11-24 03:27 UTC Thanks @⁠caua-an and @⁠CryingLaughing for catching the multi-GPU adapter mismatch and testing the fix! Updated in `c2edeb6` to use the adopted backend device (`real::device_raw()`) with `real::orig_fn(xcl_raw, 30)` for both paths so host and XCL always run on the same adapter even with `XCL_ADAPTER` set. Re-tested on NVIDIA GeForce GTX 1650 SUPER (`cargo test -p xcl --test d3d12_create_reserved_resource -- --test-threads=1`): 3 passed, 0 failed (0.91 s).
Author
Owner

@⁠towiice on GitHub · 2026-11-24 03:44 UTC · original

Thanks @⁠pvfreis! Updated in ef39c26 to route skips through xcl::gpu::recomp::runner::skip_test("no GPU") so stderr skip counting and XCL_REQUIRE_GPU assertions work as expected.

**@⁠towiice** on GitHub · 2026-11-24 03:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7121373505) Thanks @⁠pvfreis! Updated in ef39c26 to route skips through `xcl::gpu::recomp::runner::skip_test("no GPU")` so stderr skip counting and `XCL_REQUIRE_GPU` assertions work as expected.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 03:50 UTC · original

Test report: #617 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA)

The other runs here are native Windows drivers. Under Wine, the host driver this test compares XCL with is vkd3d-proton (D3D12 on Vulkan), and the test passes there as well.

Setup

  • CachyOS, kernel 7.3.3-1-cachyos, Intel i5-10400F, 16 GB RAM, NVIDIA GeForce RTX 3060 12 GB, driver 620.70.06
  • Proton Experimental experimental-11.0-20261112 (wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton, DXVK_CONFIG="dxgi.hideNvidiaGpu = False"
  • Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64-gcc 16.2.0), debug build of this PR's head ef39c26

Result: d3d12_create_reserved_resource test binary under Wine, --test-threads=1: 3 passed, 0 failed, 0 ignored, in 2 of 2 runs (and 3 passed on the earlier head c2edeb6).

  • pc_reserved_resources_match_host_driver, reserved_resource_clear_value_and_null_ppv_match_host, unknown_console_iid_falls_back_to_pc_resource_interface: ok

Not tested

  • Windows, AMD, other Wine / vkd3d-proton versions; the rest of the suite on this branch; a title run (test-only PR)

AI use: Claude Code (Claude Opus 5.5) built the test, ran it on the machine above and wrote this report. The results are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.

**@⁠JoaoPauluu** on GitHub · 2026-11-24 03:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7121473154) ### Test report: #617 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA) The other runs here are native Windows drivers. Under Wine, the host driver this test compares XCL with is vkd3d-proton (D3D12 on Vulkan), and the test passes there as well. **Setup** - CachyOS, kernel 7.3.3-1-cachyos, Intel i5-10400F, 16 GB RAM, NVIDIA GeForce RTX 3060 12 GB, driver 620.70.06 - Proton Experimental `experimental-11.0-20261112` (wine-11.0), vkd3d-proton v3.1 (`4522cc1a`) + the patch from #257, DXVK from Proton, `DXVK_CONFIG="dxgi.hideNvidiaGpu = False"` - Rust 1.100.0, `x86_64-pc-windows-gnu` (mingw-w64-gcc 16.2.0), debug build of this PR's head `ef39c26` **Result:** `d3d12_create_reserved_resource` test binary under Wine, `--test-threads=1`: 3 passed, 0 failed, 0 ignored, in 2 of 2 runs (and 3 passed on the earlier head `c2edeb6`). - `pc_reserved_resources_match_host_driver`, `reserved_resource_clear_value_and_null_ppv_match_host`, `unknown_console_iid_falls_back_to_pc_resource_interface`: ok **Not tested** - Windows, AMD, other Wine / vkd3d-proton versions; the rest of the suite on this branch; a title run (test-only PR) **AI use:** Claude Code (Claude Opus 5.5) built the test, ran it on the machine above and wrote this report. The results are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.
Author
Owner

@⁠caua-an on GitHub · 2026-11-24 02:47 UTC · original · edited 2026-11-24 04:02 UTC

Tested: Clean head 60f232c6f98a799882cd20b19bd9ca40596cbba7; Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, debug build, XCL_REQUIRE_GPU=1. Intel Arc integrated graphics driver 32.0.101.8860; RTX 4070 Laptop driver 616.92.

cargo test --offline --locked -p xcl --test d3d12_create_reserved_resource -- --test-threads=1 --nocapture: 3 passed on Intel Arc (XCL_ADAPTER=intel); 2 passed, 1 failed on the RTX 4070 Laptop (XCL_ADAPTER=nvidia), with no skips. The NVIDIA run failed on tex2d_8x8_rgba8 at packed_mip_info. A separate diagnostic run with a temporary LUID check confirmed that the default host device and the XCL device were on different adapters with XCL_ADAPTER=nvidia, and on the same adapter with XCL_ADAPTER=intel. This does not establish a same-adapter NVIDIA mismatch. Suggest selecting the same adapter explicitly for both devices and asserting matching LUIDs before comparing layouts. The diagnostic edit was removed.

Not tested: Full workspace suite, release builds, retail titles, or game-data samples (XCL_SAMPLE_* unset).

AI use: OpenCode with GPT-6.2 Sol ran the tests and drafted this report.


Follow-up: nonzero subresource range. I tried a small test-only extension locally on ef39c26179c4ff32a862b07b24c875b513537f0d. It reuses the 256x256 RGBA8 reserved texture with four mips, asks GetResourceTiling for two entries starting at subresource 1, and checks that both paths return two entries and that the layouts match. No adapter-specific tile counts are assumed.

With the local extension applied, cargo test --offline --locked -p xcl --test d3d12_create_reserved_resource -- --test-threads=1 --nocapture reported 3 passed, 0 failed, 0 ignored, no skips on each GPU (RTX 4070 Laptop and Intel Arc, same setup and XCL_REQUIRE_GPU=1 as above). No full suite or game data was tested. Happy to share the small diff if you would like to include this case in #617.

AI use (follow-up): OpenCode with GPT-6.2 Sol wrote the local test extension, ran the tests, and drafted this update.

**@⁠caua-an** on GitHub · 2026-11-24 02:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7120480637) · edited 2026-11-24 04:02 UTC **Tested:** Clean head `60f232c6f98a799882cd20b19bd9ca40596cbba7`; Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, debug build, `XCL_REQUIRE_GPU=1`. Intel Arc integrated graphics driver 32.0.101.8860; RTX 4070 Laptop driver 616.92. `cargo test --offline --locked -p xcl --test d3d12_create_reserved_resource -- --test-threads=1 --nocapture`: **3 passed on Intel Arc (`XCL_ADAPTER=intel`); 2 passed, 1 failed on the RTX 4070 Laptop (`XCL_ADAPTER=nvidia`)**, with no skips. The NVIDIA run failed on `tex2d_8x8_rgba8` at `packed_mip_info`. A separate diagnostic run with a temporary LUID check confirmed that the default host device and the XCL device were on different adapters with `XCL_ADAPTER=nvidia`, and on the same adapter with `XCL_ADAPTER=intel`. This does not establish a same-adapter NVIDIA mismatch. Suggest selecting the same adapter explicitly for both devices and asserting matching LUIDs before comparing layouts. The diagnostic edit was removed. **Not tested:** Full workspace suite, release builds, retail titles, or game-data samples (`XCL_SAMPLE_*` unset). **AI use:** OpenCode with GPT-6.2 Sol ran the tests and drafted this report. --- **Follow-up: nonzero subresource range.** I tried a small test-only extension locally on `ef39c26179c4ff32a862b07b24c875b513537f0d`. It reuses the 256x256 RGBA8 reserved texture with four mips, asks `GetResourceTiling` for two entries starting at subresource 1, and checks that both paths return two entries and that the layouts match. No adapter-specific tile counts are assumed. With the local extension applied, `cargo test --offline --locked -p xcl --test d3d12_create_reserved_resource -- --test-threads=1 --nocapture` reported **3 passed, 0 failed, 0 ignored, no skips on each GPU** (RTX 4070 Laptop and Intel Arc, same setup and `XCL_REQUIRE_GPU=1` as above). No full suite or game data was tested. Happy to share the small diff if you would like to include this case in #617. **AI use (follow-up):** OpenCode with GPT-6.2 Sol wrote the local test extension, ran the tests, and drafted this update.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:54 UTC · original

Test run of ef39c26179c4ff32a862b07b24c875b513537f0d on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 704 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 660 passed, 0 failed, 21 ignored
  • 0 SKIPPED; the d3d12_create_reserved_resource tests pass on a single-adapter machine, with skips routed through skip_test.

Review: This adds an AMD RDNA4 data point to the NVIDIA, Intel and Wine/vkd3d runs above. Test-only. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7122439658) Test run of `ef39c26179c4ff32a862b07b24c875b513537f0d` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **704 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 660 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; the `d3d12_create_reserved_resource` tests pass on a single-adapter machine, with skips routed through `skip_test`. **Review:** This adds an AMD RDNA4 data point to the NVIDIA, Intel and Wine/vkd3d runs above. Test-only. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠towiice on GitHub · 2026-11-24 11:41 UTC · original

Thanks @⁠caua-an! Added in commit 5497e00: when MipLevels > 1, the test now exercises GetResourceTiling for subresource ranges starting at index 1 (start_sub: 1, count: 2), asserting full parity of actual_count and per-subresource tiling info between host D3D12 and XCL without assuming adapter-specific tile counts. Tested on GTX 1650 SUPER (3/3 passed).

**@⁠towiice** on GitHub · 2026-11-24 11:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7130429455) Thanks @⁠caua-an! Added in commit 5497e00: when `MipLevels > 1`, the test now exercises `GetResourceTiling` for subresource ranges starting at index 1 (`start_sub: 1, count: 2`), asserting full parity of `actual_count` and per-subresource tiling info between host D3D12 and XCL without assuming adapter-specific tile counts. Tested on GTX 1650 SUPER (3/3 passed).
Author
Owner

@⁠pvfreis on GitHub · 2026-11-24 03:34 UTC · original · edited 2026-11-24 14:29 UTC

Test report for 5497e0085b90da7c87e1b13159b0916b491ee1fe (this PR's head, with the GetResourceTiling range check from subresource 1), merged onto main 930e8b49c1 (clean merge). The three tests in d3d12_create_reserved_resource.rs pass on NVIDIA; no regression elsewhere. (This comment first covered c2edeb6, then ef39c26; updated for the new head.)

Tested

  • RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, Windows 11 26H2 (10.0.26300), Rust 1.100.0 stable MSVC, debug
  • cargo build --workspace --locked --offline, then cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4:
    • main 930e8b4: 750 passed, 1 failed, 41 ignored
    • this PR merged onto 930e8b4: 753 passed, 1 failed, 41 ignored. The difference is the 3 tests in d3d12_create_reserved_resource.rs, all passing on the real backend: pc_reserved_resources_match_host_driver (which now includes the range check), reserved_resource_clear_value_and_null_ppv_match_host, unknown_console_iid_falls_back_to_pc_resource_interface
  • SKIPPED on this adapter (both): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64). The new tests did not skip.
  • The 1 failure is the same on both and not from this PR: test_title_runs_and_game_folder_is_untouched (e2e, presents 0), because these runs are in an isolated non-interactive session where CreateSwapChainForHwnd returns 0x887A0022.

Not tested

  • single-GPU machine only, so not the multi-adapter case
  • a run with XCL_REQUIRE_GPU set (these runs had it unset)
  • AMD, Intel; a retail title (test-only change)

Tested and written with Claude Code (Claude Opus 5.5); the runs are real, on the hardware above.

**@⁠pvfreis** on GitHub · 2026-11-24 03:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7121227622) · edited 2026-11-24 14:29 UTC Test report for 5497e0085b90da7c87e1b13159b0916b491ee1fe (this PR's head, with the `GetResourceTiling` range check from subresource 1), merged onto main 930e8b49c1 (clean merge). The three tests in `d3d12_create_reserved_resource.rs` pass on NVIDIA; no regression elsewhere. (This comment first covered c2edeb6, then ef39c26; updated for the new head.) **Tested** - RTX 3060 12 GB (driver 617.14), Ryzen 9 5900XT, Windows 11 26H2 (10.0.26300), Rust 1.100.0 stable MSVC, debug - `cargo build --workspace --locked --offline`, then `cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4`: - main 930e8b4: 750 passed, 1 failed, 41 ignored - this PR merged onto 930e8b4: 753 passed, 1 failed, 41 ignored. The difference is the 3 tests in `d3d12_create_reserved_resource.rs`, all passing on the real backend: `pc_reserved_resources_match_host_driver` (which now includes the range check), `reserved_resource_clear_value_and_null_ppv_match_host`, `unknown_console_iid_falls_back_to_pc_resource_interface` - SKIPPED on this adapter (both): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). The new tests did not skip. - The 1 failure is the same on both and not from this PR: `test_title_runs_and_game_folder_is_untouched` (e2e, `presents` 0), because these runs are in an isolated non-interactive session where `CreateSwapChainForHwnd` returns 0x887A0022. **Not tested** - single-GPU machine only, so not the multi-adapter case - a run with `XCL_REQUIRE_GPU` set (these runs had it unset) - AMD, Intel; a retail title (test-only change) Tested and written with Claude Code (Claude Opus 5.5); the runs are real, on the hardware above.
Author
Owner

@⁠towiice on GitHub · 2026-11-25 02:01 UTC · original

Squashed the four commits into one (eba5e09). The tree is identical to 5497e00, so the reports above on that head apply to the same code. (Posted with Claude Code, Claude Sonnet 5.5.)

**@⁠towiice** on GitHub · 2026-11-25 02:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7150236747) Squashed the four commits into one (`eba5e09`). The tree is identical to `5497e00`, so the reports above on that head apply to the same code. (Posted with Claude Code, Claude Sonnet 5.5.)
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 06:37 UTC · original

Empirical test report (eba5e09d)

Hardware / environment

  • Commit eba5e09dd4abc3acbd3eeaffd01501866f3b600d (detached HEAD, clean worktree).
  • Intel Arc A770, driver 32.0.101.9175. AMD Ryzen 7 3800X 8-Core Processor.
  • Windows 11 Enterprise Evaluation, build 10.0.26200. Rust 1.100.0 (0ef1bc386 2026-11-09), x86_64-pc-windows-msvc. DXC 1.9.2609.5 (01b62ad47). Unoptimized Cargo test profile.

Commands and results

  • cargo test --workspace --no-run exited 0 outside the Arc lock and compiled the workspace test executables.
  • The following commands ran under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1.
d3d12_create_reserved_resource-54200d37ebd53110.exe pc_reserved_resources_match_host_driver --exact --nocapture --test-threads=1
d3d12_create_reserved_resource-54200d37ebd53110.exe unknown_console_iid_falls_back_to_pc_resource_interface --exact --nocapture --test-threads=1
d3d12_create_reserved_resource-54200d37ebd53110.exe reserved_resource_clear_value_and_null_ppv_match_host --exact --nocapture --test-threads=1

Each test and the Arc wrapper exited 0. Totals were 3 passed / 0 failed / 0 ignored / 0 skipped, with zero case-sensitive ^SKIPPED lines. All three runs logged the real D3D12.X backend on the Arc A770.

Observed behavior

  • For the tested reserved-buffer and 2D/3D texture descriptors, XCL matched the host HRESULTs. Successful creations matched the checked descriptor and tiling fields.
  • The host returned E_NOINTERFACE for the synthetic console IID. XCL retried with IID_ID3D12Resource and returned a resource with the expected dimensions and format.
  • The render-target clear-value call and its null-output variant matched the host HRESULTs.

Not tested

The full GPU workspace suite and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr617-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7154977421) ### Empirical test report (eba5e09d) **Hardware / environment** - Commit `eba5e09dd4abc3acbd3eeaffd01501866f3b600d` (detached HEAD, clean worktree). - Intel Arc A770, driver `32.0.101.9175`. AMD Ryzen 7 3800X 8-Core Processor. - Windows 11 Enterprise Evaluation, build `10.0.26200`. Rust `1.100.0 (0ef1bc386 2026-11-09)`, `x86_64-pc-windows-msvc`. DXC `1.9.2609.5 (01b62ad47)`. Unoptimized Cargo test profile. **Commands and results** - `cargo test --workspace --no-run` exited 0 outside the Arc lock and compiled the workspace test executables. - The following commands ran under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. ```text d3d12_create_reserved_resource-54200d37ebd53110.exe pc_reserved_resources_match_host_driver --exact --nocapture --test-threads=1 d3d12_create_reserved_resource-54200d37ebd53110.exe unknown_console_iid_falls_back_to_pc_resource_interface --exact --nocapture --test-threads=1 d3d12_create_reserved_resource-54200d37ebd53110.exe reserved_resource_clear_value_and_null_ppv_match_host --exact --nocapture --test-threads=1 ``` Each test and the Arc wrapper exited 0. Totals were **3 passed / 0 failed / 0 ignored / 0 skipped**, with zero case-sensitive `^SKIPPED ` lines. All three runs logged the real D3D12.X backend on the Arc A770. **Observed behavior** - For the tested reserved-buffer and 2D/3D texture descriptors, XCL matched the host HRESULTs. Successful creations matched the checked descriptor and tiling fields. - The host returned `E_NOINTERFACE` for the synthetic console IID. XCL retried with `IID_ID3D12Resource` and returned a resource with the expected dimensions and format. - The render-target clear-value call and its null-output variant matched the host HRESULTs. **Not tested** The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr617-focused.log and published.
Author
Owner

@⁠xpatfussy69x on GitHub · 2026-11-25 08:47 UTC · original

Test report for head eba5e09 as pushed (not merged onto current main) – NVIDIA, wave32.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (Ampere, 32-lane waves only), driver 32.0.16.2124; AMD Ryzen 5 7500F; Windows NT 10.0.26300; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); debug; DXC 1.9.2609.5
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 688 passed, 0 failed, 41 ignored
  • SKIPPED GPU tests on this adapter: 2 (no wave64)
  • this PR's tests (tests/d3d12_create_reserved_resource.rs) ran against the NVIDIA host driver and passed: pc_reserved_resources_match_host_driver, unknown_console_iid_falls_back_to_pc_resource_interface, reserved_resource_clear_value_and_null_ppv_match_host
  • no XCL_SAMPLE_* data set (game-data tests not run)

Not tested

  • AMD / native wave64; release build; the head merged onto current main

AI use

  • Claude (Claude Opus 5.5) wrote the script that ran the suite on my PC, read the log and wrote and posted this report with my approval; the run is mine.
**@⁠xpatfussy69x** on GitHub · 2026-11-25 08:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7157465912) Test report for head `eba5e09` as pushed (not merged onto current `main`) – NVIDIA, wave32. **Tested** - NVIDIA GeForce RTX 3060 12 GB (Ampere, 32-lane waves only), driver 32.0.16.2124; AMD Ryzen 5 7500F; Windows NT 10.0.26300; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); debug; DXC 1.9.2609.5 - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 688 passed, 0 failed, 41 ignored - SKIPPED GPU tests on this adapter: 2 (no wave64) - this PR's tests (`tests/d3d12_create_reserved_resource.rs`) ran against the NVIDIA host driver and passed: `pc_reserved_resources_match_host_driver`, `unknown_console_iid_falls_back_to_pc_resource_interface`, `reserved_resource_clear_value_and_null_ppv_match_host` - no `XCL_SAMPLE_*` data set (game-data tests not run) **Not tested** - AMD / native wave64; release build; the head merged onto current `main` **AI use** - Claude (Claude Opus 5.5) wrote the script that ran the suite on my PC, read the log and wrote and posted this report with my approval; the run is mine.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 12:55 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 12:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7163048943) 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!
Author
Owner

@⁠ivall on GitHub · 2026-11-25 19:23 UTC · original

Merging: CreateReservedResource and its tiling against the host driver.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure. This file alone 8 times: no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

**@⁠ivall** on GitHub · 2026-11-25 19:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/617#issuecomment-7172238607) Merging: `CreateReservedResource` and its tiling against the host driver. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, `main` `2898511` with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (`fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main`); `hle::d3d12x` on 16 threads 5 times, no failure. This file alone 8 times: no failure. AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
This discussion has been locked. Commenting is limited to contributors.
No description provided.