Skip to content

d3d12_xs: IDXGIDevice::QueryResourceResidency reports every object fully resident - #9660

Closed
IAmTheSween wants to merge 1 commit into
ProjectLeonida:mainfrom
IAmTheSween:dxgi-query-resource-residency
Closed

IAmTheSween wants to merge 1 commit into
ProjectLeonida:mainfrom
IAmTheSween:dxgi-query-resource-residency

Conversation

@IAmTheSween

Copy link
Copy Markdown

Claimed in #9522 (new item: IDXGIDevice::QueryResourceResidency on the device proxy).

What

IDXGIDevice::QueryResourceResidency on the d3d12_xs device proxy returned E_NOTIMPL. The layer never evicts anything (MakeResident and Evict are no-ops, docs/d3d12_vulkan.md ID3D12Heap row), so the call now answers what is true: every object is DXGI_RESIDENCY_FULLY_RESIDENT.

  • count == 0 asks nothing and returns S_OK (no pointers read).
  • A null array, a null status array or a null entry is E_INVALIDARG, and nothing is written in that case.
  • The objects are not queried for an interface; the answer is the same for every one of them.

CreateSurface is unchanged (still refused with its log line); only its comment now names that method alone.

Files

  • runtime/shims/d3d12_xs_device.cpp: dxgi_query_resource_residency.
  • runtime/test/dxgi_device_test.cpp: the E_NOTIMPL check is replaced by count 0, two fences reported fully resident (the output is pre-filled with EVICTED_TO_DISK), and the three null cases.

Tested

Windows 11, NVIDIA GeForce RTX 5070 (driver 32.0.16.2114), MSVC 14.44 (VS 2022), CMake from VS 2022, -DLEONIDA_VULKAN_HEADERS_FETCH=ON.

cmake -S runtime -B runtime/build -DLEONIDA_VULKAN_HEADERS_FETCH=ON
cmake --build runtime/build --config RelWithDebInfo --target dxgi_device_test
ctest --test-dir runtime/build -C RelWithDebInfo -R dxgi_device --output-on-failure

1/1 Test #175: dxgi_device .... Passed; run directly it prints dxgi_device_test: 3 backend(s) passed (the host device, WARP and the Vulkan layer behind the proxy).

No game files used or needed. AI-assisted (Claude, through OpenCode); I read and checked the change.

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified on native Windows 11 (10.0.26300.9974, MSVC 19.44, RelWithDebInfo, NVIDIA GeForce RTX 5060 Ti driver 610.88), PR head 83cf5de46 merged onto main (5d74c2723):

  • python -I scripts/check_no_game_data.py runtime/shims/d3d12_xs_device.cpp runtime/test/dxgi_device_test.cpp: clean (exit 0).
  • cmake --build runtime/build --target dxgi_device_test --parallel: built cleanly.
  • ctest --test-dir runtime/build -R ^dxgi_device$ --output-on-failure -V: 1/1 passed (dxgi_device_test: 3 backend(s) passed — host WARP, host hardware adapter, and Vulkan).

AI-assisted.

@OliverMarcusson

Copy link
Copy Markdown

Tested 83cf5de4 (merged cleanly onto main 5d74c272) on NVIDIA GeForce RTX 5070 Ti (driver 621.01, Vulkan 1.4.357), Windows 11 10.0.26200, MSVC 19.44 (RelWithDebInfo, Windows SDK 10.0.26100.0): pass.

  • ctest -C RelWithDebInfo -R ^(dxgi_device|device_proxy)$: 2/2 PASS
    • device_proxy: PASS (0 failures)
    • dxgi_device: PASS (3 backends passed, 0.26 s)

AI-assisted (Gemini).

@n-romanovich

Copy link
Copy Markdown

Tested 83cf5de46 on NVIDIA GeForce RTX 5060 Ti, NVIDIA 610.88, Windows 11 (MSVC 19.52, Vulkan SDK 1.4.363.0): pass.

checked: #9660@83cf5de46 | with: cmake --build runtime/build --config RelWithDebInfo --target dxgi_device_test xs_proxy_mock_test gta6rt && ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure -R "dxgi_device|xs_proxy_mock|device_proxy" | on: Windows 11, MSVC 19.52, NVIDIA GeForce RTX 5060 Ti (610.88) | result: 9/9 passed (dxgi_device, xs_proxy_mock*, device_proxy*), diff reviewed, synthetic inputs only, no game files. AI-assisted.

@sgonzalez-glitch

Copy link
Copy Markdown

Tested 83cf5de46 (as part of #9516, #9549, #9614, #9653, #9657, #9660, #9678 and #9689 merged together onto main 5d74c2723) on NVIDIA GeForce RTX 2080, driver 621.24 (32.0.16.2124), Windows 11, MSVC 19.44 RelWithDebInfo: pass.

AI-assisted: yes

@RAINighty

Copy link
Copy Markdown

Tested 83cf5de46 merged with main 5d74c2723 (clean merge) on Windows 11 (10.0.26300), Intel Core i7-14650HX, hybrid-GPU laptop (RTX 5060 + Intel UHD, no adapter forced), MSVC 19.44.35228, RelWithDebInfo (Ninja): pass.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants