DXGI 1.2 improvements
The following functionality has been added in Microsoft DirectX Graphics Infrastructure (DXGI) 1.2.
Presentation enhancements and optimizations
DXGI 1.2 enhances presentation with a new flip-model swap chain, content protection, windowless presentation, and optimized presentation wherein you specify dirty rectangles and scrolled areas. Presentation is also enhanced with stereoscopic 3D display behavior.
You can use the following DXGI 1.2 API for enhanced presentation.
- IDXGIDisplayControl::IsStereoEnabled
- IDXGIDisplayControl::SetStereoEnabled
- IDXGIFactory2::CreateSwapChainForHwnd
- IDXGIFactory2::CreateSwapChainForCoreWindow
- IDXGIFactory2::CreateSwapChainForComposition
- IDXGIFactory2::IsWindowedStereoEnabled
- IDXGIFactory2::RegisterStereoStatusWindow
- IDXGIFactory2::RegisterStereoStatusEvent
- IDXGIFactory2::UnregisterStereoStatus
- IDXGIFactory2::RegisterOcclusionStatusWindow
- IDXGIFactory2::RegisterOcclusionStatusEvent
- IDXGIFactory2::UnregisterOcclusionStatus
- IDXGIOutput1::GetDisplayModeList1
- IDXGIOutput1::GetDisplaySurfaceData1
- IDXGIOutput1::FindClosestMatchingMode1
- IDXGIResource1::CreateSubresourceSurface
- IDXGISurface2::GetResource
- IDXGISwapChain1::GetDesc1
- IDXGISwapChain1::GetFullscreenDesc
- IDXGISwapChain1::GetHwnd
- IDXGISwapChain1::GetCoreWindow
- IDXGISwapChain1::Present1
- IDXGISwapChain1::IsTemporaryMonoSupported
- IDXGISwapChain1::GetRestrictToOutput
- IDXGISwapChain1::SetBackgroundColor
- IDXGISwapChain1::GetBackgroundColor
- IDXGISwapChain1::SetRotation
- IDXGISwapChain1::GetRotation
For more info about how to use the DXGI 1.2 API for enhanced presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.
For info about how to determine whether you can render in stereo, see Rendering in stereo and notifying about stereo status.
For info about how to determine changes in your app's occlusion status, see Waiting on an event when rendering is unnecessary.
For info about how data values change when you present content to the screen, see Converting data for the color space.
Desktop duplication
Windows 8 disables standard Windows 2000 Display Driver Model (XDDM) mirror drivers. DXGI 1.2 provides the desktop duplication API as an alternative. The desktop duplication API provides remote access to the desktop image for collaboration scenarios.
The desktop duplication API consists of the following methods.
- IDXGIOutput1::DuplicateOutput
- IDXGIOutputDuplication::GetDesc
- IDXGIOutputDuplication::AcquireNextFrame
- IDXGIOutputDuplication::GetFrameDirtyRects
- IDXGIOutputDuplication::GetFrameMoveRects
- IDXGIOutputDuplication::GetFramePointerShape
- IDXGIOutputDuplication::MapDesktopSurface
- IDXGIOutputDuplication::UnMapDesktopSurface
- IDXGIOutputDuplication::ReleaseFrame
For more info about how to use the desktop duplication API, see Desktop Duplication API.
Improved usage of shared resources and synchronized events
In previous versions of Windows, apps use continuous polling to determine whether the graphics processing unit (GPU) is finished processing arbitrary commands. DXGI 1.2 enables an app to queue an event to a DXGI device. The app can then wait for the DXGI device to signal the event to determine that the GPU finished executing all rendering commands. DXGI 1.2 enables multiple devices to share a resource through a NT handle.
You can use the following DXGI 1.2 API and Direct3D 11.1 API to share resources and synchronize events.
- IDXGIDevice2::EnqueueSetEvent
- IDXGIResource1::CreateSharedHandle
- IDXGIFactory2::GetSharedResourceAdapterLuid
- ID3D11Device1::OpenSharedResource1
- ID3D11Device1::OpenSharedResourceByName
- D3D11_RESOURCE_MISC_SHARED_NTHANDLE
Offer the video memory of resources
DXGI 1.2 enables an app to offer the video memory of its resources with low overhead. By offering the video memory, the operating system can free the video memory.
This DXGI 1.2 feature consists of the following methods.
You can use the ID3D11Debug::SetFeatureMask method to set feature-mask flags that debug the behavior of the IDXGIDevice2::OfferResources and IDXGIDevice2::ReclaimResources methods in your app.
GPU preemption at finer granularity levels for WDDM 1.2 driver model
Starting with the Windows Display Driver Model (WDDM) 1.2 driver model, the WDDM scheduler can preempt the GPU's execution of application tasks at finer granularity levels. DXGI 1.2 lets you determine the GPU preemption granularity levels.
This DXGI 1.2 feature consists of the following method.
Debugging APIs
The Windows 8 SDK provides additional debugging capability. You can use the following DXGI APIs from Dxgidebug.dll to debug your app:
To access DXGIGetDebugInterface, call the GetModuleHandle function to get Dxgidebug.dll and the GetProcAddress function to get the address of DXGIGetDebugInterface. You can then call DXGIGetDebugInterface to obtain the IDXGIDebug or IDXGIInfoQueue interface.
For info about how to debug DirectX apps remotely, see Debugging DirectX apps remotely.