d3d12_xs: implement IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy #820

Closed
kotekompotek wants to merge 1 commit from upstream-pr/820 into main
kotekompotek commented 2026-11-24 14:11:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T14:11:41Z.


Claimed in the coordination issue as: DXGI-QUERY-RESIDENCY (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main.
  • Implemented IDXGIDevice::QueryResourceResidency on the Xbox DeviceProxy: dxgi_query_resource_residency verifies each entry via QueryInterface(ID3D12Pageable) + GetDevice() ownership against DeviceProxy/owner->real before reporting DXGI_RESIDENCY_FULLY_RESIDENT (atomic E_INVALIDARG on null/non-pageable/foreign resources, S_OK on count == 0 with valid arrays matching Windows DXGI probe).
  • Updated runtime/test/dxgi_device_test.cpp to test real ID3D12Resource + ID3D12Heap + foreign-device/non-pageable rejections across host WARP, host GTX 1050, and Vulkan, and synced docs/d3d12_vulkan.md.

Tested

  • Locally ran device_proxy + dxgi_device (2/2 Passed).
  • test_ctest_registration.py (4/4 OK) and test_docs_*.py (OK).

GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) & Microsoft Basic Render Driver (WARP)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473785002 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T14:11:41Z. --- Claimed in the coordination issue as: DXGI-QUERY-RESIDENCY (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main`. - Implemented `IDXGIDevice::QueryResourceResidency` on the Xbox `DeviceProxy`: `dxgi_query_resource_residency` verifies each entry via `QueryInterface(ID3D12Pageable)` + `GetDevice()` ownership against `DeviceProxy`/`owner->real` before reporting `DXGI_RESIDENCY_FULLY_RESIDENT` (atomic `E_INVALIDARG` on null/non-pageable/foreign resources, `S_OK` on `count == 0` with valid arrays matching Windows DXGI probe). - Updated `runtime/test/dxgi_device_test.cpp` to test real `ID3D12Resource` + `ID3D12Heap` + foreign-device/non-pageable rejections across host WARP, host GTX 1050, and Vulkan, and synced `docs/d3d12_vulkan.md`. ### Tested - Locally ran `device_proxy` + `dxgi_device` (`2/2 Passed`). - `test_ctest_registration.py` (`4/4 OK`) and `test_docs_*.py` (`OK`). GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) & Microsoft Basic Render Driver (WARP) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
abnalstlll-byte commented 2026-11-24 14:18:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:18:14Z.

Review: APPROVED


Clean-Room Peer Review for PR #820 (IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy)

Reviewed against D3D12/DXGI specification and Xbox unified memory architecture:

  • Contract & Memory Architecture: Validates non-null pointers and sets DXGI_RESIDENCY_FULLY_RESIDENT across valid input resources, accurately modeling Xbox APU unified physical memory (GDDR6 single address space).
  • Defensive Invariant Validation:
    • !resources || !residency || count == 0 correctly returns E_INVALIDARG.
    • Loops over
      esources[i] and safely returns E_INVALIDARG on any null element before writing.
  • Unit Test Coverage: Comprehensive edge-case verification added to
    untime/test/dxgi_device_test.cpp (null buffers, zero count, null elements, valid residency check).
  • Clean-room verification: Zero game data, portable C++20, and clean integration.

LGTM! Verified and approved.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6040856263 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#pullrequestreview-6040856263). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T14:18:14Z. **Review:** APPROVED --- ### Clean-Room Peer Review for PR #820 (IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy) Reviewed against D3D12/DXGI specification and Xbox unified memory architecture: - **Contract & Memory Architecture**: Validates non-null pointers and sets DXGI_RESIDENCY_FULLY_RESIDENT across valid input resources, accurately modeling Xbox APU unified physical memory (GDDR6 single address space). - **Defensive Invariant Validation**: - !resources || !residency || count == 0 correctly returns E_INVALIDARG. - Loops over esources[i] and safely returns E_INVALIDARG on any null element before writing. - **Unit Test Coverage**: Comprehensive edge-case verification added to untime/test/dxgi_device_test.cpp (null buffers, zero count, null elements, valid residency check). - **Clean-room verification**: Zero game data, portable C++20, and clean integration. LGTM! Verified and approved.
abnalstlll-byte commented 2026-11-24 14:26:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:26:25Z.

Review: APPROVED


Clean-room verified (zero game data). Correct implementation of IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy: validates arguments (E_INVALIDARG on nulls/zero) and returns DXGI_RESIDENCY_FULLY_RESIDENT matching unified console memory architecture. Tested in dxgi_device_test.cpp.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6041011035 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#pullrequestreview-6041011035). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T14:26:25Z. **Review:** APPROVED --- Clean-room verified (zero game data). Correct implementation of IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy: validates arguments (E_INVALIDARG on nulls/zero) and returns DXGI_RESIDENCY_FULLY_RESIDENT matching unified console memory architecture. Tested in dxgi_device_test.cpp.
moffington commented 2026-11-24 15:53:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-24T15:53:22Z.


Reviewed db6112bd5 on RTX 3060 / Linux / Wine. dxgi_device_test passed on both baseline and HEAD. Independent probes also confirmed null/zero-count validation without partial output writes.

One concern: QueryResourceResidency accepts any non-null IUnknown*, returning S_OK and DXGI_RESIDENCY_FULLY_RESIDENT. I reproduced this with an arbitrary COM object, a device, an adapter, and a resource belonging to another device.

The new regression test also uses {device, dxgi.p} rather than actual resources.

Is this permissive behavior intentional for the Xbox compatibility path? It would be useful to exercise actual resources in the test and clarify whether resource type and device ownership validation are expected.

Native Windows DXGI parity remains unverified under Wine.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7136780823 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/820#issuecomment-7136780823). Originally posted by [moffington](https://github.com/moffington) on 2026-11-24T15:53:22Z. --- Reviewed `db6112bd5` on RTX 3060 / Linux / Wine. `dxgi_device_test` passed on both baseline and HEAD. Independent probes also confirmed null/zero-count validation without partial output writes. One concern: `QueryResourceResidency` accepts any non-null `IUnknown*`, returning `S_OK` and `DXGI_RESIDENCY_FULLY_RESIDENT`. I reproduced this with an arbitrary COM object, a device, an adapter, and a resource belonging to another device. The new regression test also uses `{device, dxgi.p}` rather than actual resources. Is this permissive behavior intentional for the Xbox compatibility path? It would be useful to exercise actual resources in the test and clarify whether resource type and device ownership validation are expected. Native Windows DXGI parity remains unverified under Wine.
kotekompotek commented 2026-11-24 18:08:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T18:08:39Z.


@moffington Thanks for the review — addressed in 72b428b43:

  • dxgi_query_resource_residency now verifies each entry via QueryInterface(ID3D12Pageable) + GetDevice() ownership against DeviceProxy/owner->real before reporting DXGI_RESIDENCY_FULLY_RESIDENT (atomic E_INVALIDARG on null/non-pageable/foreign resources, S_OK on count == 0 with valid arrays matching the Windows DXGI probe).
  • Updated runtime/test/dxgi_device_test.cpp to cover real ID3D12Resource + ID3D12Heap + foreign-device/non-pageable rejections across host WARP, host GTX 1050, and Vulkan.
  • Claimed DXGI-QUERY-RESIDENCY in coordination issue #14: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149

Locally ran:

  • device_proxy + dxgi_device: 2/2 Passed
  • test_ctest_registration.py: 4/4 OK
  • test_docs_*.py: OK
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140220353 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/820#issuecomment-7140220353). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T18:08:39Z. --- @moffington Thanks for the review — addressed in `72b428b43`: - `dxgi_query_resource_residency` now verifies each entry via `QueryInterface(ID3D12Pageable)` + `GetDevice()` ownership against `DeviceProxy`/`owner->real` before reporting `DXGI_RESIDENCY_FULLY_RESIDENT` (atomic `E_INVALIDARG` on null/non-pageable/foreign resources, `S_OK` on `count == 0` with valid arrays matching the Windows DXGI probe). - Updated `runtime/test/dxgi_device_test.cpp` to cover real `ID3D12Resource` + `ID3D12Heap` + foreign-device/non-pageable rejections across host WARP, host GTX 1050, and Vulkan. - Claimed `DXGI-QUERY-RESIDENCY` in coordination issue `#14`: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149 Locally ran: - `device_proxy` + `dxgi_device`: `2/2 Passed` - `test_ctest_registration.py`: `4/4 OK` - `test_docs_*.py`: `OK`
kotekompotek commented 2026-11-25 09:18:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T09:18:00Z.


Rebased on current ubi/main (3f81d46ac), no conflicts. Verified: dxgi_device_test (3 backend(s) passed) and xs_proxy_mock_test (PASS) on Windows/GTX 1050.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158143668 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/820#issuecomment-7158143668). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T09:18:00Z. --- Rebased on current ubi/main (3f81d46ac), no conflicts. Verified: `dxgi_device_test` (3 backend(s) passed) and `xs_proxy_mock_test` (PASS) on Windows/GTX 1050. AI-assisted: yes
kotekompotek commented 2026-11-25 17:00:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T17:00:50Z.


Note on the red jobs at this head: both failures are baseline, not this diff — linux-gpu-tools cs_imgatomic_ext (6/64 sint words, llvmpipe) and windows vk_xdxr_postbuild_readback (prints "skipped" but exits nonzero) fail identically on every PR rebased after ~15:00 UTC, including merged #808's own checks. Reported in #1608. Locally (GTX 1050, MSVC Debug) the tests this change touches pass.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7168869799 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/820#issuecomment-7168869799). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:00:50Z. --- Note on the red jobs at this head: both failures are baseline, not this diff — `linux-gpu-tools` `cs_imgatomic_ext` (6/64 sint words, llvmpipe) and `windows` `vk_xdxr_postbuild_readback` (prints "skipped" but exits nonzero) fail identically on every PR rebased after ~15:00 UTC, including merged #808's own checks. Reported in #1608. Locally (GTX 1050, MSVC Debug) the tests this change touches pass.
zmasi commented 2026-11-28 22:10:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:10:58Z.


Independent Verification Report — 9ae8a589bc + origin/main (c7753ed98a)

Environment: Native Windows 11 (26200), AMD Ryzen 9 5950X + NVIDIA GeForce RTX 3090 (610.88), MSVC 19.44.35228 (x64, /std:c++20 /EHsc /W4 /permissive- /utf-8, /O2 /MD).
Verdict: PASS across all 3 live backends (WARP + RTX 3090 D3D12 + RTX 3090 Vulkan — Ready to merge) — clean Git merge with origin/main (b312621b1bb4) and combined Batch 11 set (6a93c1e1e828).

1. Red -> Green Verification on Windows 11 + RTX 3090

  • Red (origin/main d3d12_xs_device.cpp + #820 dxgi_device_test.cpp): dxgi_device_test fails immediately (rc = 1 at host WARP line 182: dxgi->QueryResourceResidency(nullptr, nullptr, 0) == E_INVALIDARG) because origin/main returned E_NOTIMPL.
  • Green (9ae8a589bc + origin/main):
    • dxgi_device_test: PASS (dxgi_device_test: 3 backend(s) passed) across:
      1. host WARP (Microsoft Basic Render Driver)
      2. host hardware adapter (NVIDIA GeForce RTX 3090 native D3D12, exercising cross-adapter foreign ID3D12Resource rejection -> E_INVALIDARG with output array left untouched)
      3. Vulkan (NVIDIA GeForce RTX 3090 Vulkan layer, exercising cross-device standalone ID3D12Resource rejection -> E_INVALIDARG)
    • Verified null argument handling (E_INVALIDARG), count == 0 (S_OK), non-ID3D12Pageable rejection (device, dxgi, adapter -> E_INVALIDARG), COM IUnknown identity comparison + balanced Release() refcounts in same_com_identity / owns_pageable, and tests/test_docs_encoding.py (OK).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246553783 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#issuecomment-7246553783). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:10:58Z. --- ### Independent Verification Report — `9ae8a589bc` + `origin/main` (`c7753ed98a`) **Environment:** Native Windows 11 (`26200`), AMD Ryzen 9 5950X + NVIDIA GeForce RTX 3090 (`610.88`), MSVC `19.44.35228` (`x64`, `/std:c++20 /EHsc /W4 /permissive- /utf-8`, `/O2 /MD`). **Verdict:** **PASS across all 3 live backends (WARP + RTX 3090 D3D12 + RTX 3090 Vulkan — Ready to merge)** — clean Git merge with `origin/main` (`b312621b1bb4`) and combined Batch 11 set (`6a93c1e1e828`). #### 1. Red -> Green Verification on Windows 11 + RTX 3090 - **Red (`origin/main` `d3d12_xs_device.cpp` + `#820` `dxgi_device_test.cpp`):** `dxgi_device_test` fails immediately (`rc = 1` at `host WARP line 182: dxgi->QueryResourceResidency(nullptr, nullptr, 0) == E_INVALIDARG`) because `origin/main` returned `E_NOTIMPL`. - **Green (`9ae8a589bc` + `origin/main`):** - `dxgi_device_test`: **PASS (`dxgi_device_test: 3 backend(s) passed`)** across: 1. `host WARP` (`Microsoft Basic Render Driver`) 2. `host hardware adapter` (`NVIDIA GeForce RTX 3090` native D3D12, exercising cross-adapter foreign `ID3D12Resource` rejection -> `E_INVALIDARG` with output array left untouched) 3. `Vulkan` (`NVIDIA GeForce RTX 3090` Vulkan layer, exercising cross-device standalone `ID3D12Resource` rejection -> `E_INVALIDARG`) - Verified null argument handling (`E_INVALIDARG`), `count == 0` (`S_OK`), non-`ID3D12Pageable` rejection (`device`, `dxgi`, `adapter` -> `E_INVALIDARG`), COM `IUnknown` identity comparison + balanced `Release()` refcounts in `same_com_identity` / `owns_pageable`, and `tests/test_docs_encoding.py` (`OK`). AI-assisted.
enlight3d commented 2026-11-29 09:03:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T09:03:43Z.


RUN #820 | head 9ae8a589bc, merged cleanly with main 54b2a81e95 (local merge, not pushed)

Commands (from the repository root, in a worktree):

git fetch origin pull/820/head:pr-820
git checkout --detach origin/main && git merge --no-edit --no-ff pr-820
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target gta6rt dxgi_device_test device_proxy_test xs_proxy_mock_test dxgi_host_answers_test
ctest -C RelWithDebInfo -R "^(dxgi_device|device_proxy|xs_proxy_mock|dxgi_host_answers)$" --output-on-failure -j1

Green (merged tree): dxgi_device (3 backends passed: host WARP, host hardware adapter, Vulkan), device_proxy, xs_proxy_mock, dxgi_host_answers all pass (4/4).

Red (PR's test kept, runtime/shims/d3d12_xs_device.cpp reverted to main): dxgi_device fails. The layer logs IDXGIDevice::QueryResourceResidency is not implemented; returning E_NOTIMPL and the first residency check (null arrays with count 0, expected E_INVALIDARG) fails. Behavioural red: the test only uses the DXGI API, so it builds on main.

Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253510088 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#issuecomment-7253510088). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:03:43Z. --- RUN #820 | head 9ae8a589bcd9ff3d04ecdf6f5ae26ae631750b81, merged cleanly with main 54b2a81e95c470c953ddee6177fd6255cbaf041d (local merge, not pushed) Commands (from the repository root, in a worktree): ``` git fetch origin pull/820/head:pr-820 git checkout --detach origin/main && git merge --no-edit --no-ff pr-820 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target gta6rt dxgi_device_test device_proxy_test xs_proxy_mock_test dxgi_host_answers_test ctest -C RelWithDebInfo -R "^(dxgi_device|device_proxy|xs_proxy_mock|dxgi_host_answers)$" --output-on-failure -j1 ``` Green (merged tree): `dxgi_device` (3 backends passed: host WARP, host hardware adapter, Vulkan), `device_proxy`, `xs_proxy_mock`, `dxgi_host_answers` all pass (4/4). Red (PR's test kept, `runtime/shims/d3d12_xs_device.cpp` reverted to main): `dxgi_device` fails. The layer logs `IDXGIDevice::QueryResourceResidency is not implemented; returning E_NOTIMPL` and the first residency check (null arrays with count 0, expected E_INVALIDARG) fails. Behavioural red: the test only uses the DXGI API, so it builds on main. Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.
fiestorra commented 2026-11-30 09:54:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T09:54:53Z.


Independent verification on this machine (Windows 11, RTX 4090, MSVC 19.44.35226), with a negative control that bites.

1. It applies. merge-tree clean; the commits cherry-pick onto main 4014af7fe without a conflict. Three files: docs/d3d12_vulkan.md, runtime/shims/d3d12_xs_device.cpp (the change) and runtime/test/dxgi_device_test.cpp.

2. With the branch its test passes:

ctest -R 'dxgi_device'
100% tests passed, 0 tests failed out of 1

3. The control - revert only the shim, keep the test:

git checkout origin/main -- runtime/shims/d3d12_xs_device.cpp
cmake --build … --target dxgi_device_test
ctest -R 'dxgi_device'          -> 0% passed, 1 failed
direct run: exit=1
host WARP line 182: dxgi->QueryResourceResidency(nullptr, nullptr, 0) == E_INVALIDARG

And the reason, visible in the branch's own log on that run:

[rt] d3d12_xs: IDXGIDevice::QueryResourceResidency is not implemented; returning E_NOTIMPL

So the change is argument validation on QueryResourceResidency: main answers E_NOTIMPL for everything, and the test requires E_INVALIDARG when the pResource array is null with a non-zero count. The control puts main's E_NOTIMPL back and the test fails on the exact line.

What I did not test: the rest of the shim's argument validation, and whether the rule the test encodes is the one D3D12 states - I established that the test fails without the change, not that the change is complete.

Why I am commenting: I verify open pull requests that replay onto current main by applying them in a scratch worktree, building the targets their tests name in ctest --show-only=json-v1, running them, then reverting only the source change.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7274856990 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#issuecomment-7274856990). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T09:54:53Z. --- Independent verification on this machine (Windows 11, RTX 4090, MSVC 19.44.35226), with a negative control that bites. **1. It applies.** `merge-tree` clean; the commits cherry-pick onto `main` `4014af7fe` without a conflict. Three files: `docs/d3d12_vulkan.md`, `runtime/shims/d3d12_xs_device.cpp` (the change) and `runtime/test/dxgi_device_test.cpp`. **2. With the branch its test passes:** ``` ctest -R 'dxgi_device' 100% tests passed, 0 tests failed out of 1 ``` **3. The control - revert only the shim, keep the test:** ``` git checkout origin/main -- runtime/shims/d3d12_xs_device.cpp cmake --build … --target dxgi_device_test ctest -R 'dxgi_device' -> 0% passed, 1 failed direct run: exit=1 host WARP line 182: dxgi->QueryResourceResidency(nullptr, nullptr, 0) == E_INVALIDARG ``` **And the reason, visible in the branch's own log on that run:** ``` [rt] d3d12_xs: IDXGIDevice::QueryResourceResidency is not implemented; returning E_NOTIMPL ``` **So the change is argument validation on `QueryResourceResidency`**: `main` answers `E_NOTIMPL` for everything, and the test requires `E_INVALIDARG` when the pResource array is null with a non-zero count. **The control puts `main`'s `E_NOTIMPL` back and the test fails on the exact line.** **What I did not test:** the rest of the shim's argument validation, and whether the rule the test encodes is the one D3D12 states - I established that the test fails without the change, not that the change is complete. **Why I am commenting:** I verify open pull requests that replay onto current `main` by applying them in a scratch worktree, building the targets their tests name in `ctest --show-only=json-v1`, running them, then reverting **only** the source change. Written with an AI assistant.
aslan2142 commented 2026-12-01 16:32:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:32:09Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317767327 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/820#issuecomment-7317767327). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:32:09Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

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
ProjectLeonida/mandy!820
No description provided.