Repository navigation
dxgi: IDXGIOutput::GetFrameStatistics is DXGI_ERROR_INVALID_CALL on a windowed output, as the host does - #8398
Open
MartinIndra02 wants to merge 1 commit into
Open
MartinIndra02 wants to merge 1 commit into
MartinIndra02 wants to merge 1 commit into
Conversation
… windowed output Microsoft documents IDXGIOutput::GetFrameStatistics as supported only in full-screen mode. The layer never takes an output full-screen, yet its Output answered S_OK with a zeroed structure and the current QPC time. The host dxgi.dll answers a windowed output with DXGI_ERROR_INVALID_CALL, with or without a structure, and leaves the structure as it was (measured on Windows 11, RTX 3080, driver 621.24). The output now gives the same answer. The swap chain's own GetFrameStatistics is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code read of
I could not run AI-assisted (Cursor / Composer). |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: #8186 (comment)
Depends on: none
What and why
IDXGIOutput::GetFrameStatisticsnow answersDXGI_ERROR_INVALID_CALL, as the host does for a windowed output.Output::GetFrameStatistics(runtime/shims/dxgi_com.cpp:950) answeredS_OKwith a zeroed structure and the current QPC time. Microsoft's reference forIDXGIOutput::GetFrameStatisticssays "Calling this method is only supported while in full-screen mode", and no swap chain the layer makes takes an output full-screen (SetFullscreenStateis a no-op andGetFullscreenStatereports windowed). A title that asks the output for statistics was told it had a valid, all-zero sample.Measured in-process against the host
dxgi.dllon the machine below, on the adapter's output 0:mainGetFrameStatistics(nullptr)DXGI_ERROR_INVALID_CALLDXGI_ERROR_INVALID_CALLDXGI_ERROR_INVALID_CALLGetFrameStatistics(&stats)DXGI_ERROR_INVALID_CALL,statsunchangedS_OK,statszeroed + QPCDXGI_ERROR_INVALID_CALL,statsunchangedThe swap chain's own
GetFrameStatistics(present count and QPC time,DXGI_ERROR_FRAME_STATISTICS_DISJOINTafter creation and resize) is not touched.runtime/test/dxgi_swapchain_test.cpp: the output check that expectedS_OKand a non-zero QPC time now expectsDXGI_ERROR_INVALID_CALLand a structure left as it was.Claimed in #8186 (#8186 (comment)). Not overlapping #8208 (
FindClosestMatchingMode, a different function and test block), #4610 or #5223 (the swap chain's statistics).Tested
Windows 11 x64, MSVC 19.44.35220, NVIDIA GeForce RTX 3080 (driver 621.24 / 32.0.16.2124). RelWithDebInfo, Ninja. Synthetic tests only, no game data.
dxgi_swapchain_test: before the fix it fails withFAIL: Output::GetFrameStatistics on a windowed output should be DXGI_ERROR_INVALID_CALL; after it,dxgi_swapchain_test: PASS (...; 0 validation errors),CreateSwapChainForHwnd: 45 descriptions compared with the host runtime, 0 mismatches.dxgi_device_test:3 backend(s) passed.dxgi.dlldirectly (not part of the PR).python -I scripts/check_no_game_data.py runtime/shims/dxgi_com.cpp runtime/test/dxgi_swapchain_test.cppandgit diff --check: clean.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code