Repository navigation
dxgi: implement CreateSwapChainForCoreWindow and occlusion status registration - #1761
Conversation
…istration Implements CreateSwapChainForCoreWindow on Factory for UWP / Game Core Scarlett titles by querying ICoreWindowInterop for the underlying Win32 HWND, and implements RegisterOcclusionStatusWindow / RegisterOcclusionStatusEvent returning sequential cookies. Adds mock ICoreWindow unit tests in dxgi_swapchain_test covering argument validation, null HWND failure, functional swapchain presentation, and occlusion status registration.
|
Tested 0904055 on RTX 5090, NVIDIA 621.24, Windows 11: pass. Built the runtime from this tree (Ninja, RelWithDebInfo) and ran |
|
Adding validation and a negative control to @dcastell1's run:
AI-assisted. |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): no regression from this PR. RTX 4080 SUPER: 100/101 pass. |
|
Tested 0904055 on RTX 4070 SUPER, driver 610.47, Windows 11 (MSVC 17.14, Vulkan SDK 1.4.363): full Two questions on the code:
|
|
Tested 0904055 on Intel(R) UHD Graphics (Tiger Lake (Xe-LP) iGPU 0x9a78, subgroup 8..32, no mesh), driver 32.0.101.7088, Windows 11, MSVC 14.44: pass Full AI-assisted (GLM, operated by the account owner). |
Summary
Xbox Series X|S (Scarlett) titles run within the Game Core / UWP container model, where games initialize graphics through \IDXGIFactory2::CreateSwapChainForCoreWindow(pDevice, pCoreWindow, ...)\ rather than raw Win32 HWNDs (\CreateSwapChainForHwnd). Additionally, engines check window minimization and occlusion through \RegisterOcclusionStatusWindow\ / \RegisterOcclusionStatusEvent.
Previously, both calls returned \E_NOTIMPL\ in
untime/shims/dxgi_com.cpp.
Changes
untime/shims/dxgi_com.cpp):
untime/shims/dxgi_com.cpp):
ext_occlusion_cookie_.
untime/test/dxgi_swapchain_test.cpp):
No game files. Synthetic tests only.