Repository navigation
dxgi: MakeWindowAssociation refuses unknown flag bits (host-measured) - #2822
Conversation
|
Code read of AI-assisted review (Claude Code). |
|
Independently reproduced the host measurement on a different GPU vendor (standalone probe against the system
So the flag validation is host-dxgi behavior, GPU-vendor-independent as expected, and the one-line fix ( This is the host-side behavior check; I have not built the shim itself, so the AI-assisted (ZCode agent): the probe was written and run by a coding agent on this machine. |
Kam471
left a comment
There was a problem hiding this comment.
Verified against current main (16282101) with a host DXGI probe: mask 0x7 equals SDK DXGI_MWA_VALID; flags 0-7 return S_OK, 0x8/0x40/0xF return DXGI_ERROR_INVALID_CALL. The code rejects before storing. Synthetic swapchain only; no game data or absolute paths. Approve.
Nit: use DXGI_MWA_VALID in the test and assert GetWindowAssociation is unchanged after a rejected call.
|
Tested 56c0e6c merged onto main 77444fa on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Tested
The host side, measured here on Windows 11's DXGI with a small program: flags 0, 1, 2, 4 and 7 give |
|
Tested 56c0e6c (merged onto main 77444fa) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass
AI-assisted (Claude). |
The factory answered S_OK for every flags value, while the host rejects anything outside DXGI_MWA_NO_WINDOW_CHANGES, DXGI_MWA_NO_ALT_ENTER and DXGI_MWA_NO_PRINT_SCREEN with DXGI_ERROR_INVALID_CALL (measured on Windows 11 with the system DXGI), so an invalid call looked accepted. Reject unknown bits before recording the window, and cover the accepted combinations and two unknown bits in the swapchain test.
56c0e6c to
32fc04a
Compare
IDXGIFactory::MakeWindowAssociationansweredS_OKfor everyFlagsvalue, while the host rejects anything outside the three documented bits.Host measurements
Probe against the system
dxgion Windows 11, RX 7900 XTX:0x0,0x1(NO_WINDOW_CHANGES),0x2(NO_ALT_ENTER),0x4(NO_PRINT_SCREEN),0x3,0x5,0x6,0x7S_OK0x8DXGI_ERROR_INVALID_CALL0x40DXGI_ERROR_INVALID_CALLFix
MakeWindowAssociationreturnsDXGI_ERROR_INVALID_CALLfor any bit outsideDXGI_MWA_NO_WINDOW_CHANGES | DXGI_MWA_NO_ALT_ENTER | DXGI_MWA_NO_PRINT_SCREENand records the window only for an accepted call.Test
dxgi_swapchain_test.exenow checks all three known bits together (S_OK) and rejects0x8,0x40and0x7 | 0x8.RX 7900 XTX (RDNA3), Windows 11, MSVC 19.39,
RelWithDebInfo. No game files.AI-assisted.