Options for swap-chain behavior.
typedef enum DXGI_SWAP_CHAIN_FLAG
{
DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4,
DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8,
DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16,
DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32,
DXGIX_SWAP_CHAIN_FLAG_QUANTIZATION_RGB_FULL = 0,
DXGIX_SWAP_CHAIN_FLAG_QUANTIZATION_RGB_LIMITED = 0x00100000,
DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_sRGB_TO_REC709 = 0x00200000,
DXGIX_SWAP_CHAIN_MATCH_OTHER_CONSOLES = 0,
DXGIX_SWAP_CHAIN_MATCH_XBOX360_AND_PC = 0x00200000,
DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_RGB_BT2020_ST2084 = 0x00800000,
DXGIX_SWAP_CHAIN_FLAG_AUTOMATIC_GAMEDVR_TONEMAP = 0x02000000
} DXGI_SWAP_CHAIN_FLAG;
| Constant | Description | ||||
|---|---|---|---|---|---|
| DXGI_SWAP_CHAIN_FLAG_NONPREROTATED | Set this flag to turn off automatic image rotation; that is, do not perform a rotation when transferring the contents of the front buffer to the monitor. Use this flag to avoid a bandwidth penalty when an application expects to handle rotation. This option is valid only during full-screen mode. | ||||
| DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH | Set this flag to enable an application to switch modes by calling IDXGISwapChain::ResizeTarget. When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window. | ||||
| DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE | Set this flag to enable an application to render using GDI on a swap chain or a surface. This will allow the application to call IDXGISurface1::GetDC on the 0th back buffer or a surface. | ||||
| DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT | Set this flag to indicate that the swap chain might contain protected content; therefore, the operating system supports the creation of the swap chain only when driver and hardware protection is used. If the driver and hardware do not support content protection, the call to create a resource for the swap chain fails.
Direct3D 11
| ||||
| DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER | Set this flag to indicate that shared resources that are created within the swap chain must be protected by using the driver’s mechanism for restricting access to shared surfaces.
Direct3D 11
| ||||
| DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY | Set this flag to restrict presented content to the local displays. Therefore, the presented content is not accessible via remote accessing or through the desktop duplication APIs. This flag supports the window content protection features of Windows. Applications can use this flag to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and APIs. If you use this flag with windowed (HWND or IWindow) swap chains where another process created the HWND, the owner of the HWND must use the SetWindowDisplayAffinity function appropriately in order to allow calls to Present or Present1 to succeed.
Direct3D 11
| ||||
| DXGIX_SWAP_CHAIN_FLAG_QUANTIZATION_RGB_FULL | Setting this flag adjusts the display color space conversion appropriately for titles which are calibrated for RGB Full (black = 0, white = 255 for 8-bit). Titles should not use this flag when the final front buffer is calibrated for RGB Limited (black = 16, white = 235 for 8-bit). This flag indicates the calibration of the content in the title’s front buffer, not the calibration of the television. See also MATCH_OTHER_CONSOLES and MATCH_XBOX360_AND_PC. | ||||
| DXGIX_SWAP_CHAIN_FLAG_QUANTIZATION_RGB_LIMITED | Setting this flag adjusts the display color space conversion appropriately for titles which are calibrated for RGB Limited (black = 16, white = 235 for 8-bit). This flag indicates the calibration of the content in the title’s front buffer, not the calibration of the television. See also MATCH_OTHER_CONSOLES and MATCH_XBOX360_AND_PC. | ||||
| DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_sRGB_TO_REC709 | Setting this flag will adjust the display gamma ramp to convert from sRGB to REC709 for titles which are calibrated for sRGB. Titles should not use this flag when the final front buffer content is already calibrated for REC709. This flag indicates the calibration of the content in the title’s front buffer, not the calibration of the television. Using this flag also requires setting the flag QUANTIZATION_RGB_FULL. See also MATCH_XBOX360_AND_PC. | ||||
| DXGIX_SWAP_CHAIN_MATCH_OTHER_CONSOLES | Matches consoles other than Xbox 360 or PC. This is a clearer synonym for FLAG_QUANTIZATION_RGB_FULL. | ||||
| DXGIX_SWAP_CHAIN_MATCH_XBOX360_AND_PC | Matches the Xbox 360 and PC platforms. This is a clearer synonym for ( FLAG_QUANTIZATION_RGB_FULL | FLAG_COLORIMETRY_sRGB_TO_REC709 ). | ||||
| DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_RGB_BT2020_ST2084 | Set this flag to output High Dynamic Range (HDR) and Wide Color Gamut (WCG). With this flag set, data in the swapchain must use BT.2020 primaries and be encoded with the inverse ST.2084 EOTF (electro optical transfer function) curve to encode HDR. The swapchain must also have format R10G10B10A2_UNORM and the only Present function that accepts this swapchain flag is DXGIXPresentArray. This flag cannot be used with QUANTIZATION_RGB_LIMITED because DXGIXPresentArray will only accept FULL data, that is, color values in the range 0 to 1023. The swapchain content will be converted by the graphics driver to LIMITED range for transport over HDMI per BT.2020 spec. Refer to High Dynamic Range (HDR) output for the HDR initialization process. | ||||
| DXGIX_SWAP_CHAIN_FLAG_AUTOMATIC_GAMEDVR_TONEMAP | Set this flag to automatically tone map the HDR display plane for GameDVR when a title does not want to perform tone mapping manually. By setting this flag when creating an HDR swap chain, a secondary SDR swap chain is created internally. When the title calls DXGIXPresentArray, a compute shader pass is used to copy and convert the primary HDR swap chain into the secondary SDR swap chain. The HDR swap chain is presented to the display; the SDR swap chain is used for GameDVR recording. The SetHDRToneMapper API can be used to specify the title’s own tone mapper used during auto tone mapping. If not, a default tone mapper will be used.
|
This enumeration is used by the DXGI_SWAP_CHAIN_DESC structure and the IDXGISwapChain::ResizeTarget method.
This enumeration is also used by the DXGI_SWAP_CHAIN_DESC1 structure.
You don’t need to set DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY for swap chains that you create in full-screen mode with the IDXGIFactory::CreateSwapChain method because those swap chains already behave as if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is set. That is, presented content is not accessible by remote access or through the desktop duplication APIs.
Swap chains that you create with the IDXGIFactory2::CreateSwapChainForHwnd, IDXGIFactory2::CreateSwapChainForCoreWindow, and IDXGIFactory2::CreateSwapChainForComposition methods are not protected if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is not set and are protected if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is set. When swap chains are protected, screen scraping is prevented and, in full-screen mode, presented content is not accessible through the desktop duplication APIs.
When you call IDXGISwapChain::ResizeBuffers to change the swap chain’s back buffer, you can reset or change all DXGI_SWAP_CHAIN_FLAG flags.
Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).