Add interactive occlusion + WINDOW_HIDDEN throttle test to TrinityALTest#35
Open
Schogol wants to merge 1 commit into
Open
Add interactive occlusion + WINDOW_HIDDEN throttle test to TrinityALTest#35Schogol wants to merge 1 commit into
Schogol wants to merge 1 commit into
Conversation
SwapChain.OcclusionThrottleProbe presents the primary swapchain to the visible test window in a loop and logs loop-fps vs actual render-fps per window state. It detects occlusion from window geometry (IsWindowOccluded: sample 5 points on the window, skipping see-through overlays like the Alt+Tab switcher; minimized counts as hidden) and, while occluded, emulates the WINDOW_HIDDEN throttle (20ms sleep + render 1-in-50) to show rendering collapse to ~1 fps and recover when visible. Manual/interactive (needs a real GPU + visible window), run with: --interactive --gtest_filter=SwapChain.OcclusionThrottleProbe then cover / minimize / restore the window and read occlusion_throttle_test.log. Used to establish that DXGI_STATUS_OCCLUDED is unavailable for flip-model swapchains (both Present and Present(0, DXGI_PRESENT_TEST) stay S_OK while covered) and that Win32 window-geometry occlusion is a reliable substitute.
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.
SwapChain.OcclusionThrottleProbe presents the primary swapchain to the visible test window in a loop and logs loop-fps vs actual render-fps per window state. It detects occlusion from window geometry (IsWindowOccluded: sample 5 points on the window, skipping see-through overlays like the Alt+Tab switcher; minimized counts as hidden) and, while occluded, emulates the WINDOW_HIDDEN throttle (20ms sleep + render 1-in-50) to show rendering collapse to ~1 fps and recover when visible.
Manual/interactive (needs a real GPU + visible window), run with:
--interactive --gtest_filter=SwapChain.OcclusionThrottleProbe
then cover / minimize / restore the window and read occlusion_throttle_test.log.
Used to establish that DXGI_STATUS_OCCLUDED is unavailable for flip-model swapchains (both Present and Present(0, DXGI_PRESENT_TEST) stay S_OK while covered) and that Win32 window-geometry occlusion is a reliable substitute.
Disclaimer:
Claude helped with creating the test and fix.