Home

Awesome

dx12_present_barrier

A screenshot of the dx12_present_barrier sample running. At the top, a green bar shows that the swap barrier is in present barrier sync across systems using framelock. Green and red bars scroll across the screen in perpendicular directions. A Present Barrier Stats window in the upper left reads "SyncMode: SYNC_SYSTEM; PresentCount: 670; PresentInSyncCount: 664; FlipInSyncCount: 663; RefreshCount: 1132."

This sample demonstrates the usage of the new NvAPI interface to synchronize present calls between windows on the same system as well as on distributed systems. It can also be used to check if systems are configured to support synchronized present through DirectX 12 present barrier. A general overview of the interface can be found on the NVIDIA developer blog.

System Requirements

Sample Features

The app draws a couple of moving bars and lines to visually check the synchronization quality. In the upper left corner a window with present barrier statistics is shown. There are several keyboard shortcuts that can be used at runtime.

A bar at the top of the window indicates the present barrier status.

Build and Run

Clone https://github.com/nvpro-samples/nvpro_core.git next to this repository (or pull latest master if you already have it):

mkdir build && cd build && cmake .. # Or use CMake GUI

If there are missing dependencies (e.g. glfw), run git submodule update --init --recursive --checkout --force in the nvpro_core repository.

Then start the generated .sln in VS or run make -j.

Run dx12_present_barrier or ../../bin_x64/Release/dx12_present_barrier.exe

You are advised not to run the debug build unless you have the required validation layers.

LICENSE

Copyright 2022 NVIDIA CORPORATION. Released under Apache License, Version 2.0. See "LICENSE" file for details.