PC Game APIs for DisplayPort Refresh Rates
Modern PC video games frequently negotiate display timings and target refresh rates directly with DisplayPort-connected monitors. This article outlines the primary graphics and system Application Programming Interfaces (APIs)—including Microsoft DirectX Graphics Infrastructure (DXGI), Vulkan, native Win32 calls, and vendor-specific SDKs—that empower PC games to query display capabilities, switch fixed refresh rates, and govern dynamic variable refresh rates over DisplayPort.
DirectX Graphics Infrastructure (DXGI)
For games utilizing DirectX 11 or DirectX 12 on Windows, the DirectX Graphics Infrastructure (DXGI) serves as the primary system-level interface for display output and swap chain management.
- Mode Enumeration and Fixed Rates: Games call
IDXGIOutput::GetDisplayModeListto retrieve an array ofDXGI_MODE_DESCstructures. Each structure defines resolution and refresh rate as a rational fraction (DXGI_RATIONAL, consisting of a Numerator and Denominator, such as 144000/1000 for 144 Hz). When initializing or resizing a swap chain in exclusive fullscreen, the game supplies this target struct to lock the monitor into that specific hardware timing via the DisplayPort interface. - Variable Refresh Rate (Adaptive-Sync): DXGI exposes
flags such as
DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING. When used alongside borderless windowed or modern flip modes (DXGI_SWAP_EFFECT_FLIP_DISCARD), this flag allows the GPU to bypass the DWM (Desktop Window Manager) compositing lock, directly signaling VESA Adaptive-Sync over DisplayPort to adjust panel refresh timings dynamically to the rendered frame rate.
Vulkan API
The Khronos Group’s Vulkan API offers low-level, cross-platform display control using modular extensions:
- Direct Display Extensions
(
VK_KHR_display): Vulkan allows games to bypass the operating system's windowing system entirely. UsingvkGetDisplayModePropertiesKHR, an engine inspects the available physical display modes reported by the monitor's DisplayID or EDID over DisplayPort. It then binds a specificVkDisplayModeKHRcontaining an exact integer refresh rate in millihertz (mHz). - Exclusive Fullscreen
(
VK_EXT_full_screen_exclusive): On Windows, this extension allows Vulkan to acquire device-level ownership of the DisplayPort connection, enabling explicit refresh rate selection similar to DXGI. - Present Timing: Extensions such as
VK_GOOGLE_display_timingallow engines to schedule precisely when an image should appear, coordinating swap operations with the panel's active refresh intervals.
Win32 GDI API (Low-Level Windows Subsystem)
At the operating system level, games can use traditional Win32 display management APIs to set hardware frequencies independently of the rendering pipeline:
ChangeDisplaySettingsEx: By querying display devices and populating aDEVMODEstructure, a game can specify thedmDisplayFrequencyattribute (in Hz).- Driver Communication: When submitted, the Windows Display Driver Model (WDDM) commands the graphics driver to issue auxiliary (AUX) channel commands over DisplayPort, reprogramming the pixel clock and timing parameters on the monitor.
Hardware Vendor SDKs (NVAPI and AMD AGS)
When standard OS-level APIs do not expose deep panel control, developers use GPU-specific developer libraries:
- NVIDIA NVAPI: Provides direct access to NVIDIA
G-Sync and DisplayPort timing parameters. Functions like
NvAPI_DISP_SetDisplayConfigandNvAPI_GPU_GetScanoutConfigurationallow games to override default OS timings and manage ultra-low latency frame pacing. - AMD GPU Services (AGS) Library: Grants explicit FreeSync and Adaptive-Sync controls. AGS allows developers to query precise minimum and maximum dynamic refresh rate bounds over DisplayPort and programmatically toggle low-framerate compensation (LFC).