Repository navigation
Frame pacing groundwork: hardware flip queue probe and a two-route pacing test - #130
Draft
phantoslayer21 wants to merge 2 commits into
Draft
phantoslayer21 wants to merge 2 commits into
phantoslayer21 wants to merge 2 commits into
Conversation
…cing test Refs #96. Read-only groundwork for frame generation presentation; no product code changes. - clean/fg/hwfq_probe.cpp asks the graphics kernel, through the documented D3DKMTQueryAdapterInfo queries, whether hardware GPU scheduling and the hardware flip queue are enabled for each adapter. It creates no device. - clean/fg/fg_pacing_test.cpp presents alternating "real" and "stand-in" frames at a fixed target interval through two public routes and reports how evenly they reach the screen from each route's own statistics: the composition swapchain with SetTargetTime (route A, Direct3D 11 displayable surfaces) and a DXGI flip-model swap chain on Direct3D 12 with a frame-latency waitable object (route B). It first prints read-only display context. - clean/fg/HWFQ-FINDINGS.md: what the test PC reports, what Microsoft's documentation says the routes need, what AMD's public frame generation documentation states about its pacing, and the first runs. Those runs gave no on-screen times, because no live monitor was attached; no interval figures are reported yet. Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
…tand-in frame Refs #96. Test only; nothing from AMD's SDK is added to the repository or shipped. - clean/fg/fetch_ffx_sdk.py fetches the few files the experiment needs from AMD's public FSR SDK at one pinned commit (tag v2.4.0) into a folder outside the repository: the API headers, the signed loader and frame generation DLLs, and the licence. Each file is checked against the commit's git blob hash, and a SHA-256 manifest is written. - clean/fg/ffx_swapchain_test.cpp creates the frame generation swap chain and the frame generation context through the documented API, and supplies our stand-in frame through frameGenerationCallback. AMD's own interpolation is never dispatched. It reports return codes and callback counts, the GPU memory of the idle context, on-screen intervals from the swap chain's frame statistics, and observable signs of the pacing path (runtime messages, process CPU time, busiest threads and their priorities). A --dwm-check mode reports DWM's completed frames per second, read only. - HWFQ-FINDINGS.md: how to fetch, build and run it. No results yet; they need a live monitor. Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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.
Refs #96
Read-only groundwork for frame generation presentation and pacing. There are no product code changes, and no claim
here that frame generation works, how well it paces, or when it ships.
What this adds
clean/fg/hwfq_probe.cpp: asks the graphics kernel (documentedD3DKMTEnumAdapters2/D3DKMTQueryAdapterInfoqueries) whether hardware GPU scheduling and the hardware flip queue are enabled per adapter. It creates no device.
clean/fg/fg_pacing_test.cpp: presents alternating "real" and "stand-in" frames (two low-contrast greys) at a fixedtarget interval through two public routes, and reports on-screen interval evenness (mean, sd, p99, misses) from each
route's own statistics:
SetTargetTimeper present, Direct3D 11 displayable surfaces, and thePresentStatus / CompositionFrame / IndependentFlipFrame statistics;
IDXGISwapChain4:FLIP_DISCARD, a frame-latency waitable object,Present(1, 0)andGetFrameStatistics.First it prints read-only context: the display mode and refresh period, the output's EDID identity, tearing support,
the console display state, and DWM's completed frames over one second.
clean/fg/HWFQ-FINDINGS.md: what the test PC reports, the Microsoft documentation for the routes, what AMD's publicframe generation manual states about its pacing, and the first runs. Every statement is a quotation or a printed
value.
Both programs are our own code, written from Microsoft's public API documentation, with no third-party code. They are
not part of any build or CI job; build them by hand as the note describes.
Second commit: experiment with AMD's frame generation swap chain (test only)
clean/fg/fetch_ffx_sdk.pyfetches the files the experiment needs from AMD's public FSR SDK into a folder OUTSIDE therepository. Source: github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK, tag v2.4.0, commit
7539ae8b6568ad29ed78a753404351daf3b5cca7. The files are the API headers, the signed loader and frame generation
DLLs, and the licence. Each file is checked against the commit's git blob hash, and a SHA-256 manifest is written.
No SDK file (header, DLL, licence) is in this pull request.
clean/fg/ffx_swapchain_test.cppcreates the frame generation swap chain and the frame generation context throughthe documented API, and supplies our stand-in frame through
frameGenerationCallback. AMD's own interpolation isnever dispatched. It reports:
priorities.
/W4). It has not run yet: it needs a live monitor, like the other runs.Its results and the reruns of
fg_pacing_testwill come as a second push.high-priority pacing thread and the driver-assisted path compete fairly. Builds, fetches and records run at
below-normal priority.
Record (one test PC: Radeon RX 9070 XT, Windows 10.0.26200.9974 / 25H2, driver 32.0.32015.7029, WDDM 3.2)
hwfq_probe: "HwFlipQueueSupportState 2 (STABLE), HwFlipQueueEnabled 1" and "HwSchSupportState 2 (STABLE),HwSchEnabled 1" for the RX 9070 XT.
fg_pacing_test: built and run, 13 runs of 5 s, each in its own locked GPU slot, every one exit 0. No run produced anon-screen interval, so this PR gives no interval numbers:
"statistics received: independent-flip 0, composition-frame 0, present-status 300": per present, "skipped" x2 and
"queued" x1 per composition frame (199 or 200 skipped of 300). Statistics for successive composition frames
arrived about 77 to 80 ms apart.
GetFrameStatisticsreturned S_OK with PresentCount 0, SyncRefreshCount 0 and SyncQPCTime 0 on everycall ("no statistic 300").
QueryDisplayConfiggave "EDID ids valid 0, manufacturer 0x0000 product 0x0000" (DisplayPort);dxdiag listed no monitor name or model; DWM completed 8 to 11 frames a second.
Without scanout VSync there are no display times to measure. Nothing was changed to find out.
with
--verbose, and the usage text was extended. Both programs build with/W4and no warnings (MSVC, x64).Tested
/W4, no warnings) and run to exit 0 on the test PC.hwfq_probeoutput as above.fg_pacing_test: route A and B, windowed and borderless; route A also with QPCversus interrupt-time targets and with
ForceVSyncInterrupt(true).and none of them is in
clean/fg/.Not tested
emulator with an EDID). The same short runs will be repeated then, and their numbers added here with their records.
read: tearing support and the user's DirectX graphics preferences.