Repository navigation
dxgi: serve GetDisplaySurfaceData and GetDisplaySurfaceData1 with pointer validation - #7619
bitzin-dev wants to merge 1 commit into
Conversation
|
Independent Windows + GPU test of Setup: Windows 11 x64, MSVC 19.44.35220 (
AI-assisted review/test. |
|
Tested
AI-assisted. |
|
Tested f43810a merged onto main dfe4e4a (clean merge) on Windows 11 build 26300, MSVC 19.44, Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, Two points from reading the code:
AI-assisted (Claude Code). No game files. |
|
Tested
AI-assisted: yes (Claude ran the build and tests; results checked by me). |
|
Tested f43810a (merged onto main 867d922) on RTX 5070, NVIDIA 621.24, Windows 11, Vulkan validation layer on (
Synthetic inputs only, no game files. AI-assisted (Claude Code). |
|
Independent verification of I also added a local positive probe to address the coverage gap noted above. It creates a synthetic 32×32 D3D11 WARP texture, queries its real
Negative control on RTX 4090: restoring just the two getters' previous unconditional refusal made both non-null getters return |
|
Tested
AI-assisted: yes |
|
Follow-up to my test above. Since this changes AI-assisted (Claude Code). |
|
Tested f43810a (head of this PR) on RTX 5070 Ti (Blackwell, subgroup 32), NVIDIA 621.01, Windows 11, MSVC 14.44 (VS 2022 17.14 Build Tools), CMake 4.5.1 + Ninja, Vulkan headers sdk-1.4.363.0 (fetched), no game copy: pass, with a coverage note. I applied the diff to a clone of main at dfe4e4a (clean git apply), built dxgi_swapchain_test and ran it: exit 0, "dxgi_swapchain_test: PASS (...; 0 validation errors)", including the 45 CreateSwapChainForHwnd descriptions compared with the host runtime, 0 mismatches. Negative control: with dxgi_com.cpp reverted to main and the PR's test kept, the test still passes. That is expected from the diff: the old stub returned DXGI_ERROR_INVALID_CALL for every argument, and the new checks only pass nullptr and expect INVALID_CALL, so they pass on both. The new non-null path (returns S_OK) has no test, so the behaviour change itself was reviewed but not exercised. AI-assisted (Claude Code): checked by applying the diff to a private clone of main and building and running the tests above. No game data was used. |
Addresses the retail boot finding reported by @lunarminus in #7496:
During retail executable startup, after
XboxIDXGIDevice::GetAdapter->EnumOutputs, the title calls output vtable slot 21 (IDXGIOutput1::GetDisplaySurfaceData1). Inruntime/shims/dxgi_com.cpp, this method previously returnedDXGI_ERROR_INVALID_CALLunconditionally, causing the title to hit a fatal assert / break.This PR:
IDXGIOutput::GetDisplaySurfaceDataandIDXGIOutput1::GetDisplaySurfaceData1inruntime/shims/dxgi_com.cppto validate the incoming destination pointer (returningDXGI_ERROR_INVALID_CALLif null) and returnS_OKwhen non-null.IDXGIOutput::SetDisplaySurfaceto similarly validate that the surface pointer is non-null before returningS_OK.runtime/test/dxgi_swapchain_test.cpp.Validation:
runtime/test/dxgi_swapchain_test.cpp.main.