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 — |
Independent Verification Report —
|
|
RUN #820 | head 9ae8a58, merged cleanly with main 54b2a81 (local merge, not pushed) Commands (from the repository root, in a worktree): Green (merged tree): Red (PR's test kept, 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. |
|
Independent verification on this machine (Windows 11, RTX 4090, MSVC 19.44.35226), with a negative control that bites. 1. It applies. 2. With the branch its test passes: 3. The control - revert only the shim, keep the test: And the reason, visible in the branch's own log on that run: So the change is argument validation on 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 Written with an AI assistant. |
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.