[PR #820] d3d12_xs: implement IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy #858

Open
opened 2026-11-26 20:19:17 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/820
Author: @kotekompotek
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: work/d3d12-xs-dxgi-query-residency


📝 Commits (1)

  • 9ae8a58 d3d12_xs: implement IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy

📊 Changes

3 files changed (+108 additions, -10 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+4 -1)
📝 runtime/shims/d3d12_xs_device.cpp (+36 -8)
📝 runtime/test/dxgi_device_test.cpp (+68 -1)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/820 **Author:** [@kotekompotek](https://github.com/kotekompotek) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `work/d3d12-xs-dxgi-query-residency` --- ### 📝 Commits (1) - [`9ae8a58`](https://github.com/ubiquitarianism/leonida/commit/9ae8a589bcd9ff3d04ecdf6f5ae26ae631750b81) d3d12_xs: implement IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy ### 📊 Changes **3 files changed** (+108 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+4 -1) 📝 `runtime/shims/d3d12_xs_device.cpp` (+36 -8) 📝 `runtime/test/dxgi_device_test.cpp` (+68 -1) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#858
No description provided.