Repository navigation
d3d12_xs: implement IDXGIDevice::QueryResourceResidency on Xbox DeviceProxy - #820
kotekompotek wants to merge 1 commit into
Conversation
abnalstlll-byte
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
e9dc7e3 to
db6112b
Compare
|
Reviewed One concern: The new regression test also uses 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. |
db6112b to
72b428b
Compare
|
@moffington Thanks for the review — addressed in
Locally ran:
|
72b428b to
9ae8a58
Compare
|
Rebased on current ubi/main (3f81d46), no conflicts. Verified: AI-assisted: yes |
|
Note on the red jobs at this head: both failures are baseline, not this diff — |
Claimed in the coordination issue as: DXGI-QUERY-RESIDENCY (#14 (comment))
What and why
main.IDXGIDevice::QueryResourceResidencyon the XboxDeviceProxy:dxgi_query_resource_residencyverifies each entry viaQueryInterface(ID3D12Pageable)+GetDevice()ownership againstDeviceProxy/owner->realbefore reportingDXGI_RESIDENCY_FULLY_RESIDENT(atomicE_INVALIDARGon null/non-pageable/foreign resources,S_OKoncount == 0with valid arrays matching Windows DXGI probe).runtime/test/dxgi_device_test.cppto test realID3D12Resource+ID3D12Heap+ foreign-device/non-pageable rejections across host WARP, host GTX 1050, and Vulkan, and synceddocs/d3d12_vulkan.md.Tested
device_proxy+dxgi_device(2/2 Passed).test_ctest_registration.py(4/4 OK) andtest_docs_*.py(OK).GPUs tested: NVIDIA GeForce GTX 1050 (driver 582.28, Windows) & Microsoft Basic Render Driver (WARP)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.