SharpDX.DXGI

The interface represents a display subsystem (including one or more GPUs, DACs and video memory).

A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard.

To enumerate the display subsystems, use .

To get an interface to the adapter for a particular device, use .

To create a software adapter, use .

Windows?Phone?8: This API is supported.

bb174523 IDXGIAdapter IDXGIAdapter
Gets all outputs from this adapter. bb174525 HRESULT IDXGIAdapter::EnumOutputs([In] unsigned int Output,[Out] IDXGIOutput** ppOutput) IDXGIAdapter::EnumOutputs Checks to see if a device interface for a graphics component is supported by the system. The GUID of the interface of the device version for which support is being checked. For example, typeof(ID3D10Device).GUID. true if the interface is supported; otherwise, false. Bb174524 HRESULT IDXGIAdapter::CheckInterfaceSupport([In] const GUID& InterfaceName,[Out] LARGE_INTEGER* pUMDVersion) IDXGIAdapter::CheckInterfaceSupport Checks to see if a device interface for a graphics component is supported by the system. the interface of the device version for which support is being checked. true if the interface is supported; otherwise, false. Bb174524 HRESULT IDXGIAdapter::CheckInterfaceSupport([In] const GUID& InterfaceName,[Out] LARGE_INTEGER* pUMDVersion) IDXGIAdapter::CheckInterfaceSupport Checks to see if a device interface for a graphics component is supported by the system. the interface of the device version for which support is being checked. The user mode driver version of InterfaceName. This is only returned if the interface is supported. true if the interface is supported; otherwise, false. Bb174524 HRESULT IDXGIAdapter::CheckInterfaceSupport([In] const GUID& InterfaceName,[Out] LARGE_INTEGER* pUMDVersion) IDXGIAdapter::CheckInterfaceSupport Checks to see if a device interface for a graphics component is supported by the system. The GUID of the interface of the device version for which support is being checked. For example, typeof(ID3D10Device).GUID. The user mode driver version of InterfaceName. This is only returned if the interface is supported. true if the interface is supported; otherwise, false. Bb174524 HRESULT IDXGIAdapter::CheckInterfaceSupport([In] const GUID& InterfaceName,[Out] LARGE_INTEGER* pUMDVersion) IDXGIAdapter::CheckInterfaceSupport Gets an adapter (video card) outputs. The index of the output. An instance of HRESULT IDXGIAdapter::EnumOutputs([In] unsigned int Output,[Out] IDXGIOutput** ppOutput) When the EnumOutputs method succeeds and fills the ppOutput parameter with the address of the reference to the output interface, EnumOutputs increments the output interface's reference count. To avoid a memory leak, when you finish using the output interface, call the Release method to decrement the reference count.EnumOutputs first returns the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumOutputs then returns other outputs. if the index is greater than the number of outputs, result code bb174525 HRESULT IDXGIAdapter::EnumOutputs([In] unsigned int Output,[Out] IDXGIOutput** ppOutput) IDXGIAdapter::EnumOutputs Return the number of available outputs from this adapter. The number of outputs bb174525 HRESULT IDXGIAdapter::EnumOutputs([In] unsigned int Output,[Out] IDXGIOutput** ppOutput) IDXGIAdapter::EnumOutputs Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets a DXGI 1.0 description of an adapter (or video card).

Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.

  • Graphics driver model determination ? Because DXGI is only available on systems with WDDM drivers, the app must first confirm the driver model by using the following API.
     HasWDDMDriver()	
                { LPDIRECT3DCREATE9EX pD3D9Create9Ex = null; HMODULE             hD3D9          = null; hD3D9 = LoadLibrary( L"d3d9.dll" ); if ( null == hD3D9 ) { return false; } // /*  Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex != null;	
                } 
  • Retrieval of graphics memory values.? After the app determines the driver model to be WDDM, the app can use the Direct3D 10 or later API and DXGI to get the amount of graphics memory. After you create a Direct3D device, use this code to obtain a structure that contains the amount of available graphics memory.
      * pDXGIDevice;	
                hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
                 * pDXGIAdapter;	
                pDXGIDevice->GetAdapter(&pDXGIAdapter);	
                 adapterDesc;	
                pDXGIAdapter->GetDesc(&adapterDesc); 
bb174526 GetDesc GetDesc HRESULT IDXGIAdapter::GetDesc([Out] DXGI_ADAPTER_DESC* pDesc)

Enumerate adapter (video card) outputs.

The index of the output.

The address of a reference to an interface at the position specified by the Output parameter.

A code that indicates success or failure (see DXGI_ERROR). is returned if the index is greater than the number of outputs.

If the adapter came from a device created using , then the adapter has no outputs, so is returned.

Note??If you call this API in a Session 0 process, it returns .?

When the EnumOutputs method succeeds and fills the ppOutput parameter with the address of the reference to the output interface, EnumOutputs increments the output interface's reference count. To avoid a memory leak, when you finish using the output interface, call the Release method to decrement the reference count.

EnumOutputs first returns the output on which the desktop primary is displayed. This output corresponds with an index of zero. EnumOutputs then returns other outputs.

bb174525 HRESULT IDXGIAdapter::EnumOutputs([In] unsigned int Output,[Out] IDXGIOutput** ppOutput) IDXGIAdapter::EnumOutputs

Gets a DXGI 1.0 description of an adapter (or video card).

A reference to a structure that describes the adapter. This parameter must not be null. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID in the VendorId, DeviceId, SubSysId, and Revision members of and ?Software Adapter? for the description string in the Description member.

Returns if successful; otherwise returns E_INVALIDARG if the pDesc parameter is null.

Graphics apps can use the DXGI API to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model (WDDM) drivers. The following are the critical steps involved.

  • Graphics driver model determination ? Because DXGI is only available on systems with WDDM drivers, the app must first confirm the driver model by using the following API.
     HasWDDMDriver()	
                { LPDIRECT3DCREATE9EX pD3D9Create9Ex = null; HMODULE             hD3D9          = null; hD3D9 = LoadLibrary( L"d3d9.dll" ); if ( null == hD3D9 ) { return false; } // /*  Try to create IDirect3D9Ex interface (also known as a DX9L interface). This interface can only be created if the driver is a WDDM driver. */ // pD3D9Create9Ex = (LPDIRECT3DCREATE9EX) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex != null;	
                } 
  • Retrieval of graphics memory values.? After the app determines the driver model to be WDDM, the app can use the Direct3D 10 or later API and DXGI to get the amount of graphics memory. After you create a Direct3D device, use this code to obtain a structure that contains the amount of available graphics memory.
      * pDXGIDevice;	
                hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
                 * pDXGIAdapter;	
                pDXGIDevice->GetAdapter(&pDXGIAdapter);	
                 adapterDesc;	
                pDXGIAdapter->GetDesc(&adapterDesc); 
bb174526 HRESULT IDXGIAdapter::GetDesc([Out] DXGI_ADAPTER_DESC* pDesc) IDXGIAdapter::GetDesc

Checks whether the system supports a device interface for a graphics component.

The of the interface of the device version for which support is being checked. For example, __uuidof(ID3D10Device).

The user mode driver version of InterfaceName. This is returned only if the interface is supported, otherwise this parameter will be null.

indicates that the interface is supported, otherwise is returned (For more information, see DXGI_ERROR).

Note??You can use CheckInterfaceSupport only to check whether a Direct3D 10.x interface is supported, and only on Windows Vista SP1 and later versions of the operating system. If you try to use CheckInterfaceSupport to check whether a Direct3D 11.x and later version interface is supported, CheckInterfaceSupport returns . Therefore, do not use CheckInterfaceSupport. Instead, to verify whether the operating system supports a particular interface, try to create the interface. For example, if you call the method and it fails, the operating system does not support the interface.? bb174524 HRESULT IDXGIAdapter::CheckInterfaceSupport([In] const GUID& InterfaceName,[Out] LARGE_INTEGER* pUMDVersion) IDXGIAdapter::CheckInterfaceSupport
The assembly provides managed DXGI API. hh404534 DXGI DXGI

An interface implements a derived class for DXGI objects that produce image data.

The interface is designed for use by DXGI objects that need access to other DXGI objects. This interface is useful to applications that do not use Direct3D to communicate with DXGI.

The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the interface. You can query this Direct3D device object for the device's corresponding interface. To retrieve the interface of a Direct3D device, use the following code:

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
            

Windows?Phone?8: This API is supported.

bb174527 IDXGIDevice IDXGIDevice
Gets the residency status of an array of resources. The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called. Note that the residency status will constantly change. If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the DXGI_RESIDENCY_EVICTED_TO_DISK flag. Note??This method should not be called every frame as it incurs a non-trivial amount of overhead. An array of interfaces. Returns an array of flags. Each element describes the residency status for corresponding element in the ppResources argument array. HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[None] int NumResources) Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Returns the adapter for the specified device.

If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.

bb174531 GetAdapter GetAdapter HRESULT IDXGIDevice::GetAdapter([Out] IDXGIAdapter** pAdapter)

Gets or sets the GPU thread priority.

bb174532 GetGPUThreadPriority / SetGPUThreadPriority GetGPUThreadPriority HRESULT IDXGIDevice::GetGPUThreadPriority([Out] int* pPriority)

Returns the adapter for the specified device.

The address of an interface reference to the adapter. This parameter must not be null.

Returns if successful; otherwise, returns one of the DXGI_ERROR that indicates failure. If the pAdapter parameter is null this method returns E_INVALIDARG.

If the GetAdapter method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.

bb174531 HRESULT IDXGIDevice::GetAdapter([Out] IDXGIAdapter** pAdapter) IDXGIDevice::GetAdapter

Returns a surface. This method is used internally and you should not call it directly in your application.

A reference to a structure that describes the surface.

The number of surfaces to create.

A DXGI_USAGE flag that specifies how the surface is expected to be used.

An optional reference to a structure that contains shared resource information for opening views of such resources.

The address of an interface reference to the first created surface.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

The CreateSurface method creates a buffer to exchange data between one or more devices. It is used internally, and you should not directly call it.

The runtime automatically creates an interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an interface when it calls or ID3D10Device::CreateTexture2D to create a 2D texture. To retrieve the interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface or ID3D10Texture2D::QueryInterface. In this call, you must pass the identifier of . If the 2D texture has only a single MIP-map level and does not consist of an array of textures, QueryInterface succeeds and returns a reference to the interface reference. Otherwise, QueryInterface fails and does not return the reference to .

bb174530 HRESULT IDXGIDevice::CreateSurface([In] const DXGI_SURFACE_DESC* pDesc,[In] unsigned int NumSurfaces,[In] unsigned int Usage,[In, Optional] const DXGI_SHARED_RESOURCE* pSharedResource,[Out] IDXGISurface** ppSurface) IDXGIDevice::CreateSurface

Gets the residency status of an array of resources.

An array of interfaces.

An array of flags. Each element describes the residency status for corresponding element in the ppResources argument array.

The number of resources in the ppResources argument array and pResidencyStatus argument array.

Returns if successful; otherwise, returns , E_INVALIDARG, or E_POINTER (see Common Values and WinError.h for more information).

The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.

Note??The residency status will constantly change.?

If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the flag.

Note??This method should not be called every frame as it incurs a non-trivial amount of overhead.?
bb174533 HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[In] unsigned int NumResources) IDXGIDevice::QueryResourceResidency

Gets the residency status of an array of resources.

An array of interfaces.

An array of flags. Each element describes the residency status for corresponding element in the ppResources argument array.

The number of resources in the ppResources argument array and pResidencyStatus argument array.

Returns if successful; otherwise, returns , E_INVALIDARG, or E_POINTER (see Common Values and WinError.h for more information).

The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.

Note??The residency status will constantly change.?

If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the flag.

Note??This method should not be called every frame as it incurs a non-trivial amount of overhead.?
bb174533 HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[In] unsigned int NumResources) IDXGIDevice::QueryResourceResidency

Gets the residency status of an array of resources.

An array of interfaces.

An array of flags. Each element describes the residency status for corresponding element in the ppResources argument array.

The number of resources in the ppResources argument array and pResidencyStatus argument array.

Returns if successful; otherwise, returns , E_INVALIDARG, or E_POINTER (see Common Values and WinError.h for more information).

The information returned by the pResidencyStatus argument array describes the residency status at the time that the QueryResourceResidency method was called.

Note??The residency status will constantly change.?

If you call the QueryResourceResidency method during a device removed state, the pResidencyStatus argument will return the flag.

Note??This method should not be called every frame as it incurs a non-trivial amount of overhead.?
bb174533 HRESULT IDXGIDevice::QueryResourceResidency([In, Buffer] const IUnknown** ppResources,[Out, Buffer] DXGI_RESIDENCY* pResidencyStatus,[In] unsigned int NumResources) IDXGIDevice::QueryResourceResidency

Sets the GPU thread priority.

A value that specifies the required GPU thread priority. This value must be between -7 and 7, inclusive, where 0 represents normal priority.

Return if successful; otherwise, returns E_INVALIDARG if the Priority parameter is invalid.

The values for the Priority parameter function as follows:

  • Positive values increase the likelihood that the GPU scheduler will grant GPU execution cycles to the device when rendering.
  • Negative values lessen the likelihood that the device will receive GPU execution cycles when devices compete for them.
  • The device is guaranteed to receive some GPU execution cycles at all settings.

To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience.

bb174534 HRESULT IDXGIDevice::SetGPUThreadPriority([In] int Priority) IDXGIDevice::SetGPUThreadPriority

Gets the GPU thread priority.

A reference to a variable that receives a value that indicates the current GPU thread priority. The value will be between -7 and 7, inclusive, where 0 represents normal priority.

Return if successful; otherwise, returns E_POINTER if the pPriority parameter is null.

bb174532 HRESULT IDXGIDevice::GetGPUThreadPriority([Out] int* pPriority) IDXGIDevice::GetGPUThreadPriority

Inherited from objects that are tied to the device so that they can retrieve a reference to it.

Windows?Phone?8: This API is supported.

bb174528 IDXGIDeviceSubObject IDXGIDeviceSubObject
Retrieves the device. The interface that is returned can be any interface published by the device. The associated device. HRESULT IDXGIDeviceSubObject::GetDevice([In] GUID* riid,[Out] void** ppDevice) Gets or sets the debug-name for this object. The debug name. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Retrieves the device.

The reference id for the device.

The address of a reference to the device.

A code that indicates success or failure (see DXGI_ERROR).

The type of interface that is returned can be any interface published by the device. For example, it could be an * called pDevice, and therefore the REFIID would be obtained by calling __uuidof(pDevice).

bb174529 HRESULT IDXGIDeviceSubObject::GetDevice([In] const GUID& riid,[Out] void** ppDevice) IDXGIDeviceSubObject::GetDevice

An interface is a base interface for all DXGI objects; supports associating caller-defined (private data) with an object and retrieval of an interface to the parent object.

implements base-class functionality for the following interfaces:

Windows?Phone?8: This API is supported.

bb174541 IDXGIObject IDXGIObject
Gets the parent of the object. Type of the parent object Returns the parent object based on the GUID of the type of the parent object. bb174542 HRESULT IDXGIObject::GetParent([In] const GUID& riid,[Out] void** ppParent) IDXGIObject::GetParent Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets application-defined data to the object and associates that data with a .

A that identifies the data. Use this in a call to GetPrivateData to get the data.

The size of the object's data.

A reference to the object's data.

Returns one of the DXGI_ERROR values.

SetPrivateData makes a copy of the specified data and stores it with the object.

Private data that SetPrivateData stores in the object occupies the same storage space as private data that is stored by associated Direct3D objects (for example, by a Microsoft Direct3D?11 device through or by a Direct3D?11 child device through ).

The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the SetPrivateData method and the well-known private data () that is in D3Dcommon.h. For example, to give pContext a friendly name of My name, use the following code:

 static const char c_szName[] = "My name";	
            hr = pContext->SetPrivateData( , sizeof( c_szName ) - 1, c_szName );	
            

You can use to track down memory leaks and understand performance characteristics of your applications. This information is reflected in the output of the debug layer that is related to memory leaks () and with the event tracing for Windows events that we've added to Windows?8.

bb174544 HRESULT IDXGIObject::SetPrivateData([In] const GUID& Name,[In] unsigned int DataSize,[In, Buffer] const void* pData) IDXGIObject::SetPrivateData

Set an interface in the object's private data.

A identifying the interface.

The interface to set.

Returns one of the following DXGI_ERROR.

This API associates an interface reference with the object.

When the interface is set its reference count is incremented. When the data are overwritten (by calling SPD or SPDI with the same ) or the object is destroyed, ::Release() is called and the interface's reference count is decremented.

bb174545 HRESULT IDXGIObject::SetPrivateDataInterface([In] const GUID& Name,[In, Optional] const IUnknown* pUnknown) IDXGIObject::SetPrivateDataInterface

Get a reference to the object's data.

A identifying the data.

The size of the data.

Pointer to the data.

Returns one of the following DXGI_ERROR.

If the data returned is a reference to an , or one of its derivative classes, previously set by , you must call ::Release() on the reference before the reference is freed to decrement the reference count.

You can pass GUID_DeviceType in the Name parameter of GetPrivateData to retrieve the device type from the display adapter object (, , ).

To get the type of device on which the display adapter was created

  1. Call IUnknown::QueryInterface on the or ID3D10Device object to retrieve the object.
  2. Call GetParent on the object to retrieve the object.
  3. Call GetPrivateData on the object with GUID_DeviceType to retrieve the type of device on which the display adapter was created. pData will point to a value from the driver-type enumeration (for example, a value from ).

On Windows?7 or earlier, this type is either a value from D3D10_DRIVER_TYPE or depending on which kind of device was created. On Windows?8, this type is always a value from . Don't use with GUID_DeviceType because the behavior when doing so is undefined.

bb174543 HRESULT IDXGIObject::GetPrivateData([In] const GUID& Name,[InOut] unsigned int* pDataSize,[Out, Buffer] void* pData) IDXGIObject::GetPrivateData

Gets the parent of the object.

The ID of the requested interface.

The address of a reference to the parent object.

Returns one of the DXGI_ERROR values.

bb174542 HRESULT IDXGIObject::GetParent([In] const GUID& riid,[Out] void** ppParent) IDXGIObject::GetParent

An interface implements methods for generating DXGI objects (which handle full screen transitions).

Create a factory by calling CreateDXGIFactory.

Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the interface from the Direct3D device and then use the method to locate the factory. The following code shows how.

 * pDXGIDevice = nullptr;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);  * pDXGIAdapter = nullptr;	
            hr = pDXGIDevice->GetAdapter( &pDXGIAdapter );  * pIDXGIFactory = nullptr;	
            pDXGIAdapter->GetParent(__uuidof(), (void **)&pIDXGIFactory);

Windows?Phone?8: This API is supported.

bb174535 IDXGIFactory IDXGIFactory
Gets both adapters (video cards) with or without outputs. The index of the adapter to enumerate. a reference to an interface at the position specified by the Adapter parameter When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.When the EnumAdapters method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.EnumAdapters first returns the local adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters then returns other adapters with outputs. HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter) Return an array of available from this factory. HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter) Return the number of available adapters from this factory. The number of adapters HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter) Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Enumerates the adapters (video cards).

The index of the adapter to enumerate.

The address of a reference to an interface at the position specified by the Adapter parameter. This parameter must not be null.

Returns if successful; otherwise, returns if the index is greater than or equal to the number of adapters in the local system, or if ppAdapter parameter is null.

When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.

When the EnumAdapters method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.

EnumAdapters first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters next returns other adapters with outputs. EnumAdapters finally returns adapters without outputs.

bb174538 HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter) IDXGIFactory::EnumAdapters

Allows DXGI to monitor an application's message queue for the alt-enter key sequence (which causes the application to switch from windowed to full screen or vice versa).

The handle of the window that is to be monitored. This parameter can be null; but only if the flags are also 0.

One or more of the following values:

  • - Prevent DXGI from monitoring an applications message queue; this makes DXGI unable to respond to mode changes.
  • - Prevent DXGI from responding to an alt-enter sequence.
  • - Prevent DXGI from responding to a print-screen key.

if WindowHandle is invalid, or E_OUTOFMEMORY.

Note??If you call this API in a Session 0 process, it returns .?

The combination of WindowHandle and Flags informs DXGI to stop monitoring window messages for the previously-associated window.

If the application switches to full-screen mode, DXGI will choose a full-screen resolution to be the smallest supported resolution that is larger or the same size as the current back buffer size.

Applications can make some changes to make the transition from windowed to full screen more efficient. For example, on a WM_SIZE message, the application should release any outstanding swap-chain back buffers, call , then re-acquire the back buffers from the swap chain(s). This gives the swap chain(s) an opportunity to resize the back buffers, and/or recreate them to enable full-screen flipping operation. If the application does not perform this sequence, DXGI will still make the full-screen/windowed transition, but may be forced to use a stretch operation (since the back buffers may not be the correct size), which may be less efficient. Even if a stretch is not required, presentation may not be optimal because the back buffers might not be directly interchangeable with the front buffer. Thus, a call to ResizeBuffers on WM_SIZE is always recommended, since WM_SIZE is always sent during a fullscreen transition.

While windowed, the application can, if it chooses, restrict the size of its window's client area to sizes to which it is comfortable rendering. A fully flexible application would make no such restriction, but UI elements or other design considerations can, of course, make this flexibility untenable. If the application further chooses to restrict its window's client area to just those that match supported full-screen resolutions, the application can field WM_SIZING, then check against . If a matching mode is found, allow the resize. (The can be retrieved from . Absent subsequent changes to desktop topology, this will be the same output that will be chosen when alt-enter is fielded and fullscreen mode is begun for that swap chain.)

Applications that want to handle mode changes or Alt+Enter themselves should call MakeWindowAssociation with the flag after swap chain creation. The WindowHandle argument, if non-null, specifies that the application message queues will not be handled by the DXGI runtime for all swap chains of a particular target . Calling MakeWindowAssociation with the flag after swapchain creation ensures that DXGI will not interfere with application's handling of window mode changes or Alt+Enter.

bb174540 HRESULT IDXGIFactory::MakeWindowAssociation([In] HWND WindowHandle,[In] DXGI_MWA_FLAGS Flags) IDXGIFactory::MakeWindowAssociation

Get the window through which the user controls the transition to and from full screen.

A reference to a window handle.

Note??If you call this API in a Session 0 process, it returns .? bb174539 HRESULT IDXGIFactory::GetWindowAssociation([Out] HWND* pWindowHandle) IDXGIFactory::GetWindowAssociation

[Starting with Direct3D 11.1, we recommend not to use CreateSwapChain anymore to create a swap chain. Instead, use CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, or CreateSwapChainForComposition depending on how you want to create the swap chain.]

Creates a swap chain.

No documentation. No documentation. No documentation.

if pDesc or ppSwapChain is null, if you request full-screen mode and it is unavailable, or E_OUTOFMEMORY. Other error codes defined by the type of device passed in may also be returned.

Note??If you call this API in a Session 0 process, it returns .?

If you attempt to create a swap chain in full-screen mode, and full-screen mode is unavailable, the swap chain will be created in windowed mode and will be returned.

If the buffer width or the buffer height is zero, the sizes will be inferred from the output window size in the swap-chain description.

Because the target output can't be chosen explicitly when the swap chain is created, we recommend not to create a full-screen swap chain. This can reduce presentation performance if the swap chain size and the output window size do not match. Here are two ways to ensure that the sizes match:

  • Create a windowed swap chain and then set it full-screen using .
  • Save a reference to the swap chain immediately after creation, and use it to get the output window size during a WM_SIZE event. Then resize the swap chain buffers (with ) during the transition from windowed to full-screen.

If the swap chain is in full-screen mode, before you release it you must use SetFullscreenState to switch it to windowed mode. For more information about releasing a swap chain, see the "Destroying a Swap Chain" section of DXGI Overview.

After the runtime renders the initial frame in full screen, the runtime might unexpectedly exit full screen during a call to . To work around this issue, we recommend that you execute the following code right after you call CreateSwapChain to create a full-screen swap chain (Windowed member of set to ).

 // Detect if newly created full-screen swap chain isn't actually full screen.	
            * pTarget;  bFullscreen;	
            if (SUCCEEDED(pSwapChain->GetFullscreenState(&bFullscreen, &pTarget)))	
            { pTarget->Release();	
            }	
            else bFullscreen = ;	
            // If not full screen, enable full screen again.	
            if (!bFullscreen)	
            { ShowWindow(hWnd, SW_MINIMIZE); ShowWindow(hWnd, SW_RESTORE); pSwapChain->SetFullscreenState(TRUE, null);	
            }	
            

You can specify and values in the swap-chain description that pDesc points to. These values allow you to use features like flip-model presentation and content protection by using pre-Windows?8 APIs.

However, to use stereo presentation and to change resize behavior for the flip model, applications must use the method. Otherwise, the back-buffer contents implicitly scale to fit the presentation target size; that is, you can't turn off scaling.

bb174537 HRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out, Fast] IDXGISwapChain** ppSwapChain) IDXGIFactory::CreateSwapChain

Create an adapter interface that represents a software adapter.

Handle to the software adapter's dll. HMODULE can be obtained with GetModuleHandle or LoadLibrary.

Address of a reference to an adapter (see ).

A software adapter is a DLL that implements the entirety of a device driver interface, plus emulation, if necessary, of kernel-mode graphics components for Windows. Details on implementing a software adapter can be found in the Windows Vista Driver Development Kit. This is a very complex development task, and is not recommended for general readers.

Calling this method will increment the module's reference count by one. The reference count can be decremented by calling FreeLibrary.

The typical calling scenario is to call LoadLibrary, pass the handle to CreateSoftwareAdapter, then immediately call FreeLibrary on the DLL and forget the DLL's HMODULE. Since the software adapter calls FreeLibrary when it is destroyed, the lifetime of the DLL will now be owned by the adapter, and the application is free of any further consideration of its lifetime.

bb174536 HRESULT IDXGIFactory::CreateSoftwareAdapter([In] HINSTANCE Module,[Out] IDXGIAdapter** ppAdapter) IDXGIFactory::CreateSoftwareAdapter

The interface implements methods for generating DXGI objects.

This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

To create a factory, call the CreateDXGIFactory1 function.

Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the or interface from the Direct3D device and then use the method to locate the factory. The following code shows how.

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);  * pDXGIAdapter;	
            hr = pDXGIDevice->GetParent(__uuidof(), (void **)&pDXGIAdapter);  * pIDXGIFactory;	
            pDXGIAdapter->GetParent(__uuidof(), (void **)&pIDXGIFactory);	
            
ff471335 IDXGIFactory1 IDXGIFactory1
Default Constructor for Factory1. Gets both adapters (video cards) with or without outputs. The index of the adapter to enumerate. a reference to an interface at the position specified by the Adapter parameter This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.When the EnumAdapters1 method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters1 increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.EnumAdapters1 first returns the local adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters1 next returns other adapters with outputs. EnumAdapters1 finally returns adapters without outputs. HRESULT IDXGIFactory1::EnumAdapters1([In] unsigned int Adapter,[Out] IDXGIAdapter1** ppAdapter) Return an array of available from this factory. HRESULT IDXGIFactory1::EnumAdapters1([In] unsigned int Adapter,[Out] IDXGIAdapter1** ppAdapter) Return the number of available adapters from this factory. The number of adapters HRESULT IDXGIFactory1::EnumAdapters1([In] unsigned int Adapter,[Out] IDXGIAdapter1** ppAdapter) Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Informs an application of the possible need to re-enumerate adapters.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

ff471337 IsCurrent IsCurrent BOOL IDXGIFactory1::IsCurrent()

Enumerates both adapters (video cards) with or without outputs.

The index of the adapter to enumerate.

The address of a reference to an interface at the position specified by the Adapter parameter. This parameter must not be null.

Returns if successful; otherwise, returns if the index is greater than or equal to the number of adapters in the local system, or if ppAdapter parameter is null.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.

When the EnumAdapters1 method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters1 increments the adapter interface's reference count. When you finish using the adapter interface, call the Release method to decrement the reference count before you destroy the reference.

EnumAdapters1 first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters1 next returns other adapters with outputs. EnumAdapters1 finally returns adapters without outputs.

ff471336 HRESULT IDXGIFactory1::EnumAdapters1([In] unsigned int Adapter,[Out] IDXGIAdapter1** ppAdapter) IDXGIFactory1::EnumAdapters1

Informs an application of the possible need to re-enumerate adapters.

, if a new adapter is becoming available or the current adapter is going away. TRUE, no adapter changes.

IsCurrent returns to inform the calling application to re-enumerate adapters.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

ff471337 BOOL IDXGIFactory1::IsCurrent() IDXGIFactory1::IsCurrent

The interface includes methods to create a newer version swap chain with more features than and to monitor stereoscopic 3D capabilities.

To create a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 factory interface, pass into either the CreateDXGIFactory or CreateDXGIFactory1 function or call QueryInterface from a factory object that either CreateDXGIFactory or CreateDXGIFactory1 returns.

Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the , , or interface from the Direct3D device and then use the method to locate the factory. The following code shows how.

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);  * pDXGIAdapter;	
            hr = pDXGIDevice->GetParent(__uuidof(), (void **)&pDXGIAdapter);  * pIDXGIFactory;	
            pDXGIAdapter->GetParent(__uuidof(), (void **)&pIDXGIFactory);	
            
hh404556 IDXGIFactory2 IDXGIFactory2
Initializes a new instance of class. True - to set the DXGI_CREATE_FACTORY_DEBUG flag. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Determines whether to use stereo mode.

We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:

  • All adapters in the computer have drivers that are capable of stereo. This only means that the driver is implemented to the Windows Display Driver Model (WDDM) for Windows?8 (WDDM 1.2). However, the adapter does not necessarily have to be able to scan out stereo.
  • The current desktop mode (desktop modes are mono) and system policy and hardware are configured so that the Desktop Window Manager (DWM) performs stereo composition on at least one adapter output.

The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.

The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.

hh404561 IsWindowedStereoEnabled IsWindowedStereoEnabled BOOL IDXGIFactory2::IsWindowedStereoEnabled()

Determines whether to use stereo mode.

Indicates whether to use stereo mode. TRUE indicates that you can use stereo mode; otherwise, .

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsWindowedStereoEnabled always returns because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

We recommend that windowed applications call IsWindowedStereoEnabled before they attempt to use stereo. IsWindowedStereoEnabled returns TRUE if both of the following items are true:

  • All adapters in the computer have drivers that are capable of stereo. This only means that the driver is implemented to the Windows Display Driver Model (WDDM) for Windows?8 (WDDM 1.2). However, the adapter does not necessarily have to be able to scan out stereo.
  • The current desktop mode (desktop modes are mono) and system policy and hardware are configured so that the Desktop Window Manager (DWM) performs stereo composition on at least one adapter output.

The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.

The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.

hh404561 BOOL IDXGIFactory2::IsWindowedStereoEnabled() IDXGIFactory2::IsWindowedStereoEnabled

Creates a swap chain that is associated with an handle to the output window for the swap chain.

No documentation. No documentation. No documentation. No documentation. No documentation. No documentation.

CreateSwapChainForHwnd returns:

  • if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if the calling application provided invalid data, for example, if pDesc or ppSwapChain is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.

Platform Update for Windows?7:?? is not supported on Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed and causes CreateSwapChainForHwnd to return when called. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

Note??Do not use this method in Windows Store apps. Instead, use .?

If you specify the width, height, or both (Width and Height members of that pDesc points to) of the swap chain as zero, the runtime obtains the size from the output window that the hWnd parameter specifies. You can subsequently call the method to retrieve the assigned width or height value.

Because you can associate only one flip presentation model swap chain at a time with an , the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see Deferred Destruction Issues with Flip Presentation Swap Chains.

For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.

hh404557 HRESULT IDXGIFactory2::CreateSwapChainForHwnd([In] IUnknown* pDevice,[In] HWND hWnd,[In] const DXGI_SWAP_CHAIN_DESC1* pDesc,[In, Optional] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc,[In, Optional] IDXGIOutput* pRestrictToOutput,[Out, Fast] IDXGISwapChain1** ppSwapChain) IDXGIFactory2::CreateSwapChainForHwnd

Creates a swap chain that is associated with the CoreWindow object for the output window for the swap chain.

No documentation. No documentation. No documentation. No documentation. No documentation.

CreateSwapChainForCoreWindow returns:

  • if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if the calling application provided invalid data, for example, if pDesc or ppSwapChain is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

Note??Use this method in Windows Store apps rather than .?

If you specify the width, height, or both (Width and Height members of that pDesc points to) of the swap chain as zero, the runtime obtains the size from the output window that the pWindow parameter specifies. You can subsequently call the method to retrieve the assigned width or height value.

Because you can associate only one flip presentation model swap chain (per layer) at a time with a CoreWindow, the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see Deferred Destruction Issues with Flip Presentation Swap Chains.

For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.

hh404559 HRESULT IDXGIFactory2::CreateSwapChainForCoreWindow([In] IUnknown* pDevice,[In] IUnknown* pWindow,[In] const DXGI_SWAP_CHAIN_DESC1* pDesc,[In, Optional] IDXGIOutput* pRestrictToOutput,[Out, Fast] IDXGISwapChain1** ppSwapChain) IDXGIFactory2::CreateSwapChainForCoreWindow

Identifies the adapter on which a shared resource object was created.

A handle to a shared resource object. The method returns this handle.

A reference to a variable that receives a locally unique identifier () value that identifies the adapter. is defined in Dxgi.h. An is a 64-bit value that is guaranteed to be unique only on the operating system on which it was generated. The uniqueness of an is guaranteed only until the operating system is restarted.

GetSharedResourceAdapterLuid returns:

  • if it identified the adapter.
  • if hResource is invalid.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetSharedResourceAdapterLuid fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created. Call GetSharedResourceAdapterLuid before you open a shared resource to ensure that the resource was created on the appropriate adapter. To open a shared resource, call the or method.

hh404560 HRESULT IDXGIFactory2::GetSharedResourceAdapterLuid([In] void* hResource,[Out] LUID* pLuid) IDXGIFactory2::GetSharedResourceAdapterLuid

Registers an application window to receive notification messages of changes of stereo status.

The handle of the window to send a notification message to when stereo status change occurs.

Identifies the notification message to send.

A reference to a key value that an application can pass to the method to unregister the notification message that wMsg specifies.

RegisterStereoStatusWindow returns:

  • if it successfully registered the window.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404587 HRESULT IDXGIFactory2::RegisterStereoStatusWindow([In] HWND WindowHandle,[In] unsigned int wMsg,[Out] unsigned int* pdwCookie) IDXGIFactory2::RegisterStereoStatusWindow

Registers to receive notification of changes in stereo status by using event signaling.

A handle to the event object that the operating system sets when notification of stereo status change occurs. The CreateEvent or OpenEvent function returns this handle.

A reference to a key value that an application can pass to the method to unregister the notification event that hEvent specifies.

RegisterStereoStatusEvent returns:

  • if it successfully registered the event.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterStereoStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404584 HRESULT IDXGIFactory2::RegisterStereoStatusEvent([In] void* hEvent,[Out] unsigned int* pdwCookie) IDXGIFactory2::RegisterStereoStatusEvent

Unregisters a window or an event to stop it from receiving notification when stereo status changes.

A key value for the window or event to unregister. The or method returns this value.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterStereoStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404593 void IDXGIFactory2::UnregisterStereoStatus([In] unsigned int dwCookie) IDXGIFactory2::UnregisterStereoStatus

Registers an application window to receive notification messages of changes of occlusion status.

The handle of the window to send a notification message to when occlusion status change occurs.

Identifies the notification message to send.

A reference to a key value that an application can pass to the method to unregister the notification message that wMsg specifies.

RegisterOcclusionStatusWindow returns:

  • if it successfully registered the window.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if WindowHandle is not a valid window handle or not the window handle that the current process owns.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

Apps choose the Windows message that Windows sends when occlusion status changes.

hh404581 HRESULT IDXGIFactory2::RegisterOcclusionStatusWindow([In] HWND WindowHandle,[In] unsigned int wMsg,[Out] unsigned int* pdwCookie) IDXGIFactory2::RegisterOcclusionStatusWindow

Registers to receive notification of changes in occlusion status by using event signaling.

A handle to the event object that the operating system sets when notification of occlusion status change occurs. The CreateEvent or OpenEvent function returns this handle.

A reference to a key value that an application can pass to the method to unregister the notification event that hEvent specifies.

RegisterOcclusionStatusEvent returns:

  • if the method successfully registered the event.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if hEvent is not a valid handle or not an event handle.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, RegisterOcclusionStatusEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

If you call RegisterOcclusionStatusEvent multiple times with the same event handle, RegisterOcclusionStatusEvent fails with .

If you call RegisterOcclusionStatusEvent multiple times with the different event handles, RegisterOcclusionStatusEvent properly registers the events.

hh404578 HRESULT IDXGIFactory2::RegisterOcclusionStatusEvent([In] void* hEvent,[Out] unsigned int* pdwCookie) IDXGIFactory2::RegisterOcclusionStatusEvent

Unregisters a window or an event to stop it from receiving notification when occlusion status changes.

A key value for the window or event to unregister. The or method returns this value.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, UnregisterOcclusionStatus has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404590 void IDXGIFactory2::UnregisterOcclusionStatus([In] unsigned int dwCookie) IDXGIFactory2::UnregisterOcclusionStatus

Creates a swap chain that you can use to send Direct3D content into the DirectComposition API or the Windows.UI.Xaml framework to compose in a window.

No documentation. No documentation. No documentation. No documentation.

CreateSwapChainForComposition returns:

  • if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if the calling application provided invalid data, for example, if pDesc or ppSwapChain is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, CreateSwapChainForComposition fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

You can use composition swap chains with either DirectComposition?s interface or XAML?s SwapChainBackgroundPanel class. For DirectComposition, you can call the method to set the swap chain as the content of a visual object, which then allows you to bind the swap chain to the visual tree. For XAML, the SwapChainBackgroundPanel class exposes a classic COM interface . You can use the method to bind to the XAML UI graph. For info about how to use composition swap chains with XAML?s SwapChainBackgroundPanel class, see DirectX and XAML interop.

The , , , , and IDXGISwapChain::GetCoreWindow methods aren't valid on this type of swap chain. If you call any of these methods on this type of swap chain, they fail.

For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.

hh404558 HRESULT IDXGIFactory2::CreateSwapChainForComposition([In] IUnknown* pDevice,[In] const DXGI_SWAP_CHAIN_DESC1* pDesc,[In, Optional] IDXGIOutput* pRestrictToOutput,[Out, Fast] IDXGISwapChain1** ppSwapChain) IDXGIFactory2::CreateSwapChainForComposition

Enables creating Microsoft DirectX Graphics Infrastructure (DXGI) objects.

mt427785 IDXGIFactory4 IDXGIFactory4
Initializes a new instance of class. Gets the default warp adapter. The warp adapter. Gets the adapter for the specified LUID. A unique value that identifies the adapter. The adapter. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Outputs the for the specified .

No documentation. No documentation. No documentation.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR. See also Direct3D 12 Return Codes.

For Direct3D 12, it's no longer possible to backtrack from a device to the that was used to create it. enables an app to retrieve information about the adapter where a D3D12 device was created. is designed to be paired with . For more information, see DXGI 1.4 Improvements.

mt427786 HRESULT IDXGIFactory4::EnumAdapterByLuid([In] LUID AdapterLuid,[In] const GUID& riid,[Out] void** ppvAdapter) IDXGIFactory4::EnumAdapterByLuid

Provides an adapter which can be provided to to use the WARP renderer.

The globally unique identifier () of the object referenced by the ppvAdapter parameter.

The address of an interface reference to the adapter. This parameter must not be null.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR. See also Direct3D 12 Return Codes.

For more information, see DXGI 1.4 Improvements.

mt427787 HRESULT IDXGIFactory4::EnumWarpAdapter([In] const GUID& riid,[Out] void** ppvAdapter) IDXGIFactory4::EnumWarpAdapter
Helper to use with . Calculates the size of a in bytes. Can be 0 for compressed format (as they are less than 1 byte) The DXGI format. size of in bytes Calculates the size of a in bits. The DXGI format. size of in bits Returns true if the is valid. A format to validate True if the is valid. Returns true if the is a compressed format. The format to check for compressed. True if the is a compressed format Determines whether the specified is packed. The DXGI Format. true if the specified is packed; otherwise, false. Determines whether the specified is video. The . true if the specified is video; otherwise, false. Determines whether the specified is a SRGB format. The . true if the specified is a SRGB format; otherwise, false. Determines whether the specified is typeless. The . true if the specified is typeless; otherwise, false. Computes the scanline count (number of scanlines). The . The height. The scanline count. Static initializer to speed up size calculation (not sure the JIT is enough "smart" for this kind of thing).

Identifies the type of DXGI adapter.

The enumerated type is used by the Flags member of the or structure to identify the type of DXGI adapter.

ff471327 DXGI_ADAPTER_FLAG DXGI_ADAPTER_FLAG

Specifies no flags.

ff471327 DXGI_ADAPTER_FLAG_NONE DXGI_ADAPTER_FLAG_NONE

Value always set to 0. This flag is reserved.

ff471327 DXGI_ADAPTER_FLAG_REMOTE DXGI_ADAPTER_FLAG_REMOTE

Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.

Direct3D 11:??This enumeration value is supported starting with Windows?8.

ff471327 DXGI_ADAPTER_FLAG_SOFTWARE DXGI_ADAPTER_FLAG_SOFTWARE

Identifies the type of DXGI adapter.

The enumerated type is used by the Flags member of the or structure to identify the type of DXGI adapter.

ff471327 DXGI_ADAPTER_FLAG3 DXGI_ADAPTER_FLAG3

Specifies no flags.

ff471327 DXGI_ADAPTER_FLAG3_NONE DXGI_ADAPTER_FLAG3_NONE

Value always set to 0. This flag is reserved.

ff471327 DXGI_ADAPTER_FLAG3_REMOTE DXGI_ADAPTER_FLAG3_REMOTE

Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.

Direct3D 11:??This enumeration value is supported starting with Windows?8.

ff471327 DXGI_ADAPTER_FLAG3_SOFTWARE DXGI_ADAPTER_FLAG3_SOFTWARE

Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

ff471327 DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE

Identifies the alpha value, transparency behavior, of a surface.

For more information about alpha mode, see .

hh404496 DXGI_ALPHA_MODE DXGI_ALPHA_MODE

Indicates that the transparency behavior is not specified.

hh404496 DXGI_ALPHA_MODE_UNSPECIFIED DXGI_ALPHA_MODE_UNSPECIFIED

Indicates that the transparency behavior is premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.

hh404496 DXGI_ALPHA_MODE_PREMULTIPLIED DXGI_ALPHA_MODE_PREMULTIPLIED

Indicates that the transparency behavior is not premultiplied. The alpha channel indicates the transparency of the color.

hh404496 DXGI_ALPHA_MODE_STRAIGHT DXGI_ALPHA_MODE_STRAIGHT

Indicates to ignore the transparency behavior.

hh404496 DXGI_ALPHA_MODE_IGNORE DXGI_ALPHA_MODE_IGNORE

Specifies color space types.

This enum is used within DXGI in the CheckColorSpaceSupport, SetColorSpace1 and CheckOverlayColorSpaceSupport methods. It is also referenced in D3D11 video methods such as , and D2D methods such as .

The following color parameters are defined:

dn903661 DXGI_COLOR_SPACE_TYPE DXGI_COLOR_SPACE_TYPE
PropertyValue
ColorspaceRGB
Range0-255
Gamma2.2
SitingImage
PrimariesBT.709

?

This is the standard definition for sRGB. Note that this is often implemented with a linear segment, but in that case the exponent is corrected to stay aligned with a gamma 2.2 curve. This is usually used with 8 bit and 10 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
PropertyValue
ColorspaceRGB
Range0-255
Gamma1.0
SitingImage
PrimariesBT.709

?

This is the standard definition for scRGB, and is usually used with 16 bit integer, 16 bit floating point, and 32 bit floating point channels.

dn903661 DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
PropertyValue
ColorspaceRGB
Range16-235
Gamma2.2
SitingImage
PrimariesBT.709

?

This is the standard definition for ITU-R Recommendation BT.709. Note that due to the inclusion of a linear segment, the transfer curve looks similar to a pure exponential gamma of 1.9. This is usually used with 8 bit and 10 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709
PropertyValue
ColorspaceRGB
Range16-235
Gamma2.2
SitingImage
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020

Reserved.

dn903661 DXGI_COLOR_SPACE_RESERVED DXGI_COLOR_SPACE_RESERVED
PropertyValue
ColorspaceYCbCr
Range0-255
Gamma2.2
SitingImage
PrimariesBT.709
TransferBT.601

?

This definition is commonly used for JPG, and is usually used with 8, 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2.2
SitingVideo
PrimariesBT.601

?

This definition is commonly used for MPEG2, and is usually used with 8, 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
PropertyValue
ColorspaceYCbCr
Range0-255
Gamma2.2
SitingVideo
PrimariesBT.601

?

This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2.2
SitingVideo
PrimariesBT.709

?

This definition is commonly used for H.264 and HEVC, and is usually used with 8, 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
PropertyValue
ColorspaceYCbCr
Range0-255
Gamma2.2
SitingVideo
PrimariesBT.709

?

This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2.2
SitingVideo
PrimariesBT.2020

?

This definition may be used by HEVC, and is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
PropertyValue
ColorspaceYCbCr
Range0-255
Gamma2.2
SitingVideo
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
PropertyValue
ColorspaceRGB
Range0-255
Gamma2084
SitingImage
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2084
SitingVideo
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020
PropertyValue
ColorspaceRGB
Range16-235
Gamma2084
SitingImage
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2.2
SitingVideo
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020
PropertyValue
ColorspaceYCbCr
Range16-235
Gamma2084
SitingVideo
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020
PropertyValue
ColorspaceRGB
Range0-255
Gamma2.2
SitingImage
PrimariesBT.2020

?

This is usually used with 10, 12, or 16 bit color channels.

dn903661 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020

A custom color definition is used.

dn903661 DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020 DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020
No documentation. dn903661 DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020

A custom color definition is used.

dn903661 DXGI_COLOR_SPACE_CUSTOM DXGI_COLOR_SPACE_CUSTOM

Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current compute task.

You call the method to retrieve the granularity level at which the GPU can be preempted from performing its current compute task. The operating system specifies the compute granularity level in the ComputePreemptionGranularity member of the structure.

hh404499 DXGI_COMPUTE_PREEMPTION_GRANULARITY DXGI_COMPUTE_PREEMPTION_GRANULARITY

Indicates the preemption granularity as a compute packet.

hh404499 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY

Indicates the preemption granularity as a dispatch (for example, a call to the method). A dispatch is a part of a compute packet.

hh404499 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY

Indicates the preemption granularity as a thread group. A thread group is a part of a dispatch.

hh404499 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY

Indicates the preemption granularity as a thread in a thread group. A thread is a part of a thread group.

hh404499 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY

Indicates the preemption granularity as a compute instruction in a thread.

hh404499 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
No documentation. DXGI_ENUM_MODES_FLAGS DXGI_ENUM_MODES_FLAGS No documentation. DXGI_ENUM_MODES_INTERLACED DXGI_ENUM_MODES_INTERLACED No documentation. DXGI_ENUM_MODES_SCALING DXGI_ENUM_MODES_SCALING No documentation. DXGI_ENUM_MODES_STEREO DXGI_ENUM_MODES_STEREO No documentation. DXGI_ENUM_MODES_DISABLED_STEREO DXGI_ENUM_MODES_DISABLED_STEREO

Flags that indicate how the back buffers should be rotated to fit the physical rotation of a monitor.

bb173065 DXGI_MODE_ROTATION DXGI_MODE_ROTATION

Unspecified rotation.

bb173065 DXGI_MODE_ROTATION_UNSPECIFIED DXGI_MODE_ROTATION_UNSPECIFIED

Specifies no rotation.

bb173065 DXGI_MODE_ROTATION_IDENTITY DXGI_MODE_ROTATION_IDENTITY

Specifies 90 degrees of rotation.

bb173065 DXGI_MODE_ROTATION_ROTATE90 DXGI_MODE_ROTATION_ROTATE90

Specifies 180 degrees of rotation.

bb173065 DXGI_MODE_ROTATION_ROTATE180 DXGI_MODE_ROTATION_ROTATE180

Specifies 270 degrees of rotation.

bb173065 DXGI_MODE_ROTATION_ROTATE270 DXGI_MODE_ROTATION_ROTATE270

Flags indicating how an image is stretched to fit a given monitor's resolution.

Selecting the CENTERED or STRETCHED modes can result in a mode change even if you specify the native resolution of the display in the . If you know the native resolution of the display and want to make sure that you do not initiate a mode change when transitioning a swap chain to full screen (either via ALT+ENTER or ), you should use UNSPECIFIED.

This enum is used by the and structures.

bb173066 DXGI_MODE_SCALING DXGI_MODE_SCALING

Unspecified scaling.

bb173066 DXGI_MODE_SCALING_UNSPECIFIED DXGI_MODE_SCALING_UNSPECIFIED

Specifies no scaling. The image is centered on the display. This flag is typically used for a fixed-dot-pitch display (such as an LED display).

bb173066 DXGI_MODE_SCALING_CENTERED DXGI_MODE_SCALING_CENTERED

Specifies stretched scaling.

bb173066 DXGI_MODE_SCALING_STRETCHED DXGI_MODE_SCALING_STRETCHED

Flags indicating the method the raster uses to create an image on a surface.

This enum is used by the and structures.

bb173067 DXGI_MODE_SCANLINE_ORDER DXGI_MODE_SCANLINE_ORDER

Scanline order is unspecified.

bb173067 DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED

The image is created from the first scanline to the last without skipping any.

bb173067 DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE

The image is created beginning with the upper field.

bb173067 DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST

The image is created beginning with the lower field.

bb173067 DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST

Status codes that can be returned by DXGI functions.

The value for each value is determined from this macro that is defined in DXGItype.h:

 #define _FACDXGI    0x87a	
            #define MAKE_DXGI_STATUS(code)  MAKE_HRESULT(0, _FACDXGI, code)	
            

For example, is defined as 0x087A0001:

 #define                     MAKE_DXGI_STATUS(1)	
            
cc308061 DXGI_STATUS DXGI_STATUS
No documentation. cc308061 DXGI_STATUS_OCCLUDED DXGI_STATUS_OCCLUDED No documentation. cc308061 DXGI_STATUS_CLIPPED DXGI_STATUS_CLIPPED No documentation. cc308061 DXGI_STATUS_NO_REDIRECTION DXGI_STATUS_NO_REDIRECTION No documentation. cc308061 DXGI_STATUS_NO_DESKTOP_ACCESS DXGI_STATUS_NO_DESKTOP_ACCESS No documentation. cc308061 DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE No documentation. cc308061 DXGI_STATUS_MODE_CHANGED DXGI_STATUS_MODE_CHANGED No documentation. cc308061 DXGI_STATUS_MODE_CHANGE_IN_PROGRESS DXGI_STATUS_MODE_CHANGE_IN_PROGRESS No documentation. cc308061 DXGI_STATUS_UNOCCLUDED DXGI_STATUS_UNOCCLUDED No documentation. cc308061 DXGI_STATUS_DDA_WAS_STILL_DRAWING DXGI_STATUS_DDA_WAS_STILL_DRAWING No documentation. cc308061 DXGI_STATUS_PRESENT_REQUIRED DXGI_STATUS_PRESENT_REQUIRED

Specifies a range of hardware features, to be used when checking for feature support.

This enum is used by the CheckFeatureSupport method.

mt722565 DXGI_FEATURE DXGI_FEATURE

The display supports tearing, a requirement of variable refresh rate displays.

mt722565 DXGI_FEATURE_PRESENT_ALLOW_TEARING DXGI_FEATURE_PRESENT_ALLOW_TEARING

Resource data formats, including fully-typed and typeless formats. A list of modifiers at the bottom of the page more fully describes each format type.

bb173059 DXGI_FORMAT DXGI_FORMAT

The format is not known.

bb173059 DXGI_FORMAT_UNKNOWN DXGI_FORMAT_UNKNOWN

A four-component, 128-bit typeless format that supports 32 bits per channel including alpha. ?

bb173059 DXGI_FORMAT_R32G32B32A32_TYPELESS DXGI_FORMAT_R32G32B32A32_TYPELESS

A four-component, 128-bit floating-point format that supports 32 bits per channel including alpha. 1,5,8

bb173059 DXGI_FORMAT_R32G32B32A32_FLOAT DXGI_FORMAT_R32G32B32A32_FLOAT

A four-component, 128-bit unsigned-integer format that supports 32 bits per channel including alpha. ?

bb173059 DXGI_FORMAT_R32G32B32A32_UINT DXGI_FORMAT_R32G32B32A32_UINT

A four-component, 128-bit signed-integer format that supports 32 bits per channel including alpha. ?

bb173059 DXGI_FORMAT_R32G32B32A32_SINT DXGI_FORMAT_R32G32B32A32_SINT

A three-component, 96-bit typeless format that supports 32 bits per color channel.

bb173059 DXGI_FORMAT_R32G32B32_TYPELESS DXGI_FORMAT_R32G32B32_TYPELESS

A three-component, 96-bit floating-point format that supports 32 bits per color channel.5,8

bb173059 DXGI_FORMAT_R32G32B32_FLOAT DXGI_FORMAT_R32G32B32_FLOAT

A three-component, 96-bit unsigned-integer format that supports 32 bits per color channel.

bb173059 DXGI_FORMAT_R32G32B32_UINT DXGI_FORMAT_R32G32B32_UINT

A three-component, 96-bit signed-integer format that supports 32 bits per color channel.

bb173059 DXGI_FORMAT_R32G32B32_SINT DXGI_FORMAT_R32G32B32_SINT

A four-component, 64-bit typeless format that supports 16 bits per channel including alpha.

bb173059 DXGI_FORMAT_R16G16B16A16_TYPELESS DXGI_FORMAT_R16G16B16A16_TYPELESS

A four-component, 64-bit floating-point format that supports 16 bits per channel including alpha.5,7

bb173059 DXGI_FORMAT_R16G16B16A16_FLOAT DXGI_FORMAT_R16G16B16A16_FLOAT

A four-component, 64-bit unsigned-normalized-integer format that supports 16 bits per channel including alpha.

bb173059 DXGI_FORMAT_R16G16B16A16_UNORM DXGI_FORMAT_R16G16B16A16_UNORM

A four-component, 64-bit unsigned-integer format that supports 16 bits per channel including alpha.

bb173059 DXGI_FORMAT_R16G16B16A16_UINT DXGI_FORMAT_R16G16B16A16_UINT

A four-component, 64-bit signed-normalized-integer format that supports 16 bits per channel including alpha.

bb173059 DXGI_FORMAT_R16G16B16A16_SNORM DXGI_FORMAT_R16G16B16A16_SNORM

A four-component, 64-bit signed-integer format that supports 16 bits per channel including alpha.

bb173059 DXGI_FORMAT_R16G16B16A16_SINT DXGI_FORMAT_R16G16B16A16_SINT

A two-component, 64-bit typeless format that supports 32 bits for the red channel and 32 bits for the green channel.

bb173059 DXGI_FORMAT_R32G32_TYPELESS DXGI_FORMAT_R32G32_TYPELESS

A two-component, 64-bit floating-point format that supports 32 bits for the red channel and 32 bits for the green channel.5,8

bb173059 DXGI_FORMAT_R32G32_FLOAT DXGI_FORMAT_R32G32_FLOAT

A two-component, 64-bit unsigned-integer format that supports 32 bits for the red channel and 32 bits for the green channel.

bb173059 DXGI_FORMAT_R32G32_UINT DXGI_FORMAT_R32G32_UINT

A two-component, 64-bit signed-integer format that supports 32 bits for the red channel and 32 bits for the green channel.

bb173059 DXGI_FORMAT_R32G32_SINT DXGI_FORMAT_R32G32_SINT

A two-component, 64-bit typeless format that supports 32 bits for the red channel, 8 bits for the green channel, and 24 bits are unused.

bb173059 DXGI_FORMAT_R32G8X24_TYPELESS DXGI_FORMAT_R32G8X24_TYPELESS

A 32-bit floating-point component, and two unsigned-integer components (with an additional 32 bits). This format supports 32-bit depth, 8-bit stencil, and 24 bits are unused.?

bb173059 DXGI_FORMAT_D32_FLOAT_S8X24_UINT DXGI_FORMAT_D32_FLOAT_S8X24_UINT

A 32-bit floating-point component, and two typeless components (with an additional 32 bits). This format supports 32-bit red channel, 8 bits are unused, and 24 bits are unused.?

bb173059 DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS

A 32-bit typeless component, and two unsigned-integer components (with an additional 32 bits). This format has 32 bits unused, 8 bits for green channel, and 24 bits are unused.

bb173059 DXGI_FORMAT_X32_TYPELESS_G8X24_UINT DXGI_FORMAT_X32_TYPELESS_G8X24_UINT

A four-component, 32-bit typeless format that supports 10 bits for each color and 2 bits for alpha.

bb173059 DXGI_FORMAT_R10G10B10A2_TYPELESS DXGI_FORMAT_R10G10B10A2_TYPELESS

A four-component, 32-bit unsigned-normalized-integer format that supports 10 bits for each color and 2 bits for alpha.

bb173059 DXGI_FORMAT_R10G10B10A2_UNORM DXGI_FORMAT_R10G10B10A2_UNORM

A four-component, 32-bit unsigned-integer format that supports 10 bits for each color and 2 bits for alpha.

bb173059 DXGI_FORMAT_R10G10B10A2_UINT DXGI_FORMAT_R10G10B10A2_UINT

Three partial-precision floating-point numbers encoded into a single 32-bit value (a variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There are no sign bits, and there is a 5-bit biased (15) exponent for each channel, 6-bit mantissa for R and G, and a 5-bit mantissa for B, as shown in the following illustration.5,7

bb173059 DXGI_FORMAT_R11G11B10_FLOAT DXGI_FORMAT_R11G11B10_FLOAT

A four-component, 32-bit typeless format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_TYPELESS DXGI_FORMAT_R8G8B8A8_TYPELESS

A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_UNORM DXGI_FORMAT_R8G8B8A8_UNORM

A four-component, 32-bit unsigned-normalized integer sRGB format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB DXGI_FORMAT_R8G8B8A8_UNORM_SRGB

A four-component, 32-bit unsigned-integer format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_UINT DXGI_FORMAT_R8G8B8A8_UINT

A four-component, 32-bit signed-normalized-integer format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_SNORM DXGI_FORMAT_R8G8B8A8_SNORM

A four-component, 32-bit signed-integer format that supports 8 bits per channel including alpha.

bb173059 DXGI_FORMAT_R8G8B8A8_SINT DXGI_FORMAT_R8G8B8A8_SINT

A two-component, 32-bit typeless format that supports 16 bits for the red channel and 16 bits for the green channel.

bb173059 DXGI_FORMAT_R16G16_TYPELESS DXGI_FORMAT_R16G16_TYPELESS

A two-component, 32-bit floating-point format that supports 16 bits for the red channel and 16 bits for the green channel.5,7

bb173059 DXGI_FORMAT_R16G16_FLOAT DXGI_FORMAT_R16G16_FLOAT

A two-component, 32-bit unsigned-normalized-integer format that supports 16 bits each for the green and red channels.

bb173059 DXGI_FORMAT_R16G16_UNORM DXGI_FORMAT_R16G16_UNORM

A two-component, 32-bit unsigned-integer format that supports 16 bits for the red channel and 16 bits for the green channel.

bb173059 DXGI_FORMAT_R16G16_UINT DXGI_FORMAT_R16G16_UINT

A two-component, 32-bit signed-normalized-integer format that supports 16 bits for the red channel and 16 bits for the green channel.

bb173059 DXGI_FORMAT_R16G16_SNORM DXGI_FORMAT_R16G16_SNORM

A two-component, 32-bit signed-integer format that supports 16 bits for the red channel and 16 bits for the green channel.

bb173059 DXGI_FORMAT_R16G16_SINT DXGI_FORMAT_R16G16_SINT

A single-component, 32-bit typeless format that supports 32 bits for the red channel.

bb173059 DXGI_FORMAT_R32_TYPELESS DXGI_FORMAT_R32_TYPELESS

A single-component, 32-bit floating-point format that supports 32 bits for depth.5,8

bb173059 DXGI_FORMAT_D32_FLOAT DXGI_FORMAT_D32_FLOAT

A single-component, 32-bit floating-point format that supports 32 bits for the red channel.5,8

bb173059 DXGI_FORMAT_R32_FLOAT DXGI_FORMAT_R32_FLOAT

A single-component, 32-bit unsigned-integer format that supports 32 bits for the red channel.

bb173059 DXGI_FORMAT_R32_UINT DXGI_FORMAT_R32_UINT

A single-component, 32-bit signed-integer format that supports 32 bits for the red channel.

bb173059 DXGI_FORMAT_R32_SINT DXGI_FORMAT_R32_SINT

A two-component, 32-bit typeless format that supports 24 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R24G8_TYPELESS DXGI_FORMAT_R24G8_TYPELESS

A 32-bit z-buffer format that supports 24 bits for depth and 8 bits for stencil.

bb173059 DXGI_FORMAT_D24_UNORM_S8_UINT DXGI_FORMAT_D24_UNORM_S8_UINT

A 32-bit format, that contains a 24 bit, single-component, unsigned-normalized integer, with an additional typeless 8 bits. This format has 24 bits red channel and 8 bits unused.

bb173059 DXGI_FORMAT_R24_UNORM_X8_TYPELESS DXGI_FORMAT_R24_UNORM_X8_TYPELESS

A 32-bit format, that contains a 24 bit, single-component, typeless format, with an additional 8 bit unsigned integer component. This format has 24 bits unused and 8 bits green channel.

bb173059 DXGI_FORMAT_X24_TYPELESS_G8_UINT DXGI_FORMAT_X24_TYPELESS_G8_UINT

A two-component, 16-bit typeless format that supports 8 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R8G8_TYPELESS DXGI_FORMAT_R8G8_TYPELESS

A two-component, 16-bit unsigned-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R8G8_UNORM DXGI_FORMAT_R8G8_UNORM

A two-component, 16-bit unsigned-integer format that supports 8 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R8G8_UINT DXGI_FORMAT_R8G8_UINT

A two-component, 16-bit signed-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R8G8_SNORM DXGI_FORMAT_R8G8_SNORM

A two-component, 16-bit signed-integer format that supports 8 bits for the red channel and 8 bits for the green channel.

bb173059 DXGI_FORMAT_R8G8_SINT DXGI_FORMAT_R8G8_SINT

A single-component, 16-bit typeless format that supports 16 bits for the red channel.

bb173059 DXGI_FORMAT_R16_TYPELESS DXGI_FORMAT_R16_TYPELESS

A single-component, 16-bit floating-point format that supports 16 bits for the red channel.5,7

bb173059 DXGI_FORMAT_R16_FLOAT DXGI_FORMAT_R16_FLOAT

A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for depth.

bb173059 DXGI_FORMAT_D16_UNORM DXGI_FORMAT_D16_UNORM

A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for the red channel.

bb173059 DXGI_FORMAT_R16_UNORM DXGI_FORMAT_R16_UNORM

A single-component, 16-bit unsigned-integer format that supports 16 bits for the red channel.

bb173059 DXGI_FORMAT_R16_UINT DXGI_FORMAT_R16_UINT

A single-component, 16-bit signed-normalized-integer format that supports 16 bits for the red channel.

bb173059 DXGI_FORMAT_R16_SNORM DXGI_FORMAT_R16_SNORM

A single-component, 16-bit signed-integer format that supports 16 bits for the red channel.

bb173059 DXGI_FORMAT_R16_SINT DXGI_FORMAT_R16_SINT

A single-component, 8-bit typeless format that supports 8 bits for the red channel.

bb173059 DXGI_FORMAT_R8_TYPELESS DXGI_FORMAT_R8_TYPELESS

A single-component, 8-bit unsigned-normalized-integer format that supports 8 bits for the red channel.

bb173059 DXGI_FORMAT_R8_UNORM DXGI_FORMAT_R8_UNORM

A single-component, 8-bit unsigned-integer format that supports 8 bits for the red channel.

bb173059 DXGI_FORMAT_R8_UINT DXGI_FORMAT_R8_UINT

A single-component, 8-bit signed-normalized-integer format that supports 8 bits for the red channel.

bb173059 DXGI_FORMAT_R8_SNORM DXGI_FORMAT_R8_SNORM

A single-component, 8-bit signed-integer format that supports 8 bits for the red channel.

bb173059 DXGI_FORMAT_R8_SINT DXGI_FORMAT_R8_SINT

A single-component, 8-bit unsigned-normalized-integer format for alpha only.

bb173059 DXGI_FORMAT_A8_UNORM DXGI_FORMAT_A8_UNORM

A single-component, 1-bit unsigned-normalized integer format that supports 1 bit for the red channel. ?.

bb173059 DXGI_FORMAT_R1_UNORM DXGI_FORMAT_R1_UNORM

Three partial-precision floating-point numbers encoded into a single 32-bit value all sharing the same 5-bit exponent (variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There is no sign bit, and there is a shared 5-bit biased (15) exponent and a 9-bit mantissa for each channel, as shown in the following illustration. 2,6,7.

bb173059 DXGI_FORMAT_R9G9B9E5_SHAREDEXP DXGI_FORMAT_R9G9B9E5_SHAREDEXP

A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the UYVY format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?

Width must be even.

bb173059 DXGI_FORMAT_R8G8_B8G8_UNORM DXGI_FORMAT_R8G8_B8G8_UNORM

A four-component, 32-bit unsigned-normalized-integer format. This packed RGB format is analogous to the YUY2 format. Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are repeated, and the G8 values are unique to each pixel. ?

Width must be even.

bb173059 DXGI_FORMAT_G8R8_G8B8_UNORM DXGI_FORMAT_G8R8_G8B8_UNORM

Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC1_TYPELESS DXGI_FORMAT_BC1_TYPELESS

Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC1_UNORM DXGI_FORMAT_BC1_UNORM

Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC1_UNORM_SRGB DXGI_FORMAT_BC1_UNORM_SRGB

Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC2_TYPELESS DXGI_FORMAT_BC2_TYPELESS

Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC2_UNORM DXGI_FORMAT_BC2_UNORM

Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC2_UNORM_SRGB DXGI_FORMAT_BC2_UNORM_SRGB

Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC3_TYPELESS DXGI_FORMAT_BC3_TYPELESS

Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC3_UNORM DXGI_FORMAT_BC3_UNORM

Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC3_UNORM_SRGB DXGI_FORMAT_BC3_UNORM_SRGB

One-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC4_TYPELESS DXGI_FORMAT_BC4_TYPELESS

One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC4_UNORM DXGI_FORMAT_BC4_UNORM

One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC4_SNORM DXGI_FORMAT_BC4_SNORM

Two-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC5_TYPELESS DXGI_FORMAT_BC5_TYPELESS

Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC5_UNORM DXGI_FORMAT_BC5_UNORM

Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC5_SNORM DXGI_FORMAT_BC5_SNORM

A three-component, 16-bit unsigned-normalized-integer format that supports 5 bits for blue, 6 bits for green, and 5 bits for red.

Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_B5G6R5_UNORM DXGI_FORMAT_B5G6R5_UNORM

A four-component, 16-bit unsigned-normalized-integer format that supports 5 bits for each color channel and 1-bit alpha.

Direct3D 10 through Direct3D 11:??This value is defined for DXGI. However, Direct3D 10, 10.1, or 11 devices do not support this format.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_B5G5R5A1_UNORM DXGI_FORMAT_B5G5R5A1_UNORM

A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8-bit alpha.

bb173059 DXGI_FORMAT_B8G8R8A8_UNORM DXGI_FORMAT_B8G8R8A8_UNORM

A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8 bits unused.

bb173059 DXGI_FORMAT_B8G8R8X8_UNORM DXGI_FORMAT_B8G8R8X8_UNORM

A four-component, 32-bit 2.8-biased fixed-point format that supports 10 bits for each color channel and 2-bit alpha.

bb173059 DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM

A four-component, 32-bit typeless format that supports 8 bits for each channel including alpha. ?

bb173059 DXGI_FORMAT_B8G8R8A8_TYPELESS DXGI_FORMAT_B8G8R8A8_TYPELESS

A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each channel including alpha. ?

bb173059 DXGI_FORMAT_B8G8R8A8_UNORM_SRGB DXGI_FORMAT_B8G8R8A8_UNORM_SRGB

A four-component, 32-bit typeless format that supports 8 bits for each color channel, and 8 bits are unused. ?

bb173059 DXGI_FORMAT_B8G8R8X8_TYPELESS DXGI_FORMAT_B8G8R8X8_TYPELESS

A four-component, 32-bit unsigned-normalized standard RGB format that supports 8 bits for each color channel, and 8 bits are unused. ?

bb173059 DXGI_FORMAT_B8G8R8X8_UNORM_SRGB DXGI_FORMAT_B8G8R8X8_UNORM_SRGB

A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC6H_TYPELESS DXGI_FORMAT_BC6H_TYPELESS

A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?

bb173059 DXGI_FORMAT_BC6H_UF16 DXGI_FORMAT_BC6H_UF16

A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?

bb173059 DXGI_FORMAT_BC6H_SF16 DXGI_FORMAT_BC6H_SF16

A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC7_TYPELESS DXGI_FORMAT_BC7_TYPELESS

A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC7_UNORM DXGI_FORMAT_BC7_UNORM

A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.

bb173059 DXGI_FORMAT_BC7_UNORM_SRGB DXGI_FORMAT_BC7_UNORM_SRGB

Most common YUV 4:4:4 video resource format. Valid view formats for this video resource format are and . For UAVs, an additional valid view format is . By using for UAVs, you can both read and write as opposed to just write for and . Supported view types are SRV, RTV, and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is V->R8, U->G8, Y->B8, and A->A8.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_AYUV DXGI_FORMAT_AYUV

10-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are and . For UAVs, an additional valid view format is . By using for UAVs, you can both read and write as opposed to just write for and . Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U->R10, Y->G10, V->B10, and A->A2.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_Y410 DXGI_FORMAT_Y410

16-bit per channel packed YUV 4:4:4 video resource format. Valid view formats for this video resource format are and . Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U->R16, Y->G16, V->B16, and A->A16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_Y416 DXGI_FORMAT_Y416

Most common YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are and . Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are and . Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R8. For chrominance data view, the mapping to the view channel is U->R8 and V->G8.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.

An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_NV12 DXGI_FORMAT_NV12

10-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are and . The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, is no different than . Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are and . For UAVs, an additional valid chrominance data view format is . By using for UAVs, you can both read and write as opposed to just write for and . Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R16. For chrominance data view, the mapping to the view channel is U->R16 and V->G16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.

An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_P010 DXGI_FORMAT_P010

16-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are and . Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are and . For UAVs, an additional valid chrominance data view format is . By using for UAVs, you can both read and write as opposed to just write for and . Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R16. For chrominance data view, the mapping to the view channel is U->R16 and V->G16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.

An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_P016 DXGI_FORMAT_P016

8-bit per channel planar YUV 4:2:0 video resource format. This format is subsampled where each pixel has its own Y value, but each 2x2 pixel block shares a single U and V value. The runtime requires that the width and height of all resources that are created with this format are multiples of 2. The runtime also requires that the left, right, top, and bottom members of any that are used for this format are multiples of 2. This format differs from in that the layout of the data within the resource is completely opaque to applications. Applications cannot use the CPU to map the resource and then access the data within the resource. You cannot use shaders with this format. Because of this behavior, legacy hardware that supports a non-NV12 4:2:0 layout (for example, YV12, and so on) can be used. Also, new hardware that has a 4:2:0 implementation better than NV12 can be used when the application does not need the data to be in a standard layout.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes.

An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_420_OPAQUE DXGI_FORMAT_420_OPAQUE

Most common YUV 4:2:2 video resource format. Valid view formats for this video resource format are and . For UAVs, an additional valid view format is . By using for UAVs, you can both read and write as opposed to just write for and . Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R8, U0->G8, Y1->B8, and V0->A8.

A unique valid view format for this video resource format is . With this view format, the width of the view appears to be twice what the or view would be when hardware reconstructs RGBA automatically on read and before filtering. This Direct3D hardware behavior is legacy and is likely not useful any more. With this view format, the mapping to the view channel is Y0->R8, U0-> G8[0], Y1->B8, and V0-> G8[1].

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width must be even.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_YUY2 DXGI_FORMAT_YUY2

10-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are and . The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, is no different than . Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R16, U->G16, Y1->B16, and V->A16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width must be even.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_Y210 DXGI_FORMAT_Y210

16-bit per channel packed YUV 4:2:2 video resource format. Valid view formats for this video resource format are and . Supported view types are SRV and UAV. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is Y0->R16, U->G16, Y1->B16, and V->A16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width must be even.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_Y216 DXGI_FORMAT_Y216

Most common planar YUV 4:1:1 video resource format. Valid luminance data view formats for this video resource format are and . Valid chrominance data view formats (width and height are each 1/4 of luminance view) for this video resource format are and . Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R8. For chrominance data view, the mapping to the view channel is U->R8 and V->G8.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width must be a multiple of 4. Direct3D11 staging resources and initData parameters for this format use (rowPitch * height * 2) bytes. The first (SysMemPitch * height) bytes are the Y plane, the next ((SysMemPitch / 2) * height) bytes are the UV plane, and the remainder is padding.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_NV11 DXGI_FORMAT_NV11

4-bit palletized YUV format that is commonly used for DVD subpicture.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_AI44 DXGI_FORMAT_AI44

4-bit palletized YUV format that is commonly used for DVD subpicture.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_IA44 DXGI_FORMAT_IA44

8-bit palletized format that is used for palletized RGB data when the processor processes ISDB-T data and for palletized YUV data when the processor processes BluRay data.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_P8 DXGI_FORMAT_P8

8-bit palletized format with 8 bits of alpha that is used for palletized YUV data when the processor processes BluRay data.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_A8P8 DXGI_FORMAT_A8P8

A four-component, 16-bit unsigned-normalized integer format that supports 4 bits for each channel including alpha.

Direct3D 11.1:??This value is not supported until Windows?8.

bb173059 DXGI_FORMAT_B4G4R4A4_UNORM DXGI_FORMAT_B4G4R4A4_UNORM

A video format; an 8-bit version of a hybrid planar 4:2:2 format.

bb173059 DXGI_FORMAT_P208 DXGI_FORMAT_P208

An 8 bit YCbCrA 4:4 rendering format.

bb173059 DXGI_FORMAT_V208 DXGI_FORMAT_V208

An 8 bit YCbCrA 4:4:4:4 rendering format.

bb173059 DXGI_FORMAT_V408 DXGI_FORMAT_V408

Indicates options for presenting frames to the swap chain.

This enum is used by the structure.

dn384107 DXGI_FRAME_PRESENTATION_MODE DXGI_FRAME_PRESENTATION_MODE

Specifies that the presentation mode is a composition surface, meaning that the conversion from YUV to RGB is happening once per output refresh (for example, 60 Hz). When this value is returned, the media app should discontinue use of the decode swap chain and perform YUV to RGB conversion itself, reducing the frequency of YUV to RGB conversion to once per video frame.

dn384107 DXGI_FRAME_PRESENTATION_MODE_COMPOSED DXGI_FRAME_PRESENTATION_MODE_COMPOSED

Specifies that the presentation mode is an overlay surface, meaning that the YUV to RGB conversion is happening efficiently in hardware (once per video frame). When this value is returned, the media app can continue to use the decode swap chain. See .

dn384107 DXGI_FRAME_PRESENTATION_MODE_OVERLAY DXGI_FRAME_PRESENTATION_MODE_OVERLAY

No presentation is specified.

dn384107 DXGI_FRAME_PRESENTATION_MODE_NONE DXGI_FRAME_PRESENTATION_MODE_NONE

An issue occurred that caused content protection to be invalidated in a swap-chain with hardware content protection, and is usually because the system ran out of hardware protected memory. The app will need to do one of the following:

  • Drastically reduce the amount of hardware protected memory used. For example, media applications might be able to reduce their buffering.
  • Stop using hardware protection if possible.

Note that simply re-creating the swap chain or the device will usually have no impact as the DWM will continue to run out of memory and will return the same failure.

dn384107 DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE

Identifies the granularity at which the graphics processing unit (GPU) can be preempted from performing its current graphics rendering task.

You call the method to retrieve the granularity level at which the GPU can be preempted from performing its current graphics rendering task. The operating system specifies the graphics granularity level in the GraphicsPreemptionGranularity member of the structure.

The following figure shows granularity of graphics rendering tasks.

hh404504 DXGI_GRAPHICS_PREEMPTION_GRANULARITY DXGI_GRAPHICS_PREEMPTION_GRANULARITY

Indicates the preemption granularity as a DMA buffer.

hh404504 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY

Indicates the preemption granularity as a graphics primitive. A primitive is a section in a DMA buffer and can be a group of triangles.

hh404504 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY

Indicates the preemption granularity as a triangle. A triangle is a part of a primitive.

hh404504 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY

Indicates the preemption granularity as a pixel. A pixel is a part of a triangle.

hh404504 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY

Indicates the preemption granularity as a graphics instruction. A graphics instruction operates on a pixel.

hh404504 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
No documentation. DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS No documentation. DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN No documentation. DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED No documentation. DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED None. None None

Specifies the header metadata type.

This enum is used by the SetHDRMetaData method.

mt732701 DXGI_HDR_METADATA_TYPE DXGI_HDR_METADATA_TYPE

Indicates there is no header metadata.

mt732701 DXGI_HDR_METADATA_TYPE_NONE DXGI_HDR_METADATA_TYPE_NONE

Indicates the header metadata is held by a structure.

mt732701 DXGI_HDR_METADATA_TYPE_HDR10 DXGI_HDR_METADATA_TYPE_HDR10

Get a reference to the data contained in the surface, and deny GPU access to the surface.

Use to access a surface from the CPU. To release a mapped surface (and allow GPU access) call .

bb174567 DXGI_MAP_FLAGS DXGI_MAP_FLAGS

A reference to the surface data (see ).

bb174567 DXGI_MAP_READ DXGI_MAP_READ

CPU read-write flags. These flags can be combined with a logical OR.

  • - Allow CPU read access.
  • - Allow CPU write access.
  • - Discard the previous contents of a resource when it is mapped.
bb174567 DXGI_MAP_WRITE DXGI_MAP_WRITE
No documentation. bb174567 DXGI_MAP_DISCARD DXGI_MAP_DISCARD

Specifies the memory segment group to use.

This enum is used by QueryVideoMemoryInfo and SetVideoMemoryReservation.

Refer to the remarks for .

dn933219 DXGI_MEMORY_SEGMENT_GROUP DXGI_MEMORY_SEGMENT_GROUP

The grouping of segments which is considered local to the video adapter, and represents the fastest available memory to the GPU. Applications should target the local segment group as the target size for their working set.

dn933219 DXGI_MEMORY_SEGMENT_GROUP_LOCAL DXGI_MEMORY_SEGMENT_GROUP_LOCAL

The grouping of segments which is considered non-local to the video adapter, and may have slower performance than the local segment group.

dn933219 DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL

Options for swap-chain color space.

This enum is used by SetColorSpace.

dn313170 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS

Specifies nominal range YCbCr, which isn't an absolute color space, but a way of encoding RGB info.

dn313170 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE

Specifies BT.709, which standardizes the format of high-definition television and has 16:9 (widescreen) aspect ratio.

dn313170 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709

Specifies xvYCC or extended-gamut YCC (also x.v.Color) color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space.

dn313170 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC
None. None None

Specifies flags for the OfferResources1 method.

mt732702 DXGI_OFFER_RESOURCE_FLAGS DXGI_OFFER_RESOURCE_FLAGS
No documentation. mt732702 DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT None. None None

Identifies the importance of a resource?s content when you call the method to offer the resource.

Priority determines how likely the operating system is to discard an offered resource. Resources offered with lower priority are discarded first.

dn933257 DXGI_OFFER_RESOURCE_PRIORITY DXGI_OFFER_RESOURCE_PRIORITY
No documentation. dn933257 DXGI_OFFER_RESOURCE_PRIORITY_LOW DXGI_OFFER_RESOURCE_PRIORITY_LOW No documentation. dn933257 DXGI_OFFER_RESOURCE_PRIORITY_NORMAL DXGI_OFFER_RESOURCE_PRIORITY_NORMAL No documentation. dn933257 DXGI_OFFER_RESOURCE_PRIORITY_HIGH DXGI_OFFER_RESOURCE_PRIORITY_HIGH No documentation. DXGI_OUTDUPL_FLAG DXGI_OUTDUPL_FLAG No documentation. DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY None. None None

Identifies the type of reference shape.

hh404520 DXGI_OUTDUPL_POINTER_SHAPE_TYPE DXGI_OUTDUPL_POINTER_SHAPE_TYPE

The reference type is a monochrome mouse reference, which is a monochrome bitmap. The bitmap's size is specified by width and height in a 1 bits per pixel (bpp) device independent bitmap (DIB) format AND mask that is followed by another 1 bpp DIB format XOR mask of the same size.

hh404520 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME

The reference type is a color mouse reference, which is a color bitmap. The bitmap's size is specified by width and height in a 32 bpp ARGB DIB format.

hh404520 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR

The reference type is a masked color mouse reference. A masked color mouse reference is a 32 bpp ARGB format bitmap with the mask value in the alpha bits. The only allowed mask values are 0 and 0xFF. When the mask value is 0, the RGB value should replace the screen pixel. When the mask value is 0xFF, an XOR operation is performed on the RGB value and the screen pixel; the result replaces the screen pixel.

hh404520 DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR

Specifies support for overlay color space.

dn903665 DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG

Overlay color space support is present.

dn903665 DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT
None. None None

Specifies overlay support to check for in a call to .

dn903667 DXGI_OVERLAY_SUPPORT_FLAG DXGI_OVERLAY_SUPPORT_FLAG
No documentation. dn903667 DXGI_OVERLAY_SUPPORT_FLAG_DIRECT DXGI_OVERLAY_SUPPORT_FLAG_DIRECT No documentation. dn903667 DXGI_OVERLAY_SUPPORT_FLAG_SCALING DXGI_OVERLAY_SUPPORT_FLAG_SCALING

Presents a rendered image to the user.

Starting with Direct3D 11.1, consider using because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.

For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.

Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.

Differences between Direct3D 9 and Direct3D 10:

Specifying in the Flags parameter is analogous to IDirect3DDevice9::TestCooperativeLevel in Direct3D 9.

?

For flip presentation model swap chains that you create with the value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.

For info about how data values change when you present content to the screen, see Converting data for the color space.

bb174576 DXGI_PRESENT_FLAGS DXGI_PRESENT_FLAGS

An integer that specifies how to synchronize presentation of a frame with the vertical blank.

For the bit-block transfer (bitblt) model ( or ), values are:

  • 0 - The presentation occurs immediately, there is no synchronization.
  • 1 through 4 - Synchronize presentation after the nth vertical blank.

For the flip model (), values are:

  • 0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued.
  • 1 through 4 - Synchronize presentation for at least n vertical blanks.

For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.

If the update region straddles more than one output (each represented by ), Present performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.

bb174576 DXGI_PRESENT_TEST DXGI_PRESENT_TEST

An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.

bb174576 DXGI_PRESENT_DO_NOT_SEQUENCE DXGI_PRESENT_DO_NOT_SEQUENCE
No documentation. bb174576 DXGI_PRESENT_RESTART DXGI_PRESENT_RESTART No documentation. bb174576 DXGI_PRESENT_DO_NOT_WAIT DXGI_PRESENT_DO_NOT_WAIT No documentation. bb174576 DXGI_PRESENT_STEREO_PREFER_RIGHT DXGI_PRESENT_STEREO_PREFER_RIGHT No documentation. bb174576 DXGI_PRESENT_STEREO_TEMPORARY_MONO DXGI_PRESENT_STEREO_TEMPORARY_MONO No documentation. bb174576 DXGI_PRESENT_RESTRICT_TO_OUTPUT DXGI_PRESENT_RESTRICT_TO_OUTPUT No documentation. bb174576 DXGI_PRESENT_USE_DURATION DXGI_PRESENT_USE_DURATION No documentation. bb174576 DXGI_PRESENT_ALLOW_TEARING DXGI_PRESENT_ALLOW_TEARING None. None None

Specifies result flags for the ReclaimResources1 method.

mt732703 DXGI_RECLAIM_RESOURCE_RESULTS DXGI_RECLAIM_RESOURCE_RESULTS
No documentation. mt732703 DXGI_RECLAIM_RESOURCE_RESULT_OK DXGI_RECLAIM_RESOURCE_RESULT_OK No documentation. mt732703 DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED No documentation. mt732703 DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED

Flags indicating the memory location of a resource.

This enum is used by QueryResourceResidency.

bb173070 DXGI_RESIDENCY DXGI_RESIDENCY

The resource is located in video memory.

bb173070 DXGI_RESIDENCY_FULLY_RESIDENT DXGI_RESIDENCY_FULLY_RESIDENT

At least some of the resource is located in CPU memory.

bb173070 DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY

At least some of the resource has been paged out to the hard drive.

bb173070 DXGI_RESIDENCY_EVICTED_TO_DISK DXGI_RESIDENCY_EVICTED_TO_DISK

Set the priority for evicting the resource from memory.

The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.

You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.

bb174564 DXGI_RESOURCE_PRIORITY DXGI_RESOURCE_PRIORITY

The priority is one of the following values:

ValueMeaning
(0x28000000)

The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.

(0x50000000)

The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.

(0x78000000)

The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource.

(0xa0000000)

The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.

(0xc8000000)

The resource is evicted from memory only if there is no other way of resolving the memory requirement.

?

bb174564 DXGI_RESOURCE_PRIORITY_MINIMUM DXGI_RESOURCE_PRIORITY_MINIMUM
No documentation. bb174564 DXGI_RESOURCE_PRIORITY_LOW DXGI_RESOURCE_PRIORITY_LOW No documentation. bb174564 DXGI_RESOURCE_PRIORITY_NORMAL DXGI_RESOURCE_PRIORITY_NORMAL No documentation. bb174564 DXGI_RESOURCE_PRIORITY_HIGH DXGI_RESOURCE_PRIORITY_HIGH No documentation. bb174564 DXGI_RESOURCE_PRIORITY_MAXIMUM DXGI_RESOURCE_PRIORITY_MAXIMUM

Identifies resize behavior when the back-buffer size does not match the size of the target output.

The value is supported only for flip presentation model swap chains that you create with the value. You pass these values in a call to , , or .

will prefer to use a horizontal fill, otherwise it will use a vertical fill, using the following logic.

float aspectRatio = backBufferWidth / float(backBufferHeight); // Horizontal fill float scaledWidth = outputWidth; float scaledHeight = outputWidth / aspectRatio; if (scaledHeight >= outputHeight) { // Do vertical fill scaledWidth = outputHeight * aspectRatio; scaledHeight = outputHeight; } float offsetX = (outputWidth - scaledWidth) * 0.5f; float offsetY = (outputHeight - scaledHeight) * 0.5f; rect.left = static_cast<LONG>(offsetX); rect.top = static_cast<LONG>(offsetY); rect.right = static_cast<LONG>(offsetX + scaledWidth); rect.bottom = static_cast<LONG>(offsetY + scaledHeight); rect.left = std::max<LONG>(0, rect.left); rect.top = std::max<LONG>(0, rect.top); rect.right = std::min<LONG>(static_cast<LONG>(outputWidth), rect.right); rect.bottom = std::min<LONG>(static_cast<LONG>(outputHeight), rect.bottom);

Note that outputWidth and outputHeight are the pixel sizes of the presentation target size. In the case of CoreWindow, this requires converting the logicalWidth and logicalHeight values from DIPS to pixels using the window's DPI property.

hh404526 DXGI_SCALING DXGI_SCALING

Directs DXGI to make the back-buffer contents scale to fit the presentation target size. This is the implicit behavior of DXGI when you call the method.

hh404526 DXGI_SCALING_STRETCH DXGI_SCALING_STRETCH

Directs DXGI to make the back-buffer contents appear without any scaling when the presentation target size is not equal to the back-buffer size. The top edges of the back buffer and presentation target are aligned together. If the WS_EX_LAYOUTRTL style is associated with the handle to the target output window, the right edges of the back buffer and presentation target are aligned together; otherwise, the left edges are aligned together. All target area outside the back buffer is filled with window background color.

This value specifies that all target areas outside the back buffer of a swap chain are filled with the background color that you specify in a call to .

hh404526 DXGI_SCALING_NONE DXGI_SCALING_NONE

Directs DXGI to make the back-buffer contents scale to fit the presentation target size, while preserving the aspect ratio of the back-buffer. If the scaled back-buffer does not fill the presentation area, it will be centered with black borders.

This constant is supported on Windows Phone 8 and Windows 10.

Note that with legacy Win32 window swapchains, this works the same as .

hh404526 DXGI_SCALING_ASPECT_RATIO_STRETCH DXGI_SCALING_ASPECT_RATIO_STRETCH
No documentation. DXGI_SHARED_RESOURCE_FLAGS DXGI_SHARED_RESOURCE_FLAGS No documentation. DXGI_SHARED_RESOURCE_READ DXGI_SHARED_RESOURCE_READ No documentation. DXGI_SHARED_RESOURCE_WRITE DXGI_SHARED_RESOURCE_WRITE None. None None

Specifies color space support for the swap chain.

dn903668 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG

Color space support is present.

dn903668 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT

Overlay color space support is present.

dn903668 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT
None. None None

Options for swap-chain behavior.

This enumeration is used by the structure and the method.

This enumeration is also used by the structure.

You don't need to set for swap chains that you create in full-screen mode with the method because those swap chains already behave as if 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 , , and methods are not protected if is not set and are protected if 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 to change the swap chain's back buffer, you can reset or change all flags.

bb173076 DXGI_SWAP_CHAIN_FLAG DXGI_SWAP_CHAIN_FLAG

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.

bb173076 DXGI_SWAP_CHAIN_FLAG_NONPREROTATED DXGI_SWAP_CHAIN_FLAG_NONPREROTATED

Set this flag to enable an application to switch modes by calling . 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.

bb173076 DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH

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 on the 0th back buffer or a surface.

bb173076 DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE

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:??This enumeration value is supported starting with Windows?8.

bb173076 DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT

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:??This enumeration value is supported starting with Windows?8.

bb173076 DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER

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 ( or IWindow) swap chains where another process created the , the owner of the must use the SetWindowDisplayAffinity function appropriately in order to allow calls to or to succeed.

Direct3D 11:??This enumeration value is supported starting with Windows?8.

bb173076 DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY

Set this flag to create a waitable object you can use to ensure rendering does not begin while a frame is still being presented. When this flag is used, the swapchain's latency must be set with the API instead of .

Note??This enumeration value is supported starting with Windows?8.1.

bb173076 DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT

Set this flag to create a swap chain in the foreground layer for multi-plane rendering. This flag can only be used with CoreWindow swap chains, which are created with CreateSwapChainForCoreWindow. Apps should not create foreground swap chains if indicates that hardware support for overlays is not available.

Note that cannot be used to add or remove this flag.

Note??This enumeration value is supported starting with Windows?8.1.

bb173076 DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER

Set this flag to create a swap chain for full-screen video.

Note??This enumeration value is supported starting with Windows?8.1.

bb173076 DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO

Set this flag to create a swap chain for YUV video.

Note??This enumeration value is supported starting with Windows?8.1.

bb173076 DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO

Indicates that the swap chain should be created such that all underlying resources can be protected by the hardware. Resource creation will fail if hardware content protection is not supported.

This flag has the following restrictions:

  • This flag can only be used with swap effect .
Note??Creating a swap chain using this flag does not automatically guarantee that hardware protection will be enabled for the underlying allocation. Some implementations require that the DRM components are first initialized prior to any guarantees of protection. ?

Note??This enumeration value is supported starting with Windows?10.

bb173076 DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED

Tearing support is a requirement to enable displays that support variable refresh rates to function properly when the application presents a swap chain tied to a full screen borderless window. Win32 apps can already achieve tearing in fullscreen exclusive mode by calling SetFullscreenState(TRUE), but the recommended approach for Win32 developers is to use this tearing flag instead.

To check for hardware support of this feature, refer to . For usage information refer to and the DXGI_PRESENT flags.

bb173076 DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING
No documentation. bb173076 DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS None. None None

Options for handling pixels in a display surface after calling .

This enumeration is used by the and structures.

To use multisampling with or , you must perform the multisampling in a separate render target. For example, create a multisampled texture by calling with a filled structure (BindFlags member set to and SampleDesc member with multisampling parameters). Next call to create a render-target view for the texture, and render your scene into the texture. Finally call to resolve the multisampled texture into your non-multisampled swap chain.

The primary difference between presentation models is how back-buffer contents get to the Desktop Window Manager (DWM) for composition. In the bitblt model, which is used with the and values, contents of the back buffer get copied into the redirection surface on each call to . In the flip model, which is used with the value, all back buffers are shared with the DWM. Therefore, the DWM can compose straight from those back buffers without any additional copy operations. In general, the flip model is the more efficient model. The flip model also provides more features, such as enhanced present statistics.

When you call on a flip model swap chain () with 0 specified in the SyncInterval parameter, 's behavior is the same as the behavior of Direct3D 9Ex's IDirect3DDevice9Ex::PresentEx with D3DSWAPEFFECT_FLIPEX and D3DPRESENT_FORCEIMMEDIATE. That is, the runtime not only presents the next frame instead of any previously queued frames, it also terminates any remaining time left on the previously queued frames.

Regardless of whether the flip model is more efficient, an application still might choose the bitblt model because the bitblt model is the only way to mix GDI and DirectX presentation. In the flip model, the application must create the swap chain with , and then must use GetDC on the back buffer explicitly. After the first successful call to on a flip-model swap chain, GDI no longer works with the that is associated with that swap chain, even after the destruction of the swap chain. This restriction even extends to methods like ScrollWindowEx.

For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.

bb173077 DXGI_SWAP_EFFECT DXGI_SWAP_EFFECT
No documentation. bb173077 DXGI_SWAP_EFFECT_DISCARD DXGI_SWAP_EFFECT_DISCARD No documentation. bb173077 DXGI_SWAP_EFFECT_SEQUENTIAL DXGI_SWAP_EFFECT_SEQUENTIAL No documentation. bb173077 DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL No documentation. bb173077 DXGI_SWAP_EFFECT_FLIP_DISCARD DXGI_SWAP_EFFECT_FLIP_DISCARD No documentation. DXGI_USAGE_ENUM DXGI_USAGE_ENUM No documentation. DXGI_USAGE_SHADER_INPUT DXGI_USAGE_SHADER_INPUT No documentation. DXGI_USAGE_RENDER_TARGET_OUTPUT DXGI_USAGE_RENDER_TARGET_OUTPUT No documentation. DXGI_USAGE_BACK_BUFFER DXGI_USAGE_BACK_BUFFER No documentation. DXGI_USAGE_SHARED DXGI_USAGE_SHARED No documentation. DXGI_USAGE_READ_ONLY DXGI_USAGE_READ_ONLY No documentation. DXGI_USAGE_DISCARD_ON_PRESENT DXGI_USAGE_DISCARD_ON_PRESENT No documentation. DXGI_USAGE_UNORDERED_ACCESS DXGI_USAGE_UNORDERED_ACCESS No documentation. DXGI_MWA_FLAGS DXGI_MWA_FLAGS No documentation. DXGI_MWA_NO_WINDOW_CHANGES DXGI_MWA_NO_WINDOW_CHANGES No documentation. DXGI_MWA_NO_ALT_ENTER DXGI_MWA_NO_ALT_ENTER No documentation. DXGI_MWA_NO_PRINT_SCREEN DXGI_MWA_NO_PRINT_SCREEN No documentation. DXGI_MWA_VALID DXGI_MWA_VALID None. None None Functions Constant CreateFactoryDebug. DXGI_CREATE_FACTORY_DEBUG

Creates a DXGI 1.1 factory that you can use to generate other DXGI objects.

The globally unique identifier () of the object referenced by the ppFactory parameter.

Address of a reference to an object.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

Use a DXGI 1.1 factory to generate objects that enumerate adapters, create swap chains, and associate a window with the alt+enter key sequence for toggling to and from the full-screen display mode.

If the CreateDXGIFactory1 function succeeds, the reference count on the interface is incremented. To avoid a memory leak, when you finish using the interface, call the IDXGIFactory1::Release method to release the interface.

This entry point is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Note??Do not mix the use of DXGI 1.0 () and DXGI 1.1 () in an application. Use or , but not both in an application.?Note??CreateDXGIFactory1 fails if your app's DllMain function calls it. For more info about how DXGI responds from DllMain, see DXGI Responses from DLLMain.?Note??Starting with Windows?8, all DXGI factories (regardless if they were created with CreateDXGIFactory or CreateDXGIFactory1) enumerate adapters identically. The enumeration order of adapters, which you retrieve with or , is as follows:
  • Adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero.
  • Adapters with outputs.
  • Adapters without outputs.
?
ff471318 HRESULT CreateDXGIFactory1([In] const GUID& riid,[Out] void** ppFactory) CreateDXGIFactory1

Creates a DXGI 1.3 factory that you can use to generate other DXGI objects.

In Windows?8, any DXGI factory created while DXGIDebug.dll was present on the system would load and use it. Starting in Windows?8.1, apps explicitly request that DXGIDebug.dll be loaded instead. Use CreateDXGIFactory2 and specify the flag to request DXGIDebug.dll; the DLL will be loaded if it is present on the system.

Valid values include the (0x01) flag, and zero.

Note??This flag will be set by the D3D runtime if:
  • The system creates an implicit factory during device creation.
  • The flag is specified during device creation, for example using (or the swapchain method, or the Direct3D 10 equivalents).
?

The globally unique identifier () of the object referenced by the ppFactory parameter.

Address of a reference to an object.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

This function accepts a flag indicating whether DXGIDebug.dll is loaded. The function otherwise behaves identically to CreateDXGIFactory1.

dn268307 HRESULT CreateDXGIFactory2([In] unsigned int Flags,[In] const GUID& riid,[Out] void** ppFactory) CreateDXGIFactory2
Functions Constant InvalidCall. DXGI_ERROR_INVALID_CALL Constant NotFound. DXGI_ERROR_NOT_FOUND Constant MoreData. DXGI_ERROR_MORE_DATA Constant Unsupported. DXGI_ERROR_UNSUPPORTED Constant DeviceRemoved. DXGI_ERROR_DEVICE_REMOVED Constant DeviceHung. DXGI_ERROR_DEVICE_HUNG Constant DeviceReset. DXGI_ERROR_DEVICE_RESET Constant WasStillDrawing. DXGI_ERROR_WAS_STILL_DRAWING Constant FrameStatisticsDisjoint. DXGI_ERROR_FRAME_STATISTICS_DISJOINT Constant GraphicsVidpnSourceInUse. DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE Constant DriverInternalError. DXGI_ERROR_DRIVER_INTERNAL_ERROR Constant Nonexclusive. DXGI_ERROR_NONEXCLUSIVE Constant NotCurrentlyAvailable. DXGI_ERROR_NOT_CURRENTLY_AVAILABLE Constant RemoteClientDisconnected. DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED Constant RemoteOufOfMemory. DXGI_ERROR_REMOTE_OUTOFMEMORY Constant AccessLost. DXGI_ERROR_ACCESS_LOST Constant WaitTimeout. DXGI_ERROR_WAIT_TIMEOUT Constant SessionDisconnected. DXGI_ERROR_SESSION_DISCONNECTED Constant RestrictToOutputStale. DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE Constant CannotProtectContent. DXGI_ERROR_CANNOT_PROTECT_CONTENT Constant AccessDenied. DXGI_ERROR_ACCESS_DENIED Constant NameAlreadyExists. DXGI_ERROR_NAME_ALREADY_EXISTS Constant SdkComponentMissing. DXGI_ERROR_SDK_COMPONENT_MISSING Constant NotCurrent. DXGI_ERROR_NOT_CURRENT Constant HwProtectionOufOfMemory. DXGI_ERROR_HW_PROTECTION_OUTOFMEMORY Constant DynamicCodePolicyViolation. DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION Constant NonCompositedUi. DXGI_ERROR_NON_COMPOSITED_UI Constant ModeChangeInProgress. DXGI_ERROR_MODE_CHANGE_IN_PROGRESS Constant CacheCorrupt. DXGI_ERROR_CACHE_CORRUPT Constant CacheFull. DXGI_ERROR_CACHE_FULL Constant CacheHashCollision. DXGI_ERROR_CACHE_HASH_COLLISION Constant AlreadyExists. DXGI_ERROR_ALREADY_EXISTS

The interface represents a display sub-system (including one or more GPU's, DACs and video memory).

This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

A display sub-system is often referred to as a video card, however, on some machines the display sub-system is part of the mother board.

To enumerate the display sub-systems, use . To get an interface to the adapter for a particular device, use . To create a software adapter, use .

Windows?Phone?8: This API is supported.

ff471329 IDXGIAdapter1 IDXGIAdapter1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets a DXGI 1.1 description of an adapter (or video card).

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the method.

ff471330 GetDesc1 GetDesc1 HRESULT IDXGIAdapter1::GetDesc1([Out] DXGI_ADAPTER_DESC1* pDesc)

Gets a DXGI 1.1 description of an adapter (or video card).

A reference to a structure that describes the adapter. This parameter must not be null. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID in the VendorId, DeviceId, SubSysId, and Revision members of and ?Software Adapter? for the description string in the Description member.

Returns if successful; otherwise, returns E_INVALIDARG if the pDesc parameter is null.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Use the GetDesc1 method to get a DXGI 1.1 description of an adapter. To get a DXGI 1.0 description, use the method.

ff471330 HRESULT IDXGIAdapter1::GetDesc1([Out] DXGI_ADAPTER_DESC1* pDesc) IDXGIAdapter1::GetDesc1

The interface represents a display subsystem, which includes one or more GPUs, DACs, and video memory.

A display subsystem is often referred to as a video card; however, on some computers, the display subsystem is part of the motherboard.

To enumerate the display subsystems, use .

To get an interface to the adapter for a particular device, use .

To create a software adapter, use .

hh404537 IDXGIAdapter2 IDXGIAdapter2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.

Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the method. To get a DXGI 1.0 description, use the method.

The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.

A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the method), which contain thread groups. The WDDM 1.2 or later driver model allows the GPU to be preempted at finer granularity levels than a DMA buffer or compute packet. You can use the GetDesc2 method to retrieve the granularity levels for graphics and compute tasks.

hh404540 GetDesc2 GetDesc2 HRESULT IDXGIAdapter2::GetDesc2([Out] DXGI_ADAPTER_DESC2* pDesc)

Gets a Microsoft DirectX Graphics Infrastructure (DXGI) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit (GPU) can be preempted from performing its current task.

A reference to a structure that describes the adapter. This parameter must not be null. On feature level 9 graphics hardware, earlier versions of GetDesc2 (GetDesc and GetDesc1) return zeros for the PCI ID in the VendorId, DeviceId, SubSysId, and Revision members of the adapter description structure and ?Software Adapter? for the description string in the Description member. GetDesc2 returns the actual feature level 9 hardware values in these members.

Returns if successful; otherwise, returns E_INVALIDARG if the pDesc parameter is null.

Use the GetDesc2 method to get a DXGI 1.2 description of an adapter. To get a DXGI 1.1 description, use the method. To get a DXGI 1.0 description, use the method.

The Windows Display Driver Model (WDDM) scheduler can preempt the GPU's execution of application tasks. The granularity at which the GPU can be preempted from performing its current task in the WDDM 1.1 or earlier driver model is a direct memory access (DMA) buffer for graphics tasks or a compute packet for compute tasks. The GPU can switch between tasks only after it completes the currently executing unit of work, a DMA buffer or a compute packet.

A DMA buffer is the largest independent unit of graphics work that the WDDM scheduler can submit to the GPU. This buffer contains a set of GPU instructions that the WDDM driver and GPU use. A compute packet is the largest independent unit of compute work that the WDDM scheduler can submit to the GPU. A compute packet contains dispatches (for example, calls to the method), which contain thread groups. The WDDM 1.2 or later driver model allows the GPU to be preempted at finer granularity levels than a DMA buffer or compute packet. You can use the GetDesc2 method to retrieve the granularity levels for graphics and compute tasks.

hh404540 HRESULT IDXGIAdapter2::GetDesc2([Out] DXGI_ADAPTER_DESC2* pDesc) IDXGIAdapter2::GetDesc2

This interface adds some memory residency methods, for budgeting and reserving physical memory.

For more details, refer to the Residency section of the D3D12 documentation.

dn933221 IDXGIAdapter3 IDXGIAdapter3
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Registers to receive notification of hardware content protection teardown events.

A handle to the event object that the operating system sets when hardware content protection teardown occurs. The CreateEvent or OpenEvent function returns this handle.

A reference to a key value that an application can pass to the method to unregister the notification event that hEvent specifies.

Call () to check for the presence of the capability to know whether the hardware contains an automatic teardown mechanism. After the event is signaled, the application can call to determine the impact of the hardware teardown for a specific interface.

dn933230 HRESULT IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent([In] void* hEvent,[Out] unsigned int* pdwCookie) IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent

Unregisters an event to stop it from receiving notification of hardware content protection teardown events.

A key value for the window or event to unregister. The method returns this value.

dn933233 void IDXGIAdapter3::UnregisterHardwareContentProtectionTeardownStatus([In] unsigned int dwCookie) IDXGIAdapter3::UnregisterHardwareContentProtectionTeardownStatus

This method informs the process of the current budget and process usage.

Specifies the device's physical adapter for which the video memory information is queried. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is queried. See Multi-Adapter.

Specifies a that identifies the group as local or non-local.

Fills in a structure with the current values.

Applications must explicitly manage their usage of physical memory explicitly and keep usage within the budget assigned to the application process. Processes that cannot kept their usage within their assigned budgets will likely experience stuttering, as they are intermittently frozen and paged-out to allow other processes to run.

dn933223 HRESULT IDXGIAdapter3::QueryVideoMemoryInfo([In] unsigned int NodeIndex,[In] DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,[Out] DXGI_QUERY_VIDEO_MEMORY_INFO* pVideoMemoryInfo) IDXGIAdapter3::QueryVideoMemoryInfo

This method sends the minimum required physical memory for an application, to the OS.

Specifies the device's physical adapter for which the video memory information is being set. For single-GPU operation, set this to zero. If there are multiple GPU nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is being set. See Multi-Adapter.

Specifies a that identifies the group as local or non-local.

Specifies a UINT64 that sets the minimum required physical memory, in bytes.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

Applications are encouraged to set a video reservation to denote the amount of physical memory they cannot go without. This value helps the OS quickly minimize the impact of large memory pressure situations.

dn933232 HRESULT IDXGIAdapter3::SetVideoMemoryReservation([In] unsigned int NodeIndex,[In] DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup,[In] unsigned longlong Reservation) IDXGIAdapter3::SetVideoMemoryReservation

This method establishes a correlation between a CPU synchronization object and the budget change event.

Specifies a HANDLE for the event.

A key value for the window or event to unregister. The method returns this value.

Instead of calling QueryVideoMemoryInfo regularly, applications can use CPU synchronization objects to efficiently wake threads when budget changes occur.

dn933231 HRESULT IDXGIAdapter3::RegisterVideoMemoryBudgetChangeNotificationEvent([In] void* hEvent,[Out] unsigned int* pdwCookie) IDXGIAdapter3::RegisterVideoMemoryBudgetChangeNotificationEvent

This method stops notifying a CPU synchronization object whenever a budget change occurs. An application may switch back to polling the information regularly.

A key value for the window or event to unregister. The method returns this value.

An application may switch back to polling for the information regularly.

dn933234 void IDXGIAdapter3::UnregisterVideoMemoryBudgetChangeNotification([In] unsigned int dwCookie) IDXGIAdapter3::UnregisterVideoMemoryBudgetChangeNotification

The interface represents a display subsystem (including one or more GPUs, DACs and video memory).

A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard.

To enumerate the display subsystems, use .

To get an interface to the adapter for a particular device, use .

To create a software adapter, use .

Windows?Phone?8: This API is supported.

bb174523 IDXGIAdapter4 IDXGIAdapter4
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. GetDesc3 GetDesc3 HRESULT IDXGIAdapter4::GetDesc3([Out] DXGI_ADAPTER_DESC3* pDesc) No documentation. No documentation. No documentation. HRESULT IDXGIAdapter4::GetDesc3([Out] DXGI_ADAPTER_DESC3* pDesc) IDXGIAdapter4::GetDesc3

Represents a swap chain that is used by desktop media apps to decode video data and show it on a DirectComposition surface.

Decode swap chains are intended for use primarily with YUV surface formats. When using decode buffers created with an RGB surface format, the TargetRect and DestSize must be set equal to the buffer dimensions. SourceRect cannot exceed the buffer dimensions.

In clone mode, the decode swap chain is only guaranteed to be shown on the primary output.

Decode swap chains cannot be used with dirty rects.

dn384109 IDXGIDecodeSwapChain IDXGIDecodeSwapChain
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets or sets the source region that is used for the swap chain.

dn384121 GetSourceRect / SetSourceRect GetSourceRect HRESULT IDXGIDecodeSwapChain::GetSourceRect([Out] RECT* pRect)

Gets or sets the rectangle that defines the target region for the video processing blit operation.

dn384122 GetTargetRect / SetTargetRect GetTargetRect HRESULT IDXGIDecodeSwapChain::GetTargetRect([Out] RECT* pRect)

Gets or sets the color space used by the swap chain.

dn384119 GetColorSpace / SetColorSpace GetColorSpace DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS IDXGIDecodeSwapChain::GetColorSpace()

Presents a frame on the output adapter. The frame is a subresource of the object that was used to create the decode swap chain.

No documentation. No documentation. No documentation.

This method returns on success, or it returns one of the following error codes:

  • E_OUTOFMEMORY
dn384123 HRESULT IDXGIDecodeSwapChain::PresentBuffer([In] unsigned int BufferToPresent,[In] unsigned int SyncInterval,[In] unsigned int Flags) IDXGIDecodeSwapChain::PresentBuffer

Sets the rectangle that defines the source region for the video processing blit operation.

The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.

A reference to a structure that contains the source region to set for the swap chain.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384126 HRESULT IDXGIDecodeSwapChain::SetSourceRect([In] const RECT* pRect) IDXGIDecodeSwapChain::SetSourceRect

Sets the rectangle that defines the target region for the video processing blit operation.

The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.

A reference to a structure that contains the target region to set for the swap chain.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384127 HRESULT IDXGIDecodeSwapChain::SetTargetRect([In] const RECT* pRect) IDXGIDecodeSwapChain::SetTargetRect

Sets the size of the destination surface to use for the video processing blit operation.

The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.

The width of the destination size, in pixels.

The height of the destination size, in pixels.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384125 HRESULT IDXGIDecodeSwapChain::SetDestSize([In] unsigned int Width,[In] unsigned int Height) IDXGIDecodeSwapChain::SetDestSize

Gets the source region that is used for the swap chain.

A reference to a structure that receives the source region for the swap chain.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384121 HRESULT IDXGIDecodeSwapChain::GetSourceRect([Out] RECT* pRect) IDXGIDecodeSwapChain::GetSourceRect

Gets the rectangle that defines the target region for the video processing blit operation.

A reference to a structure that receives the target region for the swap chain.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384122 HRESULT IDXGIDecodeSwapChain::GetTargetRect([Out] RECT* pRect) IDXGIDecodeSwapChain::GetTargetRect

Gets the size of the destination surface to use for the video processing blit operation.

A reference to a variable that receives the width in pixels.

A reference to a variable that receives the height in pixels.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384120 HRESULT IDXGIDecodeSwapChain::GetDestSize([Out] unsigned int* pWidth,[Out] unsigned int* pHeight) IDXGIDecodeSwapChain::GetDestSize

Sets the color space used by the swap chain.

A reference to a combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies the color space to set for the swap chain.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn384124 HRESULT IDXGIDecodeSwapChain::SetColorSpace([In] DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace) IDXGIDecodeSwapChain::SetColorSpace

Gets the color space used by the swap chain.

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies the color space for the swap chain.

dn384119 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS IDXGIDecodeSwapChain::GetColorSpace() IDXGIDecodeSwapChain::GetColorSpace

An interface implements a derived class for DXGI objects that produce image data.

This interface is not supported by Direct3D 12 devices. Direct3D 12 applications have direct control over their swapchain management, so better latency control should be handled by the application. You can make use of Waitable objects (refer to ) and the method if desired.

This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

The interface is designed for use by DXGI objects that need access to other DXGI objects. This interface is useful to applications that do not use Direct3D to communicate with DXGI.

The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the interface. You can query this Direct3D device object for the device's corresponding interface. To retrieve the interface of a Direct3D device, use the following code:

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
            

Windows?Phone?8: This API is supported.

ff471331 IDXGIDevice1 IDXGIDevice1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets or sets the number of frames that the system is allowed to queue for rendering.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.

ff471332 GetMaximumFrameLatency / SetMaximumFrameLatency GetMaximumFrameLatency HRESULT IDXGIDevice1::GetMaximumFrameLatency([Out] unsigned int* pMaxLatency)

Sets the number of frames that the system is allowed to queue for rendering.

The maximum number of back buffer frames that a driver can queue. The value defaults to 3, but can range from 1 to 16. A value of 0 will reset latency to the default. For multi-head devices, this value is specified per-head.

Returns if successful; otherwise, if the device was removed.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.

ff471334 HRESULT IDXGIDevice1::SetMaximumFrameLatency([In] unsigned int MaxLatency) IDXGIDevice1::SetMaximumFrameLatency

Gets the number of frames that the system is allowed to queue for rendering.

This value is set to the number of frames that can be queued for render. This value defaults to 3, but can range from 1 to 16.

Returns if successful; otherwise, returns one of the following members of the D3DERR enumerated type:

  • D3DERR_DEVICELOST
  • D3DERR_DEVICEREMOVED
  • D3DERR_DRIVERINTERNALERROR
  • D3DERR_INVALIDCALL
  • D3DERR_OUTOFVIDEOMEMORY

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.

ff471332 HRESULT IDXGIDevice1::GetMaximumFrameLatency([Out] unsigned int* pMaxLatency) IDXGIDevice1::GetMaximumFrameLatency

The interface implements a derived class for DXGI objects that produce image data. The interface exposes methods to block CPU processing until the GPU completes processing, and to offer resources to the operating system.

The interface is designed for use by DXGI objects that need access to other DXGI objects. This interface is useful to applications that do not use Direct3D to communicate with DXGI.

The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the interface. You can query this Direct3D device object for the device's corresponding interface. To retrieve the interface of a Direct3D device, use the following code:

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
            

Windows?Phone?8: This API is supported.

hh404543 IDXGIDevice2 IDXGIDevice2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Allows the operating system to free the video memory of resources by discarding their content.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

OfferResources returns:

  • if resources were successfully offered
  • E_INVALIDARG if a resource in the array or the priority is invalid

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.

To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

Note??The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources. The driver can postpone offering them until the next call to , , or .?

Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404549 HRESULT IDXGIDevice2::OfferResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority) IDXGIDevice2::OfferResources

Allows the operating system to free the video memory of resources by discarding their content.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

OfferResources returns:

  • if resources were successfully offered
  • E_INVALIDARG if a resource in the array or the priority is invalid

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.

To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

Note??The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources. The driver can postpone offering them until the next call to , , or .?

Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404549 HRESULT IDXGIDevice2::OfferResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority) IDXGIDevice2::OfferResources

Allows the operating system to free the video memory of resources by discarding their content.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

OfferResources returns:

  • if resources were successfully offered
  • E_INVALIDARG if a resource in the array or the priority is invalid

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the IDXGIDevice2::ReclaimResource method to reclaim the resource. You cannot call OfferResources to offer immutable resources.

To offer shared resources, call OfferResources on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

Note??The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources. The driver can postpone offering them until the next call to , , or .?

Platform Update for Windows?7:??The runtime validates that OfferResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404549 HRESULT IDXGIDevice2::OfferResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority) IDXGIDevice2::OfferResources

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

ReclaimResources returns:

  • if resources were successfully reclaimed
  • E_INVALIDARG if the resources are invalid

After you call to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.

To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources only while you hold the mutex.

Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404551 HRESULT IDXGIDevice2::ReclaimResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer, Optional] BOOL* pDiscarded) IDXGIDevice2::ReclaimResources

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

ReclaimResources returns:

  • if resources were successfully reclaimed
  • E_INVALIDARG if the resources are invalid

After you call to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.

To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources only while you hold the mutex.

Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404551 HRESULT IDXGIDevice2::ReclaimResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer, Optional] BOOL* pDiscarded) IDXGIDevice2::ReclaimResources

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

ReclaimResources returns:

  • if resources were successfully reclaimed
  • E_INVALIDARG if the resources are invalid

After you call to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.

To reclaim shared resources, call ReclaimResources only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources only while you hold the mutex.

Platform Update for Windows?7:??The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404551 HRESULT IDXGIDevice2::ReclaimResources([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer, Optional] BOOL* pDiscarded) IDXGIDevice2::ReclaimResources

Flushes any outstanding rendering commands and sets the specified event object to the signaled state after all previously submitted rendering commands complete.

A handle to the event object. The CreateEvent or OpenEvent function returns this handle. All types of event objects (manual-reset, auto-reset, and so on) are supported.

The handle must have the EVENT_MODIFY_STATE access right. For more information about access rights, see Synchronization Object Security and Access Rights.

Returns if successful; otherwise, returns one of the following values:

  • E_OUTOFMEMORY if insufficient memory is available to complete the operation.
  • E_INVALIDARG if the parameter was validated and determined to be incorrect.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, EnqueueSetEvent fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

EnqueueSetEvent calls the SetEvent function on the event object after all previously submitted rendering commands complete or the device is removed.

After an application calls EnqueueSetEvent, it can immediately call the WaitForSingleObject function to put itself to sleep until rendering commands complete.

You cannot use EnqueueSetEvent to determine work completion that is associated with presentation (); instead, we recommend that you use .

hh404546 HRESULT IDXGIDevice2::EnqueueSetEvent([In] void* hEvent) IDXGIDevice2::EnqueueSetEvent

The interface implements a derived class for DXGI objects that produce image data. The interface exposes a method to trim graphics memory usage by the DXGI device.

The interface is designed for use by DXGI objects that need access to other DXGI objects. This interface is useful to applications that do not use Direct3D to communicate with DXGI.

The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the interface. You can query this Direct3D device object for the device's corresponding interface. To retrieve the interface of a Direct3D device, use the following code:

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);

Windows?Phone?8: This API is supported.

dn280345 IDXGIDevice3 IDXGIDevice3
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Trims the graphics memory allocated by the DXGI device on the app's behalf.

For apps that render with DirectX, graphics drivers periodically allocate internal memory buffers in order to speed up subsequent rendering requests. These memory allocations count against the app's memory usage for PLM and in general lead to increased memory usage by the overall system.

Starting in Windows?8.1, apps that render with Direct2D and/or Direct3D (including CoreWindow and XAML interop) must call Trim in response to the PLM suspend callback. The Direct3D runtime and the graphics driver will discard internal memory buffers allocated for the app, reducing its memory footprint.

Calling this method does not change the rendering state of the graphics device and it has no effect on rendering operations. There is a brief performance hit when internal buffers are reallocated during the first rendering operations after the Trim call, therefore apps should only call Trim when going idle for a period of time (in response to PLM suspend, for example).

Apps should ensure that they call Trim as one of the last D3D operations done before going idle. Direct3D will normally defer the destruction of D3D objects. Calling Trim, however, forces Direct3D to destroy objects immediately. For this reason, it is not guaranteed that releasing the final reference on Direct3D objects after calling Trim will cause the object to be destroyed and memory to be deallocated before the app suspends.

Similar to , apps should call before calling Trim. ClearState clears the Direct3D pipeline bindings, ensuring that Direct3D does not hold any references to the Direct3D objects you are trying to release.

It is also prudent to release references on middleware before calling Trim, as that middleware may also need to release references to Direct3D objects.

dn280346 void IDXGIDevice3::Trim() IDXGIDevice3::Trim

An interface implements a derived class for DXGI objects that produce image data.

The interface is designed for use by DXGI objects that need access to other DXGI objects. This interface is useful to applications that do not use Direct3D to communicate with DXGI.

The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the interface. You can query this Direct3D device object for the device's corresponding interface. To retrieve the interface of a Direct3D device, use the following code:

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);	
            

Windows?Phone?8: This API is supported.

bb174527 IDXGIDevice4 IDXGIDevice4
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

Specifies the .

This method returns an success or error code, which can include E_INVALIDARG if a resource in the array, or the priority, is invalid.

OfferResources1 (an extension of the original API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions. A de-committed allocation cannot be reused, so opting in to the new flag means the new reclaim results must be properly handled. Refer to the flag descriptions in and the Example below.

OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources.

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.

To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources1 only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to , , or .

mt732705 HRESULT IDXGIDevice4::OfferResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority,[In] unsigned int Flags) IDXGIDevice4::OfferResources1

Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

Specifies the .

This method returns an success or error code, which can include E_INVALIDARG if a resource in the array, or the priority, is invalid.

OfferResources1 (an extension of the original API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions. A de-committed allocation cannot be reused, so opting in to the new flag means the new reclaim results must be properly handled. Refer to the flag descriptions in and the Example below.

OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources.

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.

To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources1 only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to , , or .

mt732705 HRESULT IDXGIDevice4::OfferResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority,[In] unsigned int Flags) IDXGIDevice4::OfferResources1

Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.

The number of resources in the ppResources argument array.

An array of references to interfaces for the resources to offer.

A -typed value that indicates how valuable data is.

Specifies the .

This method returns an success or error code, which can include E_INVALIDARG if a resource in the array, or the priority, is invalid.

OfferResources1 (an extension of the original API) enables D3D based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions. A de-committed allocation cannot be reused, so opting in to the new flag means the new reclaim results must be properly handled. Refer to the flag descriptions in and the Example below.

OfferResources1 and ReclaimResources1 may not be used interchangeably with OfferResources and ReclaimResources.

The priority value that the Priority parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.

If you call OfferResources1 to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call OfferResources1 on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the ReclaimResources1 method to reclaim the resource. You cannot call OfferResources1 to offer immutable resources.

To offer shared resources, call OfferResources1 on only one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call OfferResources1 only while you hold the mutex. In fact, you can't offer shared resources unless you use because offering shared resources without using isn't supported.

The user mode display driver might not immediately offer the resources that you specified in a call to OfferResources1. The driver can postpone offering them until the next call to , , or .

mt732705 HRESULT IDXGIDevice4::OfferResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[In] DXGI_OFFER_RESOURCE_PRIORITY Priority,[In] unsigned int Flags) IDXGIDevice4::OfferResources1

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

This method returns an success or error code, including E_INVALIDARG if the resources are invalid.

After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.

To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources1 only while you hold the mutex.

mt732706 HRESULT IDXGIDevice4::ReclaimResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer] DXGI_RECLAIM_RESOURCE_RESULTS* pResults) IDXGIDevice4::ReclaimResources1

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

This method returns an success or error code, including E_INVALIDARG if the resources are invalid.

After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.

To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources1 only while you hold the mutex.

mt732706 HRESULT IDXGIDevice4::ReclaimResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer] DXGI_RECLAIM_RESOURCE_RESULTS* pResults) IDXGIDevice4::ReclaimResources1

Restores access to resources that were previously offered by calling .

No documentation. No documentation. No documentation.

This method returns an success or error code, including E_INVALIDARG if the resources are invalid.

After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.

To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an object and then call ReclaimResources1 only while you hold the mutex.

mt732706 HRESULT IDXGIDevice4::ReclaimResources1([In] unsigned int NumResources,[In, Buffer] const IDXGIResource** ppResources,[Out, Buffer] DXGI_RECLAIM_RESOURCE_RESULTS* pResults) IDXGIDevice4::ReclaimResources1

The interface exposes methods to indicate user preference for the operating system's stereoscopic 3D display behavior and to set stereoscopic 3D display status to enable or disable.

We recommend that you not use to query or set system-wide stereoscopic 3D settings in your stereoscopic 3D apps. Instead, for your windowed apps, call the method to determine whether to render in stereo; for your full-screen apps, call the method and then determine whether any of the returned display modes support rendering in stereo.

Note?? The interface is only used by the Display app of the operating system's Control Panel or by control applets from third party graphics vendors. This interface is not meant for developers of end-user apps.?Note?? The interface does not exist for Windows Store apps.?

Call QueryInterface from a factory object (, or ) to retrieve the interface. The following code shows how.

 * pDXGIDisplayControl;	
            hr = g_pDXGIFactory->QueryInterface(__uuidof(), (void **)&pDXGIDisplayControl);

The operating system processes changes to stereo-enabled configuration asynchronously. Therefore, these changes might not be immediately visible in every process that calls to query for stereo configuration. Control applets can use the or method to register for notifications of all stereo configuration changes.

Platform Update for Windows?7:?? Stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404552 IDXGIDisplayControl IDXGIDisplayControl
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.

You pass a Boolean value to the method to either enable or disable the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and disables it.

hh404553 IsStereoEnabled IsStereoEnabled BOOL IDXGIDisplayControl::IsStereoEnabled()

Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404554 SetStereoEnabled SetStereoEnabled void IDXGIDisplayControl::SetStereoEnabled([In] BOOL enabled)

Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.

IsStereoEnabled returns TRUE when the operating system's stereoscopic 3D display behavior is enabled and when this behavior is disabled.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsStereoEnabled always returns because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

You pass a Boolean value to the method to either enable or disable the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and disables it.

hh404553 BOOL IDXGIDisplayControl::IsStereoEnabled() IDXGIDisplayControl::IsStereoEnabled

Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.

A Boolean value that either enables or disables the operating system's stereoscopic 3D display behavior. TRUE enables the operating system's stereoscopic 3D display behavior and disables it.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetStereoEnabled doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh404554 void IDXGIDisplayControl::SetStereoEnabled([In] BOOL enabled) IDXGIDisplayControl::SetStereoEnabled

Enables creating Microsoft DirectX Graphics Infrastructure (DXGI) objects.

dn457942 IDXGIFactory3 IDXGIFactory3
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.

The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1, , or D3D11CreateDeviceAndSwapChain.

dn457943 GetCreationFlags GetCreationFlags unsigned int IDXGIFactory3::GetCreationFlags()

Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure (DXGI) object was created.

The creation flags.

The GetCreationFlags method returns flags that were passed to the CreateDXGIFactory2 function, or were implicitly constructed by CreateDXGIFactory, CreateDXGIFactory1, , or D3D11CreateDeviceAndSwapChain.

dn457943 unsigned int IDXGIFactory3::GetCreationFlags() IDXGIFactory3::GetCreationFlags

This interface enables a single method to support variable refresh rate displays.

mt722566 IDXGIFactory5 IDXGIFactory5
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Used to check for hardware feature support.

Specifies one member of to query support for.

Specifies a reference to a buffer that will be filled with data that describes the feature support.

The size, in bytes, of pFeatureSupportData.

This method returns an success or error code.

Refer to the description of .

mt722567 HRESULT IDXGIFactory5::CheckFeatureSupport([In] DXGI_FEATURE Feature,[Out, Buffer] void* pFeatureSupportData,[In] unsigned int FeatureSupportDataSize) IDXGIFactory5::CheckFeatureSupport

Creates swap chains for desktop media apps that use DirectComposition surfaces to decode and display video.

To create a Microsoft DirectX Graphics Infrastructure (DXGI) media factory interface, pass into either the CreateDXGIFactory or CreateDXGIFactory1 function or call QueryInterface from a factory object returned by CreateDXGIFactory, CreateDXGIFactory1, or CreateDXGIFactory2.

Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the , , , or interface from the Direct3D device and then use the method to locate the factory. The following code shows how.

 * pDXGIDevice;	
            hr = g_pd3dDevice->QueryInterface(__uuidof(), (void **)&pDXGIDevice);  * pDXGIAdapter;	
            hr = pDXGIDevice->GetParent(__uuidof(), (void **)&pDXGIAdapter);  * pIDXGIFactory;	
            pDXGIAdapter->GetParent(__uuidof(), (void **)&pIDXGIFactory);
dn384128 IDXGIFactoryMedia IDXGIFactoryMedia
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Creates a YUV swap chain for an existing DirectComposition surface handle.

No documentation. No documentation. No documentation. No documentation. No documentation.

CreateSwapChainForCompositionSurfaceHandle returns:

  • if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if the calling application provided invalid data, for example, if pDesc, pYuvDecodeBuffers, or ppSwapChain is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.
dn384130 HRESULT IDXGIFactoryMedia::CreateSwapChainForCompositionSurfaceHandle([In] IUnknown* pDevice,[In, Optional] void* hSurface,[In] const DXGI_SWAP_CHAIN_DESC1* pDesc,[In, Optional] IDXGIOutput* pRestrictToOutput,[Out] IDXGISwapChain1** ppSwapChain) IDXGIFactoryMedia::CreateSwapChainForCompositionSurfaceHandle

Creates a YUV swap chain for an existing DirectComposition surface handle. The swap chain is created with pre-existing buffers and very few descriptive elements are required. Instead, this method requires a DirectComposition surface handle and an buffer to hold decoded frame data. The swap chain format is determined by the format of the subresources of the .

No documentation. No documentation. No documentation. No documentation. No documentation. No documentation.

CreateDecodeSwapChainForCompositionSurfaceHandle returns:

  • if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • if the calling application provided invalid data, for example, if pDesc, pYuvDecodeBuffers, or ppSwapChain is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.

The provided via the pYuvDecodeBuffers parameter must point to at least one subresource, and all subresources must be created with the flag.

dn384129 HRESULT IDXGIFactoryMedia::CreateDecodeSwapChainForCompositionSurfaceHandle([In] IUnknown* pDevice,[In, Optional] void* hSurface,[In] DXGI_DECODE_SWAP_CHAIN_DESC* pDesc,[In] IDXGIResource* pYuvDecodeBuffers,[In, Optional] IDXGIOutput* pRestrictToOutput,[Out] IDXGIDecodeSwapChain** ppSwapChain) IDXGIFactoryMedia::CreateDecodeSwapChainForCompositionSurfaceHandle

Enables performing bulk operations across all SurfaceImageSource objects created in the same process.

dn448959 ISurfaceImageSourceManagerNative ISurfaceImageSourceManagerNative
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Flushes all current GPU work for all SurfaceImageSource or VirtualSurfaceImageSource objects associated with the given device.

No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

The FlushAllSurfacesWithDevice method flushes current GPU work for all SurfaceImageSource objects that were created with device. This GPU work includes Direct2D rendering work and internal GPU work done by the framework associated with rendering. This is useful if an application has created multiple SurfaceImageSource objects and needs to flush the GPU work for all of these surfaces from the background rendering thread. By flushing this work from the background thread the work can be better parallelized, with work being done on the UI thread to improve performance.

You can call the FlushAllSurfacesWithDevice method from a non-UI thread.

dn448960 HRESULT ISurfaceImageSourceManagerNative::FlushAllSurfacesWithDevice([In] IUnknown* device) ISurfaceImageSourceManagerNative::FlushAllSurfacesWithDevice

Provides the implementation of a shared fixed-size surface for Direct2D drawing.

Note??If the surface is larger than the screen size, use instead.?

This interface provides the native implementation of the SurfaceImageSource Windows runtime type. To obtain a reference to , you must cast a SurfaceImageSource instance to IInspectable or , and call QueryInterface.

 Microsoft::WRL::ComPtr<>	m_sisNative;	
            // ...	
            IInspectable* sisInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(surfaceImageSource);	
            sisInspectable->QueryInterface(__uuidof(), (void **)&m_sisNative) 
hh848322 ISurfaceImageSourceNative ISurfaceImageSourceNative
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the DXGI device, created with , that will draw the surface. This method must be called from the UI thread.

hh848325 SetDevice SetDevice HRESULT ISurfaceImageSourceNative::SetDevice([In] IDXGIDevice* device)

Sets the DXGI device, created with , that will draw the surface. This method must be called from the UI thread.

Pointer to the DXGI device interface.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848325 HRESULT ISurfaceImageSourceNative::SetDevice([In] IDXGIDevice* device) ISurfaceImageSourceNative::SetDevice

Opens the supplied DXGI surface for drawing.

The region of the surface that will be drawn into.

Receives the point (x,y) offset of the surface that will be drawn into.

Receives a reference to the surface for drawing.

If the app window that contains the SurfaceImageSource isn't active, like when it's suspended, calling the BeginDraw method returns an error.

hh848323 HRESULT ISurfaceImageSourceNative::BeginDraw([In] RECT updateRect,[Out] IDXGISurface** surface,[Out] POINT* offset) ISurfaceImageSourceNative::BeginDraw

Closes the surface draw operation.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848324 HRESULT ISurfaceImageSourceNative::EndDraw() ISurfaceImageSourceNative::EndDraw

Provides the implementation of a shared Microsoft DirectX surface which is displayed in a SurfaceImageSource or VirtualSurfaceImageSource.

The interface provides the native implementation of the SurfaceImageSource class. To get a reference to the interface, you must cast a SurfaceImageSource instance to IInspectable or , and call the QueryInterface method.

 Microsoft::WRL::ComPtr<>	m_sisD2DNative;	
            // ...	
            IInspectable* sisInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(surfaceImageSource);	
            sisInspectable->QueryInterface(__uuidof(), (void **)&m_sisD2DNative) 

The interface provides high-performance batched Direct2D drawing, which enables drawing to multiple different SurfaceImageSource or VirtualSurfaceImageSource objects in the same batch, as long as they share the same Direct2D device. Batching can improve performance when updating multiple surfaces at the same time.

The interface enables drawing to a SurfaceImageSource or VirtualSurfaceImageSource from one or more background threads, which allows high-performance DirectX rendering off the UI thread.

Only call the SetDevice, BeginDraw, and EndDraw methods on interface, not on the or interfaces.

In order to support batching updates to multiple surfaces to improve performance, you can pass an to the SetDevice method, instead of an . The BeginDraw method can then optionally return a shared , which the app uses to draw all content for that update.

To draw to the surface from a background thread, you must set any DirectX resources, including the Microsoft Direct3D device, Direct3D device context, Direct2D device, and Direct2D device context, to enable multithreading support.

You can call the BeginDraw, SuspendDraw, and ResumeDraw methods from any background thread to enable high-performance multithreaded drawing.

Always call the EndDraw method on the UI thread in order to synchronize updating the DirectX content with the current XAML UI thread frame. You can call BeginDraw on a background thread, call SuspendDraw when you're done drawing on the background thread, and call EndDraw on the UI thread.

Use SuspendDraw and ResumeDraw to suspend and resume drawing on any background or UI thread.

Handle the SurfaceContentsLost event to determine when you need to recreate content which may be lost if the system resets the GPU.

dn302137 ISurfaceImageSourceNativeWithD2D ISurfaceImageSourceNativeWithD2D
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with , that will draw the surface.

dn302141 SetDevice SetDevice HRESULT ISurfaceImageSourceNativeWithD2D::SetDevice([In] IUnknown* device)

Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with , that will draw the surface.

Pointer to the DXGI device interface. You can pass an to signal that this surface participates in Direct2D batching to improve performance when updating Direct2D content across multiple surfaces. The device must have multithreading supported enabled if the app draws to the surface from a background thread.

This method fails when the SurfaceImageSource is larger than the maximum texture size supported by the Direct3D device. Apps should use VirtualSurfaceImageSource for surfaces larger than the maximum texture size supported by the Direct3D device.

dn302141 HRESULT ISurfaceImageSourceNativeWithD2D::SetDevice([In] IUnknown* device) ISurfaceImageSourceNativeWithD2D::SetDevice

Initiates an update to the associated SurfaceImageSource or VirtualSurfaceImageSource.

No documentation. No documentation. No documentation. No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

dn302138 HRESULT ISurfaceImageSourceNativeWithD2D::BeginDraw([In] const RECT& updateRect,[In] const GUID& iid,[Out] void** updateObject,[Out] POINT* offset) ISurfaceImageSourceNativeWithD2D::BeginDraw

Closes the surface draw operation.

If this method succeeds, it returns . Otherwise, it returns an error code.

Always call the EndDraw method on the UI thread in order to synchronize updating the Microsoft DirectX content with the current XAML UI thread frame.

dn302139 HRESULT ISurfaceImageSourceNativeWithD2D::EndDraw() ISurfaceImageSourceNativeWithD2D::EndDraw

Suspends the drawing operation.

If this method succeeds, it returns . Otherwise, it returns an error code.

dn302142 HRESULT ISurfaceImageSourceNativeWithD2D::SuspendDraw() ISurfaceImageSourceNativeWithD2D::SuspendDraw

Resume the drawing operation.

If this method succeeds, it returns . Otherwise, it returns an error code.

dn302140 HRESULT ISurfaceImageSourceNativeWithD2D::ResumeDraw() ISurfaceImageSourceNativeWithD2D::ResumeDraw
No documentation. ISwapChainBackgroundPanelNative ISwapChainBackgroundPanelNative Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the DirectX swap chain for SwapChainBackgroundPanel.

hh848327 SetSwapChain SetSwapChain HRESULT ISwapChainBackgroundPanelNative::SetSwapChain([In] IDXGISwapChain* swapChain)

Sets the DirectX swap chain for SwapChainBackgroundPanel.

No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848327 HRESULT ISwapChainBackgroundPanelNative::SetSwapChain([In] IDXGISwapChain* swapChain) ISwapChainBackgroundPanelNative::SetSwapChain

Provides interoperation between XAML and a DirectX swap chain. Unlike SwapChainBackgroundPanel, a SwapChainPanel can appear at any level in the XAML display tree, and more than 1 can be present in any given tree.

This interface provides the native implementation of the Windows::UI::XAML::Control::SwapChainPanel Windows Runtime type. To obtain a reference to , you must cast a SwapChainPanel instance to IInspectable or , and call QueryInterface.

 Microsoft::WRL::ComPtr<>	m_swapChainNative;	
            // ...	
            IInspectable* panelInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(swapChainPanel);	
            panelInspectable->QueryInterface(__uuidof(), (void **)&m_swapChainNative); 
dn302143 ISwapChainPanelNative ISwapChainPanelNative
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the DirectX swap chain for SwapChainPanel.

dn302144 SetSwapChain SetSwapChain HRESULT ISwapChainPanelNative::SetSwapChain([In] IDXGISwapChain* swapChain)

Sets the DirectX swap chain for SwapChainPanel.

No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

dn302144 HRESULT ISwapChainPanelNative::SetSwapChain([In] IDXGISwapChain* swapChain) ISwapChainPanelNative::SetSwapChain

Provides interoperation between XAML and a DirectX swap chain. Unlike SwapChainBackgroundPanel, a SwapChainPanel can appear at any level in the XAML display tree, and more than 1 can be present in any given tree.

This interface provides the native implementation of the Windows::UI::XAML::Control::SwapChainPanel Windows Runtime type. To obtain a reference to , you must cast a SwapChainPanel instance to IInspectable or , and call QueryInterface.

 Microsoft::WRL::ComPtr<>	m_swapChainNative2;	
            // ...	
            IInspectable* panelInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(swapChainPanel);	
            panelInspectable->QueryInterface(__uuidof(), (void **)&m_swapChainNative2); 
dn858172 ISwapChainPanelNative2 ISwapChainPanelNative2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.

SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.

XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the interface from a SwapChainPanel instance and calling SetSwapChain( *swapChain).

This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.

 <!-- XAML markup --> 	
            <Page>  <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> 	
            </Page>  // Definitions 	
            ComPtr<> m_swapChain; 	
            HANDLE m_swapChainHandle; 	
            ComPtr<> m_d3dDevice; 	
            ComPtr<> dxgiAdapter; 	
            ComPtr<> dxgiFactory; 	
            ComPtr<> dxgiFactoryMedia; 	
            ComPtr<> dxgiDevice; 	
             swapChainDesc = {0};  // Get DXGI factory (assume standard boilerplate has created D3D11Device) 	
            m_d3dDevice.As(&dxgiDevice); 	
            dxgiDevice->GetAdapter(&dxgiAdapter); 	
            dxgiAdapter->GetParent(__uuidof(), &dxgiFactory);  // Create swap chain and get handle 	
            (GENERIC_ALL, nullptr, &m_swapChainHandle); 	
            dxgiFactory.As(&dxgiFactoryMedia); 	
            dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle(  m_d3dDevice.Get(),  m_swapChainHandle,  &swapChainDesc,  nullptr,  &m_swapChain 	
            );  // Set swap chain to display in a SwapChainPanel 	
            ComPtr<> panelNative; 	
            reinterpret_cast<*>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); 	
            panelNative->SetSwapChainHandle(m_swapChainHandle);  
dn858173 SetSwapChainHandle SetSwapChainHandle HRESULT ISwapChainPanelNative2::SetSwapChainHandle([In] void* swapChainHandle)

Sets the DirectX swap chain for SwapChainPanel using a handle to the swap chain.

No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

SetSwapChain(HANDLE swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.

XAML supports setting a DXGI swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the interface from a SwapChainPanel instance and calling SetSwapChain( *swapChain).

This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a XAML SwapChainPanel in the foreground app.

 <!-- XAML markup --> 	
            <Page>  <SwapChainPanel x:Name=?captureStreamDisplayPanel? /> 	
            </Page>  // Definitions 	
            ComPtr<> m_swapChain; 	
            HANDLE m_swapChainHandle; 	
            ComPtr<> m_d3dDevice; 	
            ComPtr<> dxgiAdapter; 	
            ComPtr<> dxgiFactory; 	
            ComPtr<> dxgiFactoryMedia; 	
            ComPtr<> dxgiDevice; 	
             swapChainDesc = {0};  // Get DXGI factory (assume standard boilerplate has created D3D11Device) 	
            m_d3dDevice.As(&dxgiDevice); 	
            dxgiDevice->GetAdapter(&dxgiAdapter); 	
            dxgiAdapter->GetParent(__uuidof(), &dxgiFactory);  // Create swap chain and get handle 	
            (GENERIC_ALL, nullptr, &m_swapChainHandle); 	
            dxgiFactory.As(&dxgiFactoryMedia); 	
            dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle(  m_d3dDevice.Get(),  m_swapChainHandle,  &swapChainDesc,  nullptr,  &m_swapChain 	
            );  // Set swap chain to display in a SwapChainPanel 	
            ComPtr<> panelNative; 	
            reinterpret_cast<*>(captureStreamDisplayPanel)->QueryInterface(IID_PPV_ARGS(&panelNative))); 	
            panelNative->SetSwapChainHandle(m_swapChainHandle);  
dn858173 HRESULT ISwapChainPanelNative2::SetSwapChainHandle([In] void* swapChainHandle) ISwapChainPanelNative2::SetSwapChainHandle

Provides an interface for the implementation of drawing behaviors when a VirtualSurfaceImageSource requests an update.

This interface is implemented by the developer to provide specific drawing behaviors for updates to a VirtualSurfaceImageSource. Classes that implement this interface are provided to the , which calls the UpdatesNeeded method implementation whenever an update is requested.

hh848336 IVirtualSurfaceImageSourceNative IVirtualSurfaceImageSourceNative
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets the boundaries of the visible region of the shared surface.

hh848331 GetVisibleBounds GetVisibleBounds HRESULT IVirtualSurfaceImageSourceNative::GetVisibleBounds([Out] RECT* bounds)

Invalidates a specific region of the shared surface for drawing.

The region of the surface to invalidate.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848332 HRESULT IVirtualSurfaceImageSourceNative::Invalidate([In] RECT updateRect) IVirtualSurfaceImageSourceNative::Invalidate

Gets the total number of regions of the surface that must be updated.

Receives the number of regions to update.

hh848329 HRESULT IVirtualSurfaceImageSourceNative::GetUpdateRectCount([Out] unsigned int* count) IVirtualSurfaceImageSourceNative::GetUpdateRectCount

Gets the set of regions that must be updated on the shared surface.

The number of regions that must be updated. You obtain this by calling GetUpdateRectCount.

Receives a list of regions that must be updated.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848330 HRESULT IVirtualSurfaceImageSourceNative::GetUpdateRects([Out, Buffer] RECT* updates,[In] unsigned int count) IVirtualSurfaceImageSourceNative::GetUpdateRects

Gets the boundaries of the visible region of the shared surface.

Receives a rectangle that specifies the visible region of the shared surface.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848331 HRESULT IVirtualSurfaceImageSourceNative::GetVisibleBounds([Out] RECT* bounds) IVirtualSurfaceImageSourceNative::GetVisibleBounds

Registers for the callback that will perform the drawing when an update to the shared surface is requested.

Pointer to an implementation of .

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848334 HRESULT IVirtualSurfaceImageSourceNative::RegisterForUpdatesNeeded([In, Optional] IVirtualSurfaceUpdatesCallbackNative* callback) IVirtualSurfaceImageSourceNative::RegisterForUpdatesNeeded

Resizes the surface.

The updated width of the surface.

The updated height of the surface.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh848335 HRESULT IVirtualSurfaceImageSourceNative::Resize([In] int newWidth,[In] int newHeight) IVirtualSurfaceImageSourceNative::Resize
Gets the set of regions that must be updated on the shared surface. Event fired when an update is needed. Use to get the region to update.

Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.

This method is implemented by the developer.

hh848337 IVirtualSurfaceUpdatesCallbackNative IVirtualSurfaceUpdatesCallbackNative
Callback method for IVirtualSurfaceUpdatesCallbackNative HRESULT IVirtualSurfaceUpdatesCallbackNative::UpdatesNeeded()

Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.

This method is implemented by the developer.

hh848337 IVirtualSurfaceUpdatesCallbackNative IVirtualSurfaceUpdatesCallbackNative
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Performs the drawing behaviors when an update to VirtualSurfaceImageSource is requested.

If this method succeeds, it returns . Otherwise, it returns an error code.

This method is implemented by the developer.

hh848337 HRESULT IVirtualSurfaceUpdatesCallbackNative::UpdatesNeeded() IVirtualSurfaceUpdatesCallbackNative::UpdatesNeeded

Represents a keyed mutex, which allows exclusive access to a shared resource that is used by multiple devices.

The is required to create a resource capable of supporting the interface.

An should be retrieved for each device sharing a resource. In Direct3D 10.1, such a resource that is shared between two or more devices is created with the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX flag. In Direct3D 11, such a resource that is shared between two or more devices is created with the flag.

For information about creating a keyed mutex, see the method.

ff471338 IDXGIKeyedMutex IDXGIKeyedMutex
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Using a key, acquires exclusive rendering access to a shared resource.

A value that indicates which device to give access to. This method will succeed when the device that currently owns the surface calls the method using the same value. This value can be any UINT64 value.

The time-out interval, in milliseconds. This method will return if the interval elapses, and the keyed mutex has not been released using the specified Key. If this value is set to zero, the AcquireSync method will test to see if the keyed mutex has been released and returns immediately. If this value is set to INFINITE, the time-out interval will never elapse.

Return if successful.

If the owning device attempted to create another keyed mutex on the same shared resource, AcquireSync returns E_FAIL.

AcquireSync can also return the following DWORD constants. Therefore, you should explicitly check for these constants. If you only use the SUCCEEDED macro on the return value to determine if AcquireSync succeeded, you will not catch these constants.

  • WAIT_ABANDONED - The shared surface and keyed mutex are no longer in a consistent state. If AcquireSync returns this value, you should release and recreate both the keyed mutex and the shared surface.
  • WAIT_TIMEOUT - The time-out interval elapsed before the specified key was released.

The AcquireSync method creates a lock to a surface that is shared between multiple devices, allowing only one device to render to a surface at a time. This method uses a key to determine which device currently has exclusive access to the surface.

When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the AcquireSync method before rendering to the surface. You must call the ReleaseSync method when you are done rendering to a surface.

To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the interface. For more information about acquiring this reference, see the following code example.

The AcquireSync method uses the key as follows, depending on the state of the surface:

  • On initial creation, the surface is unowned and any device can call the AcquireSync method to gain access. For an unowned device, only a key of 0 will succeed. Calling the AcquireSync method for any other key will stall the calling CPU thread.
  • If the surface is owned by a device when you call the AcquireSync method, the CPU thread that called the AcquireSync method will stall until the owning device calls the ReleaseSync method using the same Key.
  • If the surface is unowned when you call the AcquireSync method (for example, the last owning device has already called the ReleaseSync method), the AcquireSync method will succeed if you specify the same key that was specified when the ReleaseSync method was last called. Calling the AcquireSync method using any other key will cause a stall.
  • When the owning device calls the ReleaseSync method with a particular key, and more than one device is waiting after calling the AcquireSync method using the same key, any one of the waiting devices could be woken up first. The order in which devices are woken up is undefined.
  • A keyed mutex does not support recursive calls to the AcquireSync method.
ff471339 HRESULT IDXGIKeyedMutex::AcquireSync([In] unsigned longlong Key,[In] unsigned int dwMilliseconds) IDXGIKeyedMutex::AcquireSync

Using a key, releases exclusive rendering access to a shared resource.

A value that indicates which device to give access to. This method succeeds when the device that currently owns the surface calls the ReleaseSync method using the same value. This value can be any UINT64 value.

Returns if successful.

If the device attempted to release a keyed mutex that is not valid or owned by the device, ReleaseSync returns E_FAIL.

The ReleaseSync method releases a lock to a surface that is shared between multiple devices. This method uses a key to determine which device currently has exclusive access to the surface.

When a surface is created using the D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX value of the D3D10_RESOURCE_MISC_FLAG enumeration, you must call the method before rendering to the surface. You must call the ReleaseSync method when you are done rendering to a surface.

After you call the ReleaseSync method, the shared resource is unset from the rendering pipeline.

To acquire a reference to the keyed mutex object of a shared resource, call the QueryInterface method of the resource and pass in the UUID of the interface. For more information about acquiring this reference, see the following code example.

ff471340 HRESULT IDXGIKeyedMutex::ReleaseSync([In] unsigned longlong Key) IDXGIKeyedMutex::ReleaseSync

An interface represents an adapter output (such as a monitor).

To see the outputs available, use . To see the specific output that the swap chain will update, use .

bb174546 IDXGIOutput IDXGIOutput
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Get a description of the output.

On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.

bb174548 GetDesc GetDesc HRESULT IDXGIOutput::GetDesc([Out] DXGI_OUTPUT_DESC* pDesc)

Gets a description of the gamma-control capabilities.

Note??Calling this method is only supported while in full-screen mode.?

For info about using gamma correction, see Using gamma correction.

bb174553 GetGammaControlCapabilities GetGammaControlCapabilities HRESULT IDXGIOutput::GetGammaControlCapabilities([Out] DXGI_GAMMA_CONTROL_CAPABILITIES* pGammaCaps)

Gets or sets the gamma control settings.

Note??Calling this method is only supported while in full-screen mode.?

For info about using gamma correction, see Using gamma correction.

bb174552 GetGammaControl / SetGammaControl GetGammaControl HRESULT IDXGIOutput::GetGammaControl([Out] DXGI_GAMMA_CONTROL* pArray)

Gets statistics about recently rendered frames.

This API is similar to .

Note??Calling this method is only supported while in full-screen mode.?
bb174551 GetFrameStatistics GetFrameStatistics HRESULT IDXGIOutput::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats)

Get a description of the output.

A reference to the output description (see ).

Returns a code that indicates success or failure. if successful, if pDesc is passed in as null.

On a high DPI desktop, GetDesc returns the visualized screen size unless the app is marked high DPI aware. For info about writing DPI-aware Win32 apps, see High DPI.

bb174548 HRESULT IDXGIOutput::GetDesc([Out] DXGI_OUTPUT_DESC* pDesc) IDXGIOutput::GetDesc

[Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use , which supports stereo display mode.]

Gets the display modes that match the requested format and other input options.

No documentation. No documentation. No documentation. No documentation.

Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case is returned (if there is not enough room for all the display modes). If GetDisplayModeList is called from a Remote Desktop Services session (formerly Terminal Services session), is returned.

In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).

As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.

 UINT num = 0;	
             format = ;	
            UINT flags         = ; pOutput->GetDisplayModeList( format, flags, &num, 0); ...  * pDescs = new [num];	
            pOutput->GetDisplayModeList( format, flags, &num, pDescs); 
bb174549 HRESULT IDXGIOutput::GetDisplayModeList([In] DXGI_FORMAT EnumFormat,[In] unsigned int Flags,[InOut] unsigned int* pNumModes,[Out, Buffer, Optional] DXGI_MODE_DESC* pDesc) IDXGIOutput::GetDisplayModeList

[Starting with Direct3D 11.1, we recommend not to use FindClosestMatchingMode anymore to find the display mode that most closely matches the requested display mode. Instead, use , which supports stereo display mode.]

Finds the display mode that most closely matches the requested display mode.

No documentation. No documentation. No documentation.

Returns one of the following DXGI_ERROR.

FindClosestMatchingMode behaves similarly to the except FindClosestMatchingMode considers only the mono display modes. considers only stereo modes if you set the Stereo member in the structure that pModeToMatch points to, and considers only mono modes if Stereo is not set.

returns a matched display-mode set with only stereo modes or only mono modes. FindClosestMatchingMode behaves as though you specified the input mode as mono.

bb174547 HRESULT IDXGIOutput::FindClosestMatchingMode([In] const DXGI_MODE_DESC* pModeToMatch,[Out] DXGI_MODE_DESC* pClosestMatch,[In, Optional] IUnknown* pConcernedDevice) IDXGIOutput::FindClosestMatchingMode

Halt a thread until the next vertical blank occurs.

Returns one of the following DXGI_ERROR.

A vertical blank occurs when the raster moves from the lower right corner to the upper left corner to begin drawing the next frame.

bb174559 HRESULT IDXGIOutput::WaitForVBlank() IDXGIOutput::WaitForVBlank

Takes ownership of an output.

A reference to the interface of a device (such as an ID3D10Device).

Set to TRUE to enable other threads or applications to take ownership of the device; otherwise, set to .

Returns one of the DXGI_ERROR values.

When you are finished with the output, call .

TakeOwnership should not be called directly by applications, since results will be unpredictable. It is called implicitly by the DXGI swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.

bb174558 HRESULT IDXGIOutput::TakeOwnership([In] IUnknown* pDevice,[In] BOOL Exclusive) IDXGIOutput::TakeOwnership

Releases ownership of the output.

If you are not using a swap chain, get access to an output by calling and release it when you are finished by calling . An application that uses a swap chain will typically not call either of these methods.

bb174554 void IDXGIOutput::ReleaseOwnership() IDXGIOutput::ReleaseOwnership

Gets a description of the gamma-control capabilities.

A reference to a description of the gamma-control capabilities (see ).

Returns one of the DXGI_ERROR values.

Note??Calling this method is only supported while in full-screen mode.?

For info about using gamma correction, see Using gamma correction.

bb174553 HRESULT IDXGIOutput::GetGammaControlCapabilities([Out] DXGI_GAMMA_CONTROL_CAPABILITIES* pGammaCaps) IDXGIOutput::GetGammaControlCapabilities

Sets the gamma controls.

A reference to a structure that describes the gamma curve to set.

Returns one of the DXGI_ERROR values.

Note??Calling this method is only supported while in full-screen mode.?

For info about using gamma correction, see Using gamma correction.

bb174557 HRESULT IDXGIOutput::SetGammaControl([In] const DXGI_GAMMA_CONTROL* pArray) IDXGIOutput::SetGammaControl

Gets the gamma control settings.

An array of gamma control settings (see ).

Returns one of the DXGI_ERROR values.

Note??Calling this method is only supported while in full-screen mode.?

For info about using gamma correction, see Using gamma correction.

bb174552 HRESULT IDXGIOutput::GetGammaControl([Out] DXGI_GAMMA_CONTROL* pArray) IDXGIOutput::GetGammaControl

Changes the display mode.

A reference to a surface (see ) used for rendering an image to the screen. The surface must have been created as a back buffer (DXGI_USAGE_BACKBUFFER).

Returns one of the DXGI_ERROR values.

should not be called directly by applications, since results will be unpredictable. It is called implicitly by the DXGI swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.

This method should only be called between and calls.

bb174556 HRESULT IDXGIOutput::SetDisplaySurface([In] IDXGISurface* pScanoutSurface) IDXGIOutput::SetDisplaySurface

[Starting with Direct3D 11.1, we recommend not to use GetDisplaySurfaceData anymore to retrieve the current display surface. Instead, use , which supports stereo display mode.]

Gets a copy of the current display surface.

No documentation.

Returns one of the DXGI_ERROR values.

can only be called when an output is in full-screen mode. If the method succeeds, DXGI fills the destination surface.

Use to determine the size (width and height) of the output when you want to allocate space for the destination surface. This is true regardless of target monitor rotation. A destination surface created by a graphics component (such as Direct3D 10) must be created with CPU-write permission (see D3D10_CPU_ACCESS_WRITE). Other surfaces should be created with CPU read-write permission (see D3D10_CPU_ACCESS_READ_WRITE). This method will modify the surface data to fit the destination surface (stretch, shrink, convert format, rotate). The stretch and shrink is performed with point-sampling.

bb174550 HRESULT IDXGIOutput::GetDisplaySurfaceData([In] IDXGISurface* pDestination) IDXGIOutput::GetDisplaySurfaceData

Gets statistics about recently rendered frames.

A reference to frame statistics (see ).

If this function succeeds, it returns . Otherwise, it might return .

This API is similar to .

Note??Calling this method is only supported while in full-screen mode.?
bb174551 HRESULT IDXGIOutput::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats) IDXGIOutput::GetFrameStatistics
Find the display mode that most closely matches the requested display mode. Direct3D devices require UNORM formats. This method finds the closest matching available display mode to the mode specified in pModeToMatch. Similarly ranked fields (i.e. all specified, or all unspecified, etc) are resolved in the following order. ScanlineOrdering Scaling Format Resolution RefreshRate When determining the closest value for a particular field, previously matched fields are used to filter the display mode list choices, and other fields are ignored. For example, when matching Resolution, the display mode list will have already been filtered by a certain ScanlineOrdering, Scaling, and Format, while RefreshRate is ignored. This ordering doesn't define the absolute ordering for every usage scenario of FindClosestMatchingMode, because the application can choose some values initially, effectively changing the order that fields are chosen. Fields of the display mode are matched one at a time, generally in a specified order. If a field is unspecified, FindClosestMatchingMode gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, then the default desktop output is used to find values. If an application uses a fully unspecified display mode, FindClosestMatchingMode will typically return a display mode that matches the desktop settings for this output. Unspecified fields are lower priority than specified fields and will be resolved later than specified fields. A reference to the Direct3D device interface. If this parameter is NULL, only modes whose format matches that of pModeToMatch will be returned; otherwise, only those formats that are supported for scan-out by the device are returned. The desired display mode (see ). Members of DXGI_MODE_DESC can be unspecified indicating no preference for that member. A value of 0 for Width or Height indicates the value is unspecified. If either Width or Height are 0 both must be 0. A numerator and denominator of 0 in RefreshRate indicate it is unspecified. Other members of DXGI_MODE_DESC have enumeration values indicating the member is unspecified. If pConnectedDevice is NULL Format cannot be DXGI_FORMAT_UNKNOWN. The mode that most closely matches pModeToMatch. Returns one of the following . HRESULT IDXGIOutput::FindClosestMatchingMode([In] const DXGI_MODE_DESC* pModeToMatch,[Out] DXGI_MODE_DESC* pClosestMatch,[In, Optional] IUnknown* pConcernedDevice) Gets the display modes that match the requested format and other input options. In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor). As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes. UINT num = 0; DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT; UINT flags = DXGI_ENUM_MODES_INTERLACED; pOutput->GetDisplayModeList( format, flags, &num, 0); ... DXGI_MODE_DESC * pDescs = new DXGI_MODE_DESC[num]; pOutput->GetDisplayModeList( format, flags, &num, pDescs); The color format (see ). format for modes to include (see {{DXGI_ENUM_MODES}}). DXGI_ENUM_MODES_SCALING needs to be specified to expose the display modes that require scaling. Centered modes, requiring no scaling and corresponding directly to the display output, are enumerated by default. Returns a list of display modes (see ); HRESULT IDXGIOutput::GetDisplayModeList([None] DXGI_FORMAT EnumFormat,[None] int Flags,[InOut] int* pNumModes,[Out, Buffer, Optional] DXGI_MODE_DESC* pDesc)

An interface represents an adapter output (such as a monitor).

To determine the outputs that are available from the adapter, use . To determine the specific output that the swap chain will update, use . You can then call QueryInterface from any object to obtain an object.

hh404597 IDXGIOutput1 IDXGIOutput1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

[Starting with Direct3D 11.1, we recommend not to use GetDisplayModeList anymore to retrieve the matching display mode. Instead, use , which supports stereo display mode.]

Gets the display modes that match the requested format and other input options.

No documentation. No documentation. No documentation. No documentation.

Returns one of the following DXGI_ERROR. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case is returned (if there is not enough room for all the display modes). If GetDisplayModeList is called from a Remote Desktop Services session (formerly Terminal Services session), is returned.

In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this API to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).

As shown, this API is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.

 UINT num = 0;	
             format = ;	
            UINT flags         = ; pOutput->GetDisplayModeList( format, flags, &num, 0); ...  * pDescs = new [num];	
            pOutput->GetDisplayModeList( format, flags, &num, pDescs); 
bb174549 HRESULT IDXGIOutput1::GetDisplayModeList1([In] DXGI_FORMAT EnumFormat,[In] unsigned int Flags,[InOut] unsigned int* pNumModes,[Out, Buffer, Optional] DXGI_MODE_DESC1* pDesc) IDXGIOutput1::GetDisplayModeList1

Finds the display mode that most closely matches the requested display mode.

A reference to the structure that describes the display mode to match. Members of can be unspecified, which indicates no preference for that member. A value of 0 for Width or Height indicates that the value is unspecified. If either Width or Height is 0, both must be 0. A numerator and denominator of 0 in RefreshRate indicate it is unspecified. Other members of have enumeration values that indicate that the member is unspecified. If pConcernedDevice is null, the Format member of cannot be .

A reference to the structure that receives a description of the display mode that most closely matches the display mode described at pModeToMatch.

A reference to the Direct3D device interface. If this parameter is null, FindClosestMatchingMode1 returns only modes whose format matches that of pModeToMatch; otherwise, FindClosestMatchingMode1 returns only those formats that are supported for scan-out by the device. For info about the formats that are supported for scan-out by the device at each feature level:

  • DXGI Format Support for Direct3D Feature Level 12.1 Hardware
  • DXGI Format Support for Direct3D Feature Level 12.0 Hardware
  • DXGI Format Support for Direct3D Feature Level 11.1 Hardware
  • DXGI Format Support for Direct3D Feature Level 11.0 Hardware
  • Hardware Support for Direct3D 10Level9 Formats
  • Hardware Support for Direct3D 10.1 Formats
  • Hardware Support for Direct3D 10 Formats

Returns one of the error codes described in the DXGI_ERROR topic.

Direct3D devices require UNORM formats.

FindClosestMatchingMode1 finds the closest matching available display mode to the mode that you specify in pModeToMatch.

If you set the Stereo member in the structure to which pModeToMatch points to specify a stereo mode as input, FindClosestMatchingMode1 considers only stereo modes. FindClosestMatchingMode1 considers only mono modes if Stereo is not set.

FindClosestMatchingMode1 resolves similarly ranked members of display modes (that is, all specified, or all unspecified, and so on) in the following order:

  1. ScanlineOrdering
  2. Scaling
  3. Format
  4. Resolution
  5. RefreshRate

When FindClosestMatchingMode1 determines the closest value for a particular member, it uses previously matched members to filter the display mode list choices, and ignores other members. For example, when FindClosestMatchingMode1 matches Resolution, it already filtered the display mode list by a certain ScanlineOrdering, Scaling, and Format, while it ignores RefreshRate. This ordering doesn't define the absolute ordering for every usage scenario of FindClosestMatchingMode1, because the application can choose some values initially, which effectively changes the order of resolving members.

FindClosestMatchingMode1 matches members of the display mode one at a time, generally in a specified order.

If a member is unspecified, FindClosestMatchingMode1 gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, FindClosestMatchingMode1 uses the default desktop output to find values. If an application uses a fully unspecified display mode, FindClosestMatchingMode1 typically returns a display mode that matches the desktop settings for this output. Because unspecified members are lower priority than specified members, FindClosestMatchingMode1 resolves unspecified members later than specified members.

hh404603 HRESULT IDXGIOutput1::FindClosestMatchingMode1([In] const DXGI_MODE_DESC1* pModeToMatch,[Out] DXGI_MODE_DESC1* pClosestMatch,[In, Optional] IUnknown* pConcernedDevice) IDXGIOutput1::FindClosestMatchingMode1

Copies the display surface (front buffer) to a user-provided resource.

A reference to a resource interface that represents the resource to which GetDisplaySurfaceData1 copies the display surface.

Returns one of the error codes described in the DXGI_ERROR topic.

GetDisplaySurfaceData1 is similar to except GetDisplaySurfaceData1 takes an and takes an .

GetDisplaySurfaceData1 returns an error if the input resource is not a 2D texture (represented by the interface) with an array size (ArraySize member of the structure) that is equal to the swap chain buffers.

The original and the updated GetDisplaySurfaceData1 behave exactly the same. GetDisplaySurfaceData1 was required because textures with an array size equal to 2 (ArraySize = 2) do not implement .

You can call GetDisplaySurfaceData1 only when an output is in full-screen mode. If GetDisplaySurfaceData1 succeeds, it fills the destination resource.

Use to determine the size (width and height) of the output when you want to allocate space for the destination resource. This is true regardless of target monitor rotation. A destination resource created by a graphics component (such as Direct3D 11) must be created with CPU write permission (see ). Other surfaces can be created with CPU read-write permission ( | ). GetDisplaySurfaceData1 modifies the surface data to fit the destination resource (stretch, shrink, convert format, rotate). GetDisplaySurfaceData1 performs the stretch and shrink with point sampling.

hh404609 HRESULT IDXGIOutput1::GetDisplaySurfaceData1([In] IDXGIResource* pDestination) IDXGIOutput1::GetDisplaySurfaceData1

Creates a desktop duplication interface from the interface that represents an adapter output.

No documentation. No documentation.

If an application wants to duplicate the entire desktop, it must create a desktop duplication interface on each active output on the desktop. This interface does not provide an explicit way to synchronize the timing of each output image. Instead, the application must use the time stamp of each output, and then determine how to combine the images.

For DuplicateOutput to succeed, you must create pDevice from or a later version of a DXGI factory interface that inherits from .

If the current mode is a stereo mode, the desktop duplication interface provides the image for the left stereo image only.

By default, only four processes can use a interface at the same time within a single session. A process can have only one desktop duplication interface on a single desktop output; however, that process can have a desktop duplication interface for each output that is part of the desktop.

For improved performance, consider using DuplicateOutput1.

hh404600 HRESULT IDXGIOutput1::DuplicateOutput([In] IUnknown* pDevice,[Out] IDXGIOutputDuplication** ppOutputDuplication) IDXGIOutput1::DuplicateOutput

[This documentation is preliminary and is subject to change.]

Applies to: desktop apps | Metro style apps

Gets the display modes that match the requested format and other input options.

A -typed value for the color format.

A combination of DXGI_ENUM_MODES-typed values that are combined by using a bitwise OR operation. The resulting value specifies options for display modes to include. You must specify to expose the display modes that require scaling. Centered modes that require no scaling and correspond directly to the display output are enumerated by default.

A list of display modes

GetDisplayModeList1 is updated from GetDisplayModeList to return a list of structures, which are updated mode descriptions. GetDisplayModeList behaves as though it calls GetDisplayModeList1 because GetDisplayModeList can return all of the modes that are specified by DXGI_ENUM_MODES, including stereo mode. However, GetDisplayModeList returns a list of structures, which are the former mode descriptions and do not indicate stereo mode.

The GetDisplayModeList1 method does not enumerate stereo modes unless you specify the flag in the Flags parameter. If you specify , stereo modes are included in the list of returned modes that the pDesc parameter points to. In other words, the method returns both stereo and mono modes.

In general, when you switch from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth, and refresh rate of the swap chain. To exercise more control over the display mode, use GetDisplayModeList1 to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).

The following example code shows that you need to call GetDisplayModeList1 twice. First call GetDisplayModeList1 to get the number of modes available, and second call GetDisplayModeList1 to return a description of the modes.

 UINT num = 0;	
             format = ;	
            UINT flags         = ; pOutput->GetDisplayModeList1( format, flags, &num, 0); ...  * pDescs = new [num];	
            pOutput->GetDisplayModeList1( format, flags, &num, pDescs); 
hh404606 HRESULT IDXGIOutput1::GetDisplayModeList1([In] DXGI_FORMAT EnumFormat,[In] unsigned int Flags,[InOut] unsigned int* pNumModes,[Out, Buffer, Optional] DXGI_MODE_DESC1* pDesc) IDXGIOutput1::GetDisplayModeList1

An interface represents an adapter output (such as a monitor).

To see the outputs available, use . To see the specific output that the swap chain will update, use .

bb174546 IDXGIOutput2 IDXGIOutput2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Queries an adapter output for multiplane overlay support. If this API returns ?TRUE?, multiple swap chain composition takes place in a performant manner using overlay hardware. If this API returns false, apps should avoid using foreground swap chains (that is, avoid using swap chains created with the flag).

TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns .

See CreateSwapChainForCoreWindow for info on creating a foreground swap chain.

dn280411 BOOL IDXGIOutput2::SupportsOverlays() IDXGIOutput2::SupportsOverlays

[This documentation is preliminary and is subject to change.]

Queries an adapter output for multiplane overlay support.

TRUE if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns .

dn280411 BOOL IDXGIOutput2::SupportsOverlays() IDXGIOutput2::SupportsOverlays

Represents an adapter output (such as a monitor). The interface exposes a method to check for overlay support.

dn903669 IDXGIOutput3 IDXGIOutput3
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Checks for overlay support.

A -typed value for the color format.

A reference to the Direct3D device interface. CheckOverlaySupport returns only support info about this scan-out device.

A reference to a variable that receives a combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for overlay support.

dn903670 HRESULT IDXGIOutput3::CheckOverlaySupport([In] DXGI_FORMAT EnumFormat,[In] IUnknown* pConcernedDevice,[Out] DXGI_OVERLAY_SUPPORT_FLAG* pFlags) IDXGIOutput3::CheckOverlaySupport

Represents an adapter output (such as a monitor). The interface exposes a method to check for overlay color space support.

dn903671 IDXGIOutput4 IDXGIOutput4
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Checks for overlay color space support.

A -typed value for the color format.

A -typed value that specifies color space type to check overlay support for.

A reference to the Direct3D device interface. CheckOverlayColorSpaceSupport returns only support info about this scan-out device.

A reference to a variable that receives a combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for overlay color space support.

dn903672 HRESULT IDXGIOutput4::CheckOverlayColorSpaceSupport([In] DXGI_FORMAT Format,[In] DXGI_COLOR_SPACE_TYPE ColorSpace,[In] IUnknown* pConcernedDevice,[Out] DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG* pFlags) IDXGIOutput4::CheckOverlayColorSpaceSupport

An interface represents an adapter output (such as a monitor).

To see the outputs available, use . To see the specific output that the swap chain will update, use .

bb174546 IDXGIOutput5 IDXGIOutput5
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Allows specifying a list of supported formats for fullscreen surfaces that can be returned by the object.

No documentation. No documentation. No documentation. No documentation. No documentation.

This method allows directly receiving the original back buffer format used by a running fullscreen application. For comparison, using the original DuplicateOutput function always converts the fullscreen surface to a 32-bit BGRA format. In cases where the current fullscreen application is using a different buffer format, a conversion to 32-bit BGRA incurs a performance penalty. Besides the performance benefit of being able to skip format conversion, using DuplicateOutput1 also allows receiving the full gamut of colors in cases where a high-color format (such as R10G10B10A2) is being presented.

The pSupportedFormats array should only contain display scan-out formats. See Format Support for Direct3D Feature Level 11.0 Hardware for required scan-out formats at each feature level. If the current fullscreen buffer format is not contained in the pSupportedFormats array, DXGI will pick one of the supplied formats and convert the fullscreen buffer to that format before returning from . The list of supported formats should always contain , as this is the most common format for the desktop.

mt679496 HRESULT IDXGIOutput5::DuplicateOutput1([In] IUnknown* pDevice,[In] unsigned int Flags,[In] unsigned int SupportedFormatsCount,[In, Buffer] const DXGI_FORMAT* pSupportedFormats,[Out] IDXGIOutputDuplication** ppOutputDuplication) IDXGIOutput5::DuplicateOutput1

An interface represents an adapter output (such as a monitor).

To see the outputs available, use . To see the specific output that the swap chain will update, use .

bb174546 IDXGIOutput6 IDXGIOutput6
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. No documentation. GetDesc1 GetDesc1 HRESULT IDXGIOutput6::GetDesc1([Out] DXGI_OUTPUT_DESC1* pDesc) No documentation. No documentation. No documentation. HRESULT IDXGIOutput6::GetDesc1([Out] DXGI_OUTPUT_DESC1* pDesc) IDXGIOutput6::GetDesc1 No documentation. No documentation. No documentation. HRESULT IDXGIOutput6::CheckHardwareCompositionSupport([Out] unsigned int* pFlags) IDXGIOutput6::CheckHardwareCompositionSupport

The interface accesses and manipulates the duplicated desktop image.

A collaboration application can use to access the desktop image. is supported in Desktop Window Manager (DWM) on non-8bpp DirectX full-screen modes and non-8bpp OpenGL full-screen modes. 16-bit or 32-bit GDI non-DWM desktop modes are not supported.

An application can use on a separate thread to receive the desktop images and to feed them into their specific image-processing pipeline. The application uses to perform the following operations:

  1. Acquire the next desktop image.
  2. Retrieve the information that describes the image.
  3. Perform an operation on the image. This operation can be as simple as copying the image to a staging buffer so that the application can read the pixel data on the image. The application reads the pixel data after the application calls . Alternatively, this operation can be more complex. For example, the application can run some pixel shaders on the updated regions of the image to encode those regions for transmission to a client.
  4. After the application finishes processing each desktop image, it releases the image, loops to step 1, and repeats the steps. The application repeats these steps until it is finished processing desktop images.

The following components of the operating system can generate the desktop image:

  • The DWM by composing the desktop image
  • A full-screen DirectX or OpenGL application
  • An application by switching to a separate desktop, for example, the secure desktop that is used to display the login screen

All current interfaces become invalid when the operating system switches to a different component that produces the desktop image or when a mode change occurs. In these situations, the application must destroy its current interface and create a new interface.

Examples of situations in which becomes invalid are:

  • Desktop switch
  • Mode change
  • Switch from DWM on, DWM off, or other full-screen application

In these situations, the application must release the interface and must create a new interface for the new content. If the application does not have the appropriate privilege to the new desktop image, its call to the method fails.

While the application processes each desktop image, the operating system accumulates all the desktop image updates into a single update. For more information about desktop updates, see Updating the desktop image data.

The desktop image is always in the format.

The interface does not exist for Windows Store apps.

hh404611 IDXGIOutputDuplication IDXGIOutputDuplication
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.

After an application creates an interface, it calls GetDesc to retrieve the dimensions of the surface that contains the desktop image. The format of the desktop image is always .

hh404618 GetDesc GetDesc void IDXGIOutputDuplication::GetDesc([Out] DXGI_OUTDUPL_DESC* pDesc)

Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.

A reference to a structure that describes the duplicated output. This parameter must not be null.

After an application creates an interface, it calls GetDesc to retrieve the dimensions of the surface that contains the desktop image. The format of the desktop image is always .

hh404618 void IDXGIOutputDuplication::GetDesc([Out] DXGI_OUTDUPL_DESC* pDesc) IDXGIOutputDuplication::GetDesc

Indicates that the application is ready to process the next desktop image.

The time-out interval, in milliseconds. This interval specifies the amount of time that this method waits for a new frame before it returns to the caller. This method returns if the interval elapses, and a new desktop image is not available.

For more information about the time-out interval, see Remarks.

A reference to a memory location that receives the structure that describes timing and presentation statistics for a frame.

A reference to a variable that receives the interface of the surface that contains the desktop bitmap.

AcquireNextFrame returns:

  • if it successfully received the next desktop image.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • if the time-out interval elapsed before the next desktop frame was available.
  • if the application called AcquireNextFrame without releasing the previous frame.
  • E_INVALIDARG if one of the parameters to AcquireNextFrame is incorrect; for example, if pFrameInfo is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

When AcquireNextFrame returns successfully, the calling application can access the desktop image that AcquireNextFrame returns in the variable at ppDesktopResource. If the caller specifies a zero time-out interval in the TimeoutInMilliseconds parameter, AcquireNextFrame verifies whether there is a new desktop image available, returns immediately, and indicates its outcome with the return value. If the caller specifies an INFINITE time-out interval in the TimeoutInMilliseconds parameter, the time-out interval never elapses.

Note??You cannot cancel the wait that you specified in the TimeoutInMilliseconds parameter. Therefore, if you must periodically check for other conditions (for example, a terminate signal), you should specify a non-INFINITE time-out interval. After the time-out interval elapses, you can check for these other conditions and then call AcquireNextFrame again to wait for the next frame.?

AcquireNextFrame acquires a new desktop frame when the operating system either updates the desktop bitmap image or changes the shape or position of a hardware reference. The new frame that AcquireNextFrame acquires might have only the desktop image updated, only the reference shape or position updated, or both.

hh404615 HRESULT IDXGIOutputDuplication::AcquireNextFrame([In] unsigned int TimeoutInMilliseconds,[Out] DXGI_OUTDUPL_FRAME_INFO* pFrameInfo,[Out] IDXGIResource** ppDesktopResource) IDXGIOutputDuplication::AcquireNextFrame

Gets information about dirty rectangles for the current desktop frame.

The size in bytes of the buffer that the caller passed to the pDirtyRectsBuffer parameter.

A reference to an array of structures that identifies the dirty rectangle regions for the desktop frame.

Pointer to a variable that receives the number of bytes that GetFrameDirtyRects needs to store information about dirty regions in the buffer at pDirtyRectsBuffer.

For more information about returning the required buffer size, see Remarks.

GetFrameDirtyRects returns:

  • if it successfully retrieved information about dirty rectangles.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • if the buffer that the calling application provided was not big enough.
  • if the application called GetFrameDirtyRects without owning the desktop image.
  • E_INVALIDARG if one of the parameters to GetFrameDirtyRects is incorrect; for example, if pDirtyRectsBuffer is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

GetFrameDirtyRects stores a size value in the variable at pDirtyRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameDirtyRects needs to store information about dirty regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pDirtyRectsBuffer:

  • GetFrameDirtyRects fails with because the buffer is not big enough.
  • GetFrameDirtyRects supplies a buffer that is bigger than necessary. The size value returned at pDirtyRectsBufferSizeRequired informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the DirtyRectsBufferSize parameter.

The caller can also use the value returned at pDirtyRectsBufferSizeRequired to determine the number of s returned in the pDirtyRectsBuffer array.

The buffer contains the list of dirty s for the current frame.

Note??To produce a visually accurate copy of the desktop, an application must first process all move s before it processes dirty s.?
hh404619 HRESULT IDXGIOutputDuplication::GetFrameDirtyRects([In] unsigned int DirtyRectsBufferSize,[Out, Buffer] RECT* pDirtyRectsBuffer,[Out] unsigned int* pDirtyRectsBufferSizeRequired) IDXGIOutputDuplication::GetFrameDirtyRects

Gets information about the moved rectangles for the current desktop frame.

The size in bytes of the buffer that the caller passed to the pMoveRectBuffer parameter.

A reference to an array of structures that identifies the moved rectangle regions for the desktop frame.

Pointer to a variable that receives the number of bytes that GetFrameMoveRects needs to store information about moved regions in the buffer at pMoveRectBuffer.

For more information about returning the required buffer size, see Remarks.

GetFrameMoveRects returns:

  • if it successfully retrieved information about moved rectangles.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • if the buffer that the calling application provided is not big enough.
  • if the application called GetFrameMoveRects without owning the desktop image.
  • E_INVALIDARG if one of the parameters to GetFrameMoveRects is incorrect; for example, if pMoveRectBuffer is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

GetFrameMoveRects stores a size value in the variable at pMoveRectsBufferSizeRequired. This value specifies the number of bytes that GetFrameMoveRects needs to store information about moved regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pMoveRectBuffer:

  • GetFrameMoveRects fails with because the buffer is not big enough.
  • GetFrameMoveRects supplies a buffer that is bigger than necessary. The size value returned at pMoveRectsBufferSizeRequired informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the MoveRectsBufferSize parameter.

The caller can also use the value returned at pMoveRectsBufferSizeRequired to determine the number of structures returned.

The buffer contains the list of move RECTs for the current frame.

Note??To produce a visually accurate copy of the desktop, an application must first process all move RECTs before it processes dirty RECTs.?
hh404620 HRESULT IDXGIOutputDuplication::GetFrameMoveRects([In] unsigned int MoveRectsBufferSize,[Out, Buffer] DXGI_OUTDUPL_MOVE_RECT* pMoveRectBuffer,[Out] unsigned int* pMoveRectsBufferSizeRequired) IDXGIOutputDuplication::GetFrameMoveRects

Gets information about the new reference shape for the current desktop frame.

The size in bytes of the buffer that the caller passed to the pPointerShapeBuffer parameter.

A reference to a buffer to which GetFramePointerShape copies and returns pixel data for the new reference shape.

Pointer to a variable that receives the number of bytes that GetFramePointerShape needs to store the new reference shape pixel data in the buffer at pPointerShapeBuffer.

For more information about returning the required buffer size, see Remarks.

Pointer to a structure that receives the reference shape information.

GetFramePointerShape returns:

  • if it successfully retrieved information about the new reference shape.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • if the buffer that the calling application provided was not big enough.
  • if the application called GetFramePointerShape without owning the desktop image.
  • E_INVALIDARG if one of the parameters to GetFramePointerShape is incorrect; for example, if pPointerShapeInfo is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

GetFramePointerShape stores a size value in the variable at pPointerShapeBufferSizeRequired. This value specifies the number of bytes that pPointerShapeBufferSizeRequired needs to store the new reference shape pixel data. You can use the value in the following situations to determine the amount of memory to allocate for future buffers that you pass to pPointerShapeBuffer:

  • GetFramePointerShape fails with because the buffer is not big enough.
  • GetFramePointerShape supplies a bigger than necessary buffer. The size value returned at pPointerShapeBufferSizeRequired informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the PointerShapeBufferSize parameter.

The pPointerShapeInfo parameter describes the new reference shape.

hh404621 HRESULT IDXGIOutputDuplication::GetFramePointerShape([In] unsigned int PointerShapeBufferSize,[Out, Buffer] void* pPointerShapeBuffer,[Out] unsigned int* pPointerShapeBufferSizeRequired,[Out] DXGI_OUTDUPL_POINTER_SHAPE_INFO* pPointerShapeInfo) IDXGIOutputDuplication::GetFramePointerShape

Provides the CPU with efficient access to a desktop image if that desktop image is already in system memory.

A reference to a structure that receives the surface data that the CPU needs to directly access the surface data.

MapDesktopSurface returns:

  • if it successfully retrieved the surface data.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • if the application already has an outstanding map on the desktop image. The application must call UnMapDesktopSurface before it calls MapDesktopSurface again. is also returned if the application did not own the desktop image when it called MapDesktopSurface.
  • if the desktop image is not in system memory. In this situation, the application must first transfer the image to a staging surface and then lock the image by calling the method.
  • E_INVALIDARG if the pLockedRect parameter is incorrect; for example, if pLockedRect is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

You can successfully call MapDesktopSurface if the DesktopImageInSystemMemory member of the structure is set to TRUE. If DesktopImageInSystemMemory is , MapDesktopSurface returns . Call to retrieve the structure.

hh404622 HRESULT IDXGIOutputDuplication::MapDesktopSurface([Out] DXGI_MAPPED_RECT* pLockedRect) IDXGIOutputDuplication::MapDesktopSurface

Invalidates the reference to the desktop image that was retrieved by using .

UnMapDesktopSurface returns:

  • if it successfully completed.
  • if the application did not map the desktop surface by calling .
  • Possibly other error codes that are described in the DXGI_ERROR topic.
hh404624 HRESULT IDXGIOutputDuplication::UnMapDesktopSurface() IDXGIOutputDuplication::UnMapDesktopSurface

Indicates that the application finished processing the frame.

ReleaseFrame returns:

  • if it successfully completed.
  • if the application already released the frame.
  • if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are:
    • Desktop switch
    • Mode change
    • Switch from DWM on, DWM off, or other full-screen application
    In this situation, the application must release the interface and create a new for the new content.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

The application must release the frame before it acquires the next frame. After the frame is released, the surface that contains the desktop bitmap becomes invalid; you will not be able to use the surface in a DirectX graphics operation.

For performance reasons, we recommend that you release the frame just before you call the method to acquire the next frame. When the client does not own the frame, the operating system copies all desktop updates to the surface. This can result in wasted GPU cycles if the operating system updates the same region for each frame that occurs. When the client acquires the frame, the client is aware of only the final update to this region; therefore, any overlapping updates during previous frames are wasted. When the client acquires a frame, the client owns the surface; therefore, the operating system can track only the updated regions and cannot copy desktop updates to the surface. Because of this behavior, we recommend that you minimize the time between the call to release the current frame and the call to acquire the next frame.

hh404623 HRESULT IDXGIOutputDuplication::ReleaseFrame() IDXGIOutputDuplication::ReleaseFrame

Set the priority for evicting the resource from memory.

The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.

You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.

bb174564 IDXGIResource IDXGIResource
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use to get a handle for sharing. To use , you must create the resource as shared and specify that it uses NT handles (that is, you set the flag). We also recommend that you create shared resources that use NT handles so you can use CloseHandle, DuplicateHandle, and so on on those shared resources.]

Gets the handle to a shared resource.

GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the with or without the flag). You can pass this handle to the method to give another device access to the shared resource. You can also marshal this handle to another process to share a resource with a device in another process. However, this handle is not an NT handle. Therefore, don't use the handle with CloseHandle, DuplicateHandle, and so on.

The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.

GetSharedHandle can also return handles for resources that were passed into to open those resources.

GetSharedHandle fails if the resource to which it wants to get a handle is not shared.

bb174562 GetSharedHandle GetSharedHandle HRESULT IDXGIResource::GetSharedHandle([Out] void** pSharedHandle)

Get or sets the eviction priority.

The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.

Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.

bb174561 GetEvictionPriority / SetEvictionPriority GetEvictionPriority HRESULT IDXGIResource::GetEvictionPriority([Out] unsigned int* pEvictionPriority)

[Starting with Direct3D 11.1, we recommend not to use GetSharedHandle anymore to retrieve the handle to a shared resource. Instead, use to get a handle for sharing. To use , you must create the resource as shared and specify that it uses NT handles (that is, you set the flag). We also recommend that you create shared resources that use NT handles so you can use CloseHandle, DuplicateHandle, and so on on those shared resources.]

Gets the handle to a shared resource.

No documentation.

Returns one of the DXGI_ERROR values.

GetSharedHandle returns a handle for the resource that you created as shared (that is, you set the with or without the flag). You can pass this handle to the method to give another device access to the shared resource. You can also marshal this handle to another process to share a resource with a device in another process. However, this handle is not an NT handle. Therefore, don't use the handle with CloseHandle, DuplicateHandle, and so on.

The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.

GetSharedHandle can also return handles for resources that were passed into to open those resources.

GetSharedHandle fails if the resource to which it wants to get a handle is not shared.

bb174562 HRESULT IDXGIResource::GetSharedHandle([Out] void** pSharedHandle) IDXGIResource::GetSharedHandle

Get the expected resource usage.

A reference to a usage flag (see DXGI_USAGE). For Direct3D 10, a surface can be used as a shader input or a render-target output.

Returns one of the following DXGI_ERROR.

bb174563 HRESULT IDXGIResource::GetUsage([In] unsigned int* pUsage) IDXGIResource::GetUsage

Set the priority for evicting the resource from memory.

The priority is one of the following values:

ValueMeaning
(0x28000000)

The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.

(0x50000000)

The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.

(0x78000000)

The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource.

(0xa0000000)

The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.

(0xc8000000)

The resource is evicted from memory only if there is no other way of resolving the memory requirement.

?

Returns one of the following DXGI_ERROR.

The eviction priority is a memory-management variable that is used by DXGI for determining how to populate overcommitted memory.

You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.

bb174564 HRESULT IDXGIResource::SetEvictionPriority([In] unsigned int EvictionPriority) IDXGIResource::SetEvictionPriority

Get the eviction priority.

A reference to the eviction priority, which determines when a resource can be evicted from memory.

The following defined values are possible.

ValueMeaning
(0x28000000)

The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.

(0x50000000)

The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a GPU can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.

(0x78000000)

The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource.

(0xa0000000)

The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.

(0xc8000000)

The resource is evicted from memory only if there is no other way of resolving the memory requirement.

?

Returns one of the following DXGI_ERROR.

The eviction priority is a memory-management variable that is used by DXGI to determine how to manage overcommitted memory.

Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.

bb174561 HRESULT IDXGIResource::GetEvictionPriority([Out] unsigned int* pEvictionPriority) IDXGIResource::GetEvictionPriority

An interface extends the interface by adding support for creating a subresource surface object and for creating a handle to a shared resource.

To determine the type of memory a resource is currently located in, use . To share resources between processes, use . For information about how to share resources between multiple Windows graphics APIs, including Direct3D 11, Direct2D, Direct3D 10, and Direct3D 9Ex, see Surface Sharing Between Windows Graphics APIs.

You can retrieve the interface from any video memory resource that you create from a Direct3D 10 and later function. Any Direct3D object that supports ID3D10Resource or also supports . For example, the Direct3D 2D texture object that you create from supports . You can call QueryInterface on the 2D texture object () to retrieve the interface. For example, to retrieve the interface from the 2D texture object, use the following code.

 * pDXGIResource;	
            hr = g_pd3dTexture2D->QueryInterface(__uuidof(), (void **)&pDXGIResource);

Windows?Phone?8: This API is supported.

hh404625 IDXGIResource1 IDXGIResource1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Creates a subresource surface object.

The index of the subresource surface object to enumerate.

The address of a reference to a interface that represents the created subresource surface object at the position specified by the index parameter.

Returns if successful; otherwise, returns one of the following values:

  • if the index is out of range or if the subresource is not a valid surface.
  • E_OUTOFMEMORY if insufficient memory is available to create the subresource surface object.

A subresource is a valid surface if the original resource would have been a valid surface had its array size been equal to 1.

Subresource surface objects implement the interface, which inherits from and indirectly . Therefore, the GDI-interoperable methods of work if the original resource interface object was created with the GDI-interoperable flag ().

CreateSubresourceSurface creates a subresource surface that is based on the resource interface on which CreateSubresourceSurface is called. For example, if the original resource interface object is a 2D texture, the created subresource surface is also a 2D texture.

You can use CreateSubresourceSurface to create parts of a stereo resource so you can use Direct2D on either the left or right part of the stereo resource.

hh404627 HRESULT IDXGIResource1::CreateSubresourceSurface([In] unsigned int index,[Out, Fast] IDXGISurface2** ppSurface) IDXGIResource1::CreateSubresourceSurface

Creates a handle to a shared resource. You can then use the returned handle with multiple Direct3D devices.

A reference to a structure that contains two separate but related data members: an optional security descriptor, and a Boolean value that determines whether child processes can inherit the returned handle.

Set this parameter to null if you want child processes that the application might create to not inherit the handle returned by CreateSharedHandle, and if you want the resource that is associated with the returned handle to get a default security descriptor.

The lpSecurityDescriptor member of the structure specifies a SECURITY_DESCRIPTOR for the resource. Set this member to null if you want the runtime to assign a default security descriptor to the resource that is associated with the returned handle. The ACLs in the default security descriptor for the resource come from the primary or impersonation token of the creator. For more info, see Synchronization Object Security and Access Rights.

The requested access rights to the resource. In addition to the generic access rights, DXGI defines the following values:

  • ( 0x80000000L ) - specifies read access to the resource.
  • ( 1 ) - specifies write access to the resource.

You can combine these values by using a bitwise OR operation.

The name of the resource to share. The name is limited to MAX_PATH characters. Name comparison is case sensitive. You will need the resource name if you call the method to access the shared resource by name. If you instead call the method to access the shared resource by handle, set this parameter to null.

If lpName matches the name of an existing resource, CreateSharedHandle fails with . This occurs because these objects share the same namespace.

The name can have a "Global\" or "Local\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\). For more information, see Kernel Object Namespaces. Fast user switching is implemented using Terminal Services sessions. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.

The object can be created in a private namespace. For more information, see Object Namespaces.

A reference to a variable that receives the NT HANDLE value to the resource to share. You can use this handle in calls to access the resource.

CreateSharedHandle only returns the NT handle when you created the resource as shared and specified that it uses NT handles (that is, you set the and flags). If you created the resource as shared and specified that it uses NT handles, you must use CreateSharedHandle to get a handle for sharing. In this situation, you can't use the method because it will fail.

You can pass the handle that CreateSharedHandle returns in a call to the method to give a device access to a shared resource that you created on a different device.

Because the handle that CreateSharedHandle returns is an NT handle, you can use the handle with CloseHandle, DuplicateHandle, and so on. You can call CreateSharedHandle only once for a shared resource; later calls fail. If you need more handles to the same shared resource, call DuplicateHandle. When you no longer need the shared resource handle, call CloseHandle to close the handle, in order to avoid memory leaks.

If you pass a name for the resource to lpName when you call CreateSharedHandle to share the resource, you can subsequently pass this name in a call to the method to give another device access to the shared resource. If you use a named resource, a malicious user can use this named resource before you do and prevent your app from starting. To prevent this situation, create a randomly named resource and store the name so that it can only be obtained by an authorized user. Alternatively, you can use a file for this purpose. To limit your app to one instance per user, create a locked file in the user's profile directory.

If you created the resource as shared and did not specify that it uses NT handles, you cannot use CreateSharedHandle to get a handle for sharing because CreateSharedHandle will fail.

hh404626 HRESULT IDXGIResource1::CreateSharedHandle([In, Optional] const SECURITY_ATTRIBUTES* pAttributes,[In] DXGI_SHARED_RESOURCE_FLAGS dwAccess,[In, Optional] const wchar_t* lpName,[Out] void** pHandle) IDXGIResource1::CreateSharedHandle
Creates a handle to a shared resource. You can then use the returned handle with multiple Direct3D devices. A reference to a structure that contains two separate but related data members: an optional security descriptor, and a Boolean value that determines whether child processes can inherit the returned handle. Set this parameter to null if you want child processes that the application might create to not inherit the handle returned by CreateSharedHandle, and if you want the resource that is associated with the returned handle to get a default security descriptor. The lpSecurityDescriptor member of the structure specifies a SECURITY_DESCRIPTOR for the resource. Set this member to null if you want the runtime to assign a default security descriptor to the resource that is associated with the returned handle. The requested access rights to the resource. In addition to the generic access rights, DXGI defines the following values: ( 0x80000000L ) - specifies read access to the resource. ( 1 ) - specifies write access to the resource. You can combine these values by using a bitwise OR operation. The name of the resource to share. You will need the resource name if you call the method to access the shared resource by name. If you instead call the method to access the shared resource by handle, set this parameter to null. A reference to a variable that receives the NT HANDLE value to the resource to share. You can use this handle in calls to access the resource. If you created the resource as shared and specified that it uses NT handles (that is, you set the flag), you must use CreateSharedHandle to get a handle for sharing. In this situation, you cannot use the method because it will fail. Similarly, if you created the resource as shared and did not specify that it uses NT handles, you cannot use CreateSharedHandle to get a handle for sharing because CreateSharedHandle will fail.You can pass the handle that CreateSharedHandle returns in a call to the or method to give a device access to a shared resource that you created on a different device.CreateSharedHandle only returns the NT handle when you created the resource as shared (that is, you set the and flags).Because the handle that CreateSharedHandle returns is an NT handle, you can use the handle with CloseHandle, DuplicateHandle, and so on. You can call CreateSharedHandle only once for a shared resource; later calls fail. If you need more handles to the same shared resource, call DuplicateHandle. When you no longer need the shared resource handle, call CloseHandle to close the handle, in order to avoid memory leaks.The creator of a shared resource must not destroy the resource until all entities that opened the resource have destroyed the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device. HRESULT IDXGIResource1::CreateSharedHandle([In, Optional] const SECURITY_ATTRIBUTES* pAttributes,[In] DXGI_SHARED_RESOURCE_FLAGS dwAccess,[In, Optional] const wchar_t* name,[Out] void** pHandle)

The interface implements methods for image-data objects.

An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call .

The runtime automatically creates an interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an interface when you call or ID3D10Device::CreateTexture2D to create a 2D texture. To retrieve the interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface or ID3D10Texture2D::QueryInterface. In this call, you must pass the identifier of . If the 2D texture has only a single MIP-map level and does not consist of an array of textures, QueryInterface succeeds and returns a reference to the interface reference. Otherwise, QueryInterface fails and does not return the reference to .

bb174565 IDXGISurface IDXGISurface
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Get a description of the surface.

bb174566 GetDesc GetDesc HRESULT IDXGISurface::GetDesc([Out] DXGI_SURFACE_DESC* pDesc)

Get a description of the surface.

A reference to the surface description (see ).

Returns if successful; otherwise, returns one of the error codes that are described in the DXGI_ERROR topic.

bb174566 HRESULT IDXGISurface::GetDesc([Out] DXGI_SURFACE_DESC* pDesc) IDXGISurface::GetDesc

Get a reference to the data contained in the surface, and deny GPU access to the surface.

A reference to the surface data (see ).

CPU read-write flags. These flags can be combined with a logical OR.

  • - Allow CPU read access.
  • - Allow CPU write access.
  • - Discard the previous contents of a resource when it is mapped.

Returns if successful; otherwise, returns one of the error codes that are described in the DXGI_ERROR topic.

Use to access a surface from the CPU. To release a mapped surface (and allow GPU access) call .

bb174567 HRESULT IDXGISurface::Map([Out] DXGI_MAPPED_RECT* pLockedRect,[In] unsigned int MapFlags) IDXGISurface::Map

Get a reference to the data contained in the surface, and deny GPU access to the surface.

Returns if successful; otherwise, returns one of the error codes that are described in the DXGI_ERROR topic.

Use to access a surface from the CPU. To release a mapped surface (and allow GPU access) call .

bb174567 HRESULT IDXGISurface::Unmap() IDXGISurface::Unmap
Acquires access to the surface data. Flags specifying CPU access permissions. A for accessing the mapped data, or null on failure.. Acquires access to the surface data. Flags specifying CPU access permissions. Stream to contain the surface data. A for accessing the mapped data, or null on failure.. Gets a swap chain back buffer. The swap chain to get the buffer from. The index of the desired buffer. The buffer interface, or null on failure.

The interface extends the by adding support for using Windows Graphics Device Interface (GDI) to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface.

This interface is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call . Then, call QueryInterface on the object that returns to retrieve the interface.

Any object that supports also supports .

The runtime automatically creates an interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an interface when you call or ID3D10Device::CreateTexture2D to create a 2D texture. To retrieve the interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface or ID3D10Texture2D::QueryInterface. In this call, you must pass the identifier of . If the 2D texture has only a single MIP-map level and does not consist of an array of textures, QueryInterface succeeds and returns a reference to the interface reference. Otherwise, QueryInterface fails and does not return the reference to .

ff471343 IDXGISurface1 IDXGISurface1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Returns a device context (DC) that allows you to render to a Microsoft DirectX Graphics Infrastructure (DXGI) surface using Windows Graphics Device Interface (GDI).

A Boolean value that specifies whether to preserve Direct3D contents in the GDI DC. TRUE directs the runtime not to preserve Direct3D contents in the GDI DC; that is, the runtime discards the Direct3D contents. guarantees that Direct3D contents are available in the GDI DC.

A reference to an handle that represents the current device context for GDI rendering.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

After you use the GetDC method to retrieve a DC, you can render to the DXGI surface by using GDI. The GetDC method readies the surface for GDI rendering and allows inter-operation between DXGI and GDI technologies.

Keep the following in mind when using this method:

  • You must create the surface by using the flag for a surface or by using the flag for swap chains, otherwise this method fails.
  • You must release the device and call the method before you issue any new Direct3D commands.
  • This method fails if an outstanding DC has already been created by this method.
  • The format for the surface or swap chain must be or .
  • On GetDC, the render target in the output merger of the Direct3D pipeline is unbound from the surface. You must call the method on the device prior to Direct3D rendering after GDI rendering.
  • Prior to resizing buffers you must release all outstanding DCs.

You can also call GetDC on the back buffer at index 0 of a swap chain by obtaining an from the swap chain. The following code illustrates the process.

 * g_pSwapChain = null;	
            * g_pSurface1 = null;	
            ...	
            //Setup the device and and swapchain	
            g_pSwapChain->GetBuffer(0, __uuidof(), (void**) &g_pSurface1);	
            g_pSurface1->GetDC( , &g_hDC );	
            ...      	
            //Draw on the DC using GDI	
            ...	
            //When finish drawing release the DC	
            g_pSurface1->ReleaseDC( null ); 
ff471345 HRESULT IDXGISurface1::GetDC([In] BOOL Discard,[Out] HDC* phdc) IDXGISurface1::GetDC

Releases the GDI device context (DC) that is associated with the current surface and allows you to use Direct3D to render.

A reference to a structure that identifies the dirty region of the surface. A dirty region is any part of the surface that you used for GDI rendering and that you want to preserve. This area is used as a performance hint to graphics subsystem in certain scenarios. Do not use this parameter to restrict rendering to the specified rectangular region. If you pass in null, ReleaseDC considers the whole surface as dirty. Otherwise, ReleaseDC uses the area specified by the as a performance hint to indicate what areas have been manipulated by GDI rendering.

You can pass a reference to an empty structure (a rectangle with no position or area) if you didn't change any content.

If this method succeeds, it returns . Otherwise, it returns an error code.

This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).

Use the ReleaseDC method to release the DC and indicate that your application finished all GDI rendering to this surface. You must call the ReleaseDC method before you can use Direct3D to perform additional rendering.

Prior to resizing buffers you must release all outstanding DCs.

ff471346 HRESULT IDXGISurface1::ReleaseDC([In, Optional] RECT* pDirtyRect) IDXGISurface1::ReleaseDC
Releases the GDI device context (DC) associated with the current surface and allows rendering using Direct3D. The whole surface to be considered dirty. Use the ReleaseDC method to release the DC and indicate that your application has finished all GDI rendering to this surface. You must call the ReleaseDC method before you perform addition rendering using Direct3D. Prior to resizing buffers all outstanding DCs must be released. If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. HRESULT IDXGISurface1::ReleaseDC([In, Optional] RECT* pDirtyRect) Releases the GDI device context (DC) associated with the current surface and allows rendering using Direct3D. Use the ReleaseDC method to release the DC and indicate that your application has finished all GDI rendering to this surface. You must call the ReleaseDC method before you perform addition rendering using Direct3D. Prior to resizing buffers all outstanding DCs must be released. A reference to a structure that identifies the dirty region of the surface. A dirty region is any part of the surface that you have used for GDI rendering and that you want to preserve. This is used as a performance hint to graphics subsystem in certain scenarios. Do not use this parameter to restrict rendering to the specified rectangular region. The area specified by the will be used as a performance hint to indicate what areas have been manipulated by GDI rendering. If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. HRESULT IDXGISurface1::ReleaseDC([In, Optional] RECT* pDirtyRect)

The interface extends the interface by adding support for subresource surfaces and getting a handle to a shared resource.

An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call . Then, call QueryInterface on the object that returns to retrieve the interface.

Any object that supports also supports .

The runtime automatically creates an interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an interface when you call to create a 2D texture. To retrieve the interface that represents the 2D texture surface, call ID3D11Texture2D::QueryInterface. In this call, you must pass the identifier of . If the 2D texture has only a single MIP-map level and does not consist of an array of textures, QueryInterface succeeds and returns a reference to the interface reference. Otherwise, QueryInterface fails and does not return the reference to .

You can call the method to create an interface that refers to one subresource of a stereo resource.

hh404628 IDXGISurface2 IDXGISurface2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets the parent resource and subresource index that support a subresource surface.

The globally unique identifier () of the requested interface type.

A reference to a buffer that receives a reference to the parent resource object for the subresource surface.

A reference to a variable that receives the index of the subresource surface.

Returns if successful; otherwise, returns one of the following values:

  • E_NOINTERFACE if the object does not implement the that the riid parameter specifies.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

For subresource surface objects that the method creates, GetResource simply returns the values that were used to create the subresource surface.

Current objects that implement are either resources or views. GetResource for these objects returns ?this? or the resource that supports the view respectively. In this situation, the subresource index is 0.

hh404629 HRESULT IDXGISurface2::GetResource([In] const GUID& riid,[Out] void** ppParentResource,[Out] unsigned int* pSubresourceIndex) IDXGISurface2::GetResource
Initializes a new sub resource surface instance of class.

An interface implements one or more surfaces for storing rendered data before presenting it to an output.

You can create a swap chain by calling , , or . You can also create a swap chain when you call D3D11CreateDeviceAndSwapChain; however, you can then only access the sub-set of swap-chain functionality that the interface provides.

bb174569 IDXGISwapChain IDXGISwapChain
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use .]

Get a description of the swap chain.

bb174572 GetDesc GetDesc HRESULT IDXGISwapChain::GetDesc([Out] DXGI_SWAP_CHAIN_DESC* pDesc)

Get the output (the display monitor) that contains the majority of the client area of the target window.

If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.

The output is also owned by the adapter on which the swap chain's device was created.

You cannot call GetContainingOutput on a swap chain that you created with .

bb174571 GetContainingOutput GetContainingOutput HRESULT IDXGISwapChain::GetContainingOutput([Out] IDXGIOutput** ppOutput)

Gets the number of times that or has been called.

For info about presentation statistics for a frame, see .

bb174575 GetLastPresentCount GetLastPresentCount HRESULT IDXGISwapChain::GetLastPresentCount([Out] unsigned int* pLastPresentCount)

Presents a rendered image to the user.

An integer that specifies how to synchronize presentation of a frame with the vertical blank.

For the bit-block transfer (bitblt) model ( or ), values are:

  • 0 - The presentation occurs immediately, there is no synchronization.
  • 1 through 4 - Synchronize presentation after the nth vertical blank.

For the flip model (), values are:

  • 0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued.
  • 1 through 4 - Synchronize presentation for at least n vertical blanks.

For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.

If the update region straddles more than one output (each represented by ), Present performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.

An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.

Possible return values include: , or (see DXGI_ERROR), (see ), or D3DDDIERR_DEVICEREMOVED.

Note??The Present method can return either or D3DDDIERR_DEVICEREMOVED if a video card has been physically removed from the computer, or a driver upgrade for the video card has occurred.?

Starting with Direct3D 11.1, consider using because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.

For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.

Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.

Differences between Direct3D 9 and Direct3D 10:

Specifying in the Flags parameter is analogous to IDirect3DDevice9::TestCooperativeLevel in Direct3D 9.

?

For flip presentation model swap chains that you create with the value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.

For info about how data values change when you present content to the screen, see Converting data for the color space.

bb174576 HRESULT IDXGISwapChain::Present([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS Flags) IDXGISwapChain::Present

Accesses one of the swap-chain's back buffers.

A zero-based buffer index.

If the swap chain's swap effect is , this method can only access the first buffer; for this situation, set the index to zero.

If the swap chain's swap effect is either or , only the swap chain's zero-index buffer can be read from and written to. The swap chain's buffers with indexes greater than zero can only be read from; so if you call the method for such buffers, they have the flag set.

The type of interface used to manipulate the buffer.

A reference to a back-buffer interface.

Returns one of the following DXGI_ERROR.

bb174570 HRESULT IDXGISwapChain::GetBuffer([In] unsigned int Buffer,[In] const GUID& riid,[Out] void** ppSurface) IDXGISwapChain::GetBuffer

Sets the display state to windowed or full screen.

A Boolean value that specifies whether to set the display state to windowed or full screen. TRUE for full screen, and for windowed.

If you pass TRUE to the Fullscreen parameter to set the display state to full screen, you can optionally set this parameter to a reference to an interface for the output target that contains the swap chain. If you set this parameter to null, DXGI will choose the output based on the swap-chain's device and the output window's placement. If you pass to Fullscreen, you must set this parameter to null.

This methods returns:

  • if the action succeeded and the swap chain was placed in the requested state.
  • if the action failed. There are many reasons why a windowed-mode swap chain cannot switch to full-screen mode. For instance:
    • The application is running over Terminal Server.
    • The output window is occluded.
    • The output window does not have keyboard focus.
    • Another application is already in full-screen mode.

    When this error is returned, an application can continue to run in windowed mode and try to switch to full-screen mode later.

  • is returned if a fullscreen/windowed mode transition is occurring when this API is called.
  • Other error codes if you run out of memory or encounter another unexpected fault; these codes may be treated as hard, non-continuable errors.

DXGI may change the display state of a swap chain in response to end user or system requests.

We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through SetFullscreenState; that is, do not set the Windowed member of to to force the swap chain to be full screen. However, if you create the swap chain as full screen, also provide the end user with a list of supported display modes because a swap chain that is created with an unsupported display mode might cause the display to go black and prevent the end user from seeing anything. Also, we recommend that you have a time-out confirmation screen or other fallback mechanism when you allow the end user to change display modes.

bb174579 HRESULT IDXGISwapChain::SetFullscreenState([In] BOOL Fullscreen,[In, Optional] IDXGIOutput* pTarget) IDXGISwapChain::SetFullscreenState

Get the state associated with full-screen mode.

A reference to a boolean whose value is either:

  • TRUE if the swap chain is in full-screen mode
  • if the swap chain is in windowed mode

A reference to the output target (see ) when the mode is full screen; otherwise null.

Returns one of the following DXGI_ERROR.

When the swap chain is in full-screen mode, a reference to the target output will be returned and its reference count will be incremented.

bb174574 HRESULT IDXGISwapChain::GetFullscreenState([Out, Optional] BOOL* pFullscreen,[Out, Optional] IDXGIOutput** ppTarget) IDXGISwapChain::GetFullscreenState

[Starting with Direct3D 11.1, we recommend not to use GetDesc anymore to get a description of the swap chain. Instead, use .]

Get a description of the swap chain.

No documentation.

Returns one of the following DXGI_ERROR.

bb174572 HRESULT IDXGISwapChain::GetDesc([Out] DXGI_SWAP_CHAIN_DESC* pDesc) IDXGISwapChain::GetDesc

Changes the swap chain's back buffer size, format, and number of buffers. This should be called when the application window is resized.

The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.

The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the method to create the swap chain for a composition surface.

The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the method to create the swap chain for a composition surface.

A -typed value for the new format of the back buffer. Set this value to to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model.

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

You can't resize a swap chain unless you release all outstanding references to its back buffers. You must release all of its direct and indirect references on the back buffers in order for ResizeBuffers to succeed.

Direct references are held by the application after it calls AddRef on a resource.

Indirect references are held by views to a resource, binding a view of the resource to a device context, a command list that used the resource, a command list that used a view to that resource, a command list that executed another command list that used the resource, and so on.

Before you call ResizeBuffers, ensure that the application releases all references (by calling the appropriate number of Release invocations) on the resources, any views to the resource, and any command lists that use either the resources or views, and ensure that neither the resource nor a view is still bound to a device context. You can use to ensure that all references are released. If a view is bound to a deferred context, you must discard the partially built command list as well (by calling , then , then Release on the command list). After you call ResizeBuffers, you can re-query interfaces via .

For swap chains that you created with , before you call ResizeBuffers, also call on the swap chain's back-buffer surface to ensure that you have no outstanding GDI device contexts (DCs) open.

We recommend that you call ResizeBuffers when a client window is resized (that is, when an application receives a WM_SIZE message).

The only difference between in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the or value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the method fails.

bb174577 HRESULT IDXGISwapChain::ResizeBuffers([In] unsigned int BufferCount,[In] unsigned int Width,[In] unsigned int Height,[In] DXGI_FORMAT NewFormat,[In] DXGI_SWAP_CHAIN_FLAG SwapChainFlags) IDXGISwapChain::ResizeBuffers

Resizes the output target.

A reference to a structure that describes the mode, which specifies the new width, height, format, and refresh rate of the target. If the format is , ResizeTarget uses the existing format. We only recommend that you use when the swap chain is in full-screen mode as this method is not thread safe.

Returns a code that indicates success or failure. is returned if a full-screen/windowed mode transition is occurring when this API is called. See DXGI_ERROR for additional DXGI error codes.

ResizeTarget resizes the target window when the swap chain is in windowed mode, and changes the display mode on the target output when the swap chain is in full-screen mode. Therefore, apps can call ResizeTarget to resize the target window (rather than a Microsoft Win32API such as SetWindowPos) without knowledge of the swap chain display mode.

If a Windows Store app calls ResizeTarget, it fails with .

You cannot call ResizeTarget on a swap chain that you created with .

Apps must still call after they call ResizeTarget because only ResizeBuffers can change the back buffers. But, if those apps have implemented window resize processing to call ResizeBuffers, they don't need to explicitly call ResizeBuffers after they call ResizeTarget because the window resize processing will achieve what the app requires.

bb174578 HRESULT IDXGISwapChain::ResizeTarget([In] const DXGI_MODE_DESC* pNewTargetParameters) IDXGISwapChain::ResizeTarget

Get the output (the display monitor) that contains the majority of the client area of the target window.

A reference to the output interface (see ).

Returns one of the following DXGI_ERROR.

If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.

The output is also owned by the adapter on which the swap chain's device was created.

You cannot call GetContainingOutput on a swap chain that you created with .

bb174571 HRESULT IDXGISwapChain::GetContainingOutput([Out] IDXGIOutput** ppOutput) IDXGISwapChain::GetContainingOutput

Gets performance statistics about the last render frame.

A reference to a structure for the frame statistics.

Returns one of the DXGI_ERROR values.

You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.

You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the value in the SwapEffect member of the structure to specify that the swap chain uses the flip presentation model.

bb174573 HRESULT IDXGISwapChain::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats) IDXGISwapChain::GetFrameStatistics

Gets the number of times that or has been called.

No documentation.

Returns one of the DXGI_ERROR values.

For info about presentation statistics for a frame, see .

bb174575 HRESULT IDXGISwapChain::GetLastPresentCount([Out] unsigned int* pLastPresentCount) IDXGISwapChain::GetLastPresentCount
Creates a swap chain. If you attempt to create a swap chain in full-screen mode, and full-screen mode is unavailable, the swap chain will be created in windowed mode and DXGI_STATUS_OCCLUDED will be returned. If the buffer width or the buffer height are zero, the sizes will be inferred from the output window size in the swap-chain description. Since the target output cannot be chosen explicitly when the swap-chain is created, you should not create a full-screen swap chain. This can reduce presentation performance if the swap chain size and the output window size do not match. Here are two ways to ensure the sizes match: Create a windowed swap chain and then set it full-screen using . Save a reference to the swap-chain immediately after creation, and use it to get the output window size during a WM_SIZE event. Then resize the swap chain buffers (with ) during the transition from windowed to full-screen. If the swap chain is in full-screen mode, before you release it, you must use {{SetFullscreenState}} to switch it to windowed mode. For more information about releasing a swap chain, see the Destroying a Swap Chain section of {{DXGI Overview}}. a reference to a . A reference to the device that will write 2D images to the swap chain. A reference to the swap-chain description (see ). HRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out] IDXGISwapChain** ppSwapChain) bb174537 HRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out, Fast] IDXGISwapChain** ppSwapChain) IDXGIFactory::CreateSwapChain Access one of the swap-chain back buffers. The interface of the surface to resolve from the back buffer A zero-based buffer index. If the swap effect is not DXGI_SWAP_EFFECT_SEQUENTIAL, this method only has access to the first buffer; for this case, set the index to zero. Returns a reference to a back-buffer interface. bb174570 HRESULT IDXGISwapChain::GetBuffer([In] unsigned int Buffer,[In] const GUID& riid,[Out] void** ppSurface) IDXGISwapChain::GetBuffer

Gets performance statistics about the last render frame.

You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.

You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the value in the SwapEffect member of the structure to specify that the swap chain uses the flip presentation model.

bb174573 GetFrameStatistics GetFrameStatistics HRESULT IDXGISwapChain::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats)
Gets or sets a value indicating whether the swapchain is in fullscreen. true if this swapchain is in fullscreen; otherwise, false. bb174574 HRESULT IDXGISwapChain::GetFullscreenState([Out] BOOL* pFullscreen,[Out] IDXGIOutput** ppTarget) IDXGISwapChain::GetFullscreenState

[Starting with Direct3D 11.1, we recommend not to use Present anymore to present a rendered image. Instead, use . For more info, see Remarks.]

Presents a rendered image to the user.

No documentation. No documentation.

Possible return values include: , or (see DXGI_ERROR), (see ), or D3DDDIERR_DEVICEREMOVED.

Note??The Present method can return either or D3DDDIERR_DEVICEREMOVED if a video card has been physically removed from the computer, or a driver upgrade for the video card has occurred.

Starting with Direct3D 11.1, we recommend to instead use because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.

For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.

Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.

Differences between Direct3D 9 and Direct3D 10:

Specifying in the Flags parameter is analogous to IDirect3DDevice9::TestCooperativeLevel in Direct3D 9.

?

For flip presentation model swap chains that you create with the value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.

For info about how data values change when you present content to the screen, see Converting data for the color space.

bb174576 HRESULT IDXGISwapChain::Present([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS Flags) IDXGISwapChain::Present

Provides presentation capabilities that are enhanced from . These presentation capabilities consist of specifying dirty rectangles and scroll rectangle to optimize the presentation.

You can create a swap chain by calling , , or . You can also create a swap chain when you call D3D11CreateDeviceAndSwapChain; however, you can then only access the sub-set of swap-chain functionality that the interface provides.

provides the IsTemporaryMonoSupported method that you can use to determine whether the swap chain supports "temporary mono? presentation. This type of swap chain is a stereo swap chain that can be used to present mono content.

Note??Some stereo features like the advanced presentation flags are not represented by an explicit interface change. Furthermore, the original () and new () swap chain interfaces generally have the same behavior. For information about how methods are translated into methods, see the descriptions of the methods.?
hh404631 IDXGISwapChain1 IDXGISwapChain1
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets a description of the swap chain.

hh404640 GetDesc1 GetDesc1 HRESULT IDXGISwapChain1::GetDesc1([Out] DXGI_SWAP_CHAIN_DESC1* pDesc)

Gets a description of a full-screen swap chain.

The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for -based swap chains.

hh404644 GetFullscreenDesc GetFullscreenDesc HRESULT IDXGISwapChain1::GetFullscreenDesc([Out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc)

Retrieves the underlying for this swap-chain object.

Applications call the method to create a swap chain that is associated with an .

hh404647 GetHwnd GetHwnd HRESULT IDXGISwapChain1::GetHwnd([Out] HWND* pHwnd)

Determines whether a swap chain supports ?temporary mono.?

Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the method with the flag. All windowed swap chains support temporary mono. However, full-screen swap chains optionally support temporary mono because not all hardware supports temporary mono on full-screen swap chains efficiently.

hh446794 IsTemporaryMonoSupported IsTemporaryMonoSupported BOOL IDXGISwapChain1::IsTemporaryMonoSupported()

Gets the output (the display monitor) to which you can restrict the contents of a present operation.

If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.

The output is also owned by the adapter on which the swap chain's device was created.

hh446788 GetRestrictToOutput GetRestrictToOutput HRESULT IDXGISwapChain1::GetRestrictToOutput([Out] IDXGIOutput** ppRestrictToOutput)

Retrieves or sets the background color of the swap chain.

Note??The background color that GetBackgroundColor retrieves does not indicate what the screen currently displays. The background color indicates what the screen will display with your next call to the method. The default value of the background color is black with full opacity: 0,0,0,1.? hh404634 GetBackgroundColor / SetBackgroundColor GetBackgroundColor HRESULT IDXGISwapChain1::GetBackgroundColor([Out] D3DCOLORVALUE* pColor)

Gets or sets the rotation of the back buffers for the swap chain.

hh446791 GetRotation / SetRotation GetRotation HRESULT IDXGISwapChain1::GetRotation([Out] DXGI_MODE_ROTATION* pRotation)

Gets a description of the swap chain.

A reference to a structure that describes the swap chain.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

hh404640 HRESULT IDXGISwapChain1::GetDesc1([Out] DXGI_SWAP_CHAIN_DESC1* pDesc) IDXGISwapChain1::GetDesc1

Gets a description of a full-screen swap chain.

A reference to a structure that describes the full-screen swap chain.

GetFullscreenDesc returns:

  • if it successfully retrieved the description of the full-screen swap chain.
  • for non- swap chains or if pDesc is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

The semantics of GetFullscreenDesc are identical to that of the IDXGISwapchain::GetDesc method for -based swap chains.

hh404644 HRESULT IDXGISwapChain1::GetFullscreenDesc([Out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc) IDXGISwapChain1::GetFullscreenDesc

Retrieves the underlying for this swap-chain object.

No documentation.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

If pHwnd receives null (that is, the swap chain is not -based), GetHwnd returns .

Applications call the method to create a swap chain that is associated with an .

hh404647 HRESULT IDXGISwapChain1::GetHwnd([Out] HWND* pHwnd) IDXGISwapChain1::GetHwnd

Retrieves the underlying CoreWindow object for this swap-chain object.

No documentation. No documentation.

GetCoreWindow returns:

  • if it successfully retrieved the underlying CoreWindow object.
  • if ppUnk is null; that is, the swap chain is not associated with a CoreWindow object.
  • Any that a call to QueryInterface to query for an CoreWindow object might typically return.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetCoreWindow fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

Applications call the method to create a swap chain that is associated with an CoreWindow object.

hh404650 HRESULT IDXGISwapChain1::GetCoreWindow([In] const GUID& refiid,[Out] void** ppUnk) IDXGISwapChain1::GetCoreWindow

Presents a frame on the display screen.

An integer that specifies how to synchronize presentation of a frame with the vertical blank.

For the bit-block transfer (bitblt) model ( or ), values are:

  • 0 - The presentation occurs immediately, there is no synchronization.
  • 1 through 4 - Synchronize presentation after the nth vertical blank.

For the flip model (), values are:

  • 0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued.
  • 1 through 4 - Synchronize presentation for at least n vertical blanks.

For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.

If the update region straddles more than one output (each represented by ), Present1 performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.

An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.

A reference to a structure that describes updated rectangles and scroll information of the frame to present.

Possible return values include: , , , , or E_OUTOFMEMORY.

An app can use Present1 to optimize presentation by specifying scroll and dirty rectangles. When the runtime has information about these rectangles, the runtime can then perform necessary bitblts during presentation more efficiently and pass this metadata to the Desktop Window Manager (DWM). The DWM can then use the metadata to optimize presentation and pass the metadata to indirect displays and terminal servers to optimize traffic over the wire. An app must confine its modifications to only the dirty regions that it passes to Present1, as well as modify the entire dirty region to avoid undefined resource contents from being exposed.

For flip presentation model swap chains that you create with the value set, a successful presentation results in an unbind of back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.

For info about how data values change when you present content to the screen, see Converting data for the color space.

For info about calling Present1 when your app uses multiple threads, see Multithread Considerations and Multithreading and DXGI.

hh446797 HRESULT IDXGISwapChain1::Present1([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS PresentFlags,[In] const void* pPresentParameters) IDXGISwapChain1::Present1

Determines whether a swap chain supports ?temporary mono.?

Indicates whether to use the swap chain in temporary mono mode. TRUE indicates that you can use temporary-mono mode; otherwise, .

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, IsTemporaryMonoSupported always returns because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the method with the flag. All windowed swap chains support temporary mono. However, full-screen swap chains optionally support temporary mono because not all hardware supports temporary mono on full-screen swap chains efficiently.

hh446794 BOOL IDXGISwapChain1::IsTemporaryMonoSupported() IDXGISwapChain1::IsTemporaryMonoSupported

Gets the output (the display monitor) to which you can restrict the contents of a present operation.

A reference to a buffer that receives a reference to the interface for the restrict-to output. An application passes this reference to in a call to the , , or method to create the swap chain.

Returns if the restrict-to output was successfully retrieved; otherwise, returns E_INVALIDARG if the reference is invalid.

If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.

The output is also owned by the adapter on which the swap chain's device was created.

hh446788 HRESULT IDXGISwapChain1::GetRestrictToOutput([Out] IDXGIOutput** ppRestrictToOutput) IDXGISwapChain1::GetRestrictToOutput

Changes the background color of the swap chain.

A reference to a DXGI_RGBA structure that specifies the background color to set.

SetBackgroundColor returns:

  • if it successfully set the background color.
  • E_INVALIDARG if the pColor parameter is incorrect, for example, pColor is null or any of the floating-point values of the members of DXGI_RGBA to which pColor points are outside the range from 0.0 through 1.0.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetBackgroundColor fails with E_NOTIMPL. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

The background color affects only swap chains that you create with in windowed mode. You pass this value in a call to , , or . Typically, the background color is not visible unless the swap-chain contents are smaller than the destination window.

When you set the background color, it is not immediately realized. It takes effect in conjunction with your next call to the method. The DXGI_PRESENT flags that you pass to can help achieve the effect that you require. For example, if you call SetBackgroundColor and then call with the Flags parameter set to , you change only the background color without changing the displayed contents of the swap chain.

When you call the method to display contents of the swap chain, uses the value that is specified in the AlphaMode member of the structure to determine how to handle the a member of the DXGI_RGBA structure, the alpha value of the background color, that achieves window transparency. For example, if AlphaMode is , ignores the a member of DXGI_RGBA.

Note??Like all presentation data, we recommend that you perform floating point operations in a linear color space. When the desktop is in a fixed bit color depth mode, the operating system converts linear color data to standard RGB data (sRGB, gamma 2.2 corrected space) to compose to the screen. For more info, see Converting data for the color space.?
hh446799 HRESULT IDXGISwapChain1::SetBackgroundColor([In] const D3DCOLORVALUE* pColor) IDXGISwapChain1::SetBackgroundColor

Retrieves the background color of the swap chain.

A reference to a DXGI_RGBA structure that receives the background color of the swap chain.

GetBackgroundColor returns:

  • if it successfully retrieves the background color.
  • if the pColor parameter is invalid, for example, pColor is null.
  • Possibly other error codes that are described in the DXGI_ERROR topic.
Note??The background color that GetBackgroundColor retrieves does not indicate what the screen currently displays. The background color indicates what the screen will display with your next call to the method. The default value of the background color is black with full opacity: 0,0,0,1.? hh404634 HRESULT IDXGISwapChain1::GetBackgroundColor([Out] D3DCOLORVALUE* pColor) IDXGISwapChain1::GetBackgroundColor

Sets the rotation of the back buffers for the swap chain.

A -typed value that specifies how to set the rotation of the back buffers for the swap chain.

SetRotation returns:

  • if it successfully set the rotation.
  • if the swap chain is bit-block transfer (bitblt) model. The swap chain must be flip model to successfully call SetRotation.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, SetRotation fails with . For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

You can only use SetRotation to rotate the back buffers for flip-model swap chains that you present in windowed mode.

SetRotation isn't supported for rotating the back buffers for flip-model swap chains that you present in full-screen mode. In this situation, SetRotation doesn't fail, but you must ensure that you specify no rotation () for the swap chain. Otherwise, when you call or to present a frame, the presentation fails.

hh446801 HRESULT IDXGISwapChain1::SetRotation([In] DXGI_MODE_ROTATION Rotation) IDXGISwapChain1::SetRotation

Gets the rotation of the back buffers for the swap chain.

A reference to a variable that receives a -typed value that specifies the rotation of the back buffers for the swap chain.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

Platform Update for Windows?7:??On Windows?7 or Windows Server?2008?R2 with the Platform Update for Windows?7 installed, GetRotation fails with . For more info about the Platform Update for Windows?7, see Platform Update for Windows 7.

hh446791 HRESULT IDXGISwapChain1::GetRotation([Out] DXGI_MODE_ROTATION* pRotation) IDXGISwapChain1::GetRotation
Creates a swapchain associated to the specified HWND. This is applicable only for Desktop platform. The DXGI Factory used to create the swapchain. The associated device instance. The HWND of the window to which this swapchain is associated. The swap chain description. The fullscreen description of the swap chain. Default is null. The output to which this swap chain should be restricted. Default is null, meaning that there is no restriction. Creates a swapchain associated to the specified CoreWindow. This is applicable only for WinRT platform. The DXGI Factory used to create the swapchain. The associated device instance. The HWND of the window to which this swapchain is associated. The swap chain description. The output to which this swap chain should be restricted. Default is null, meaning that there is no restriction. Creates a swapchain for DirectComposition API or WinRT XAML framework. This is applicable only for WinRT platform. The DXGI Factory used to create the swapchain. The associated device instance. The swap chain description. The output to which this swap chain should be restricted. Default is null, meaning that there is no restriction. [This documentation is preliminary and is subject to change.] An integer that specifies how to synchronize presentation of a frame with the vertical blank. For the bit-block transfer (bitblt) model, values are: 0 - The presentation occurs immediately, there is no synchronization. 1,2,3,4 - Synchronize presentation after the nth vertical blank. For the flip model, values are: 0 - Discard this frame if you submitted a more recent presentation. n > 0 - Synchronize presentation for at least n vertical blanks. For an example that shows how sync-interval values affect a flip presentation queue, see Remarks. If the update region straddles more than one output (each represented by ), Present1 performs the synchronization to the output that contains the largest subrectangle of the target window's client area. An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants. A reference to a structure that describes updated rectangles and scroll information of the frame to present. Possible return values include: , , , , or E_OUTOFMEMORY. An application can use Present1 to optimize presentation by specifying scroll and dirty rectangles. When the runtime has information about these rectangles, the runtime can then perform necessary bitblts during presentation more efficiently and pass this metadata to the Desktop Window Manager (DWM). The DWM can then use the metadata to optimize presentation and pass the metadata to indirect displays and terminal servers to optimize traffic over the wire. An application must confine its modifications to only the dirty regions that it passes to Present1, as well as modify the entire dirty region to avoid undefined resource contents from being exposed.For flip presentation model swap chains that you create with the value set, a successful presentation results in an unbind of back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.Flip presentation model queueSuppose the following frames with sync-interval values are queued from oldest (A) to newest (E) before you call Present1.A: 3, B: 0, C: 0, D: 1, E: 0When you call Present1, the runtime shows frame A for 3 vertical blank intervals, then frame D for 1 vertical blank interval, and then frame E until you submit a new presentation. The runtime discards frames C and D. HRESULT IDXGISwapChain1::Present1([In] unsigned int SyncInterval,[In] unsigned int PresentFlags,[In] const void* pPresentParameters)

Extends with methods to support swap back buffer scaling and lower-latency swap chains.

You can create a swap chain by calling , , or .

dn280420 IDXGISwapChain2 IDXGISwapChain2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets or sets the number of frames that the swap chain is allowed to queue for rendering.

dn268311 GetMaximumFrameLatency / SetMaximumFrameLatency GetMaximumFrameLatency HRESULT IDXGISwapChain2::GetMaximumFrameLatency([Out] unsigned int* pMaxLatency)

Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.

Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the flag set, then call GetFrameLatencyWaitableObject to retrieve the waitable handle. Use the waitable handle with WaitForSingleObjectEx to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample.

dn268309 GetFrameLatencyWaitableObject GetFrameLatencyWaitableObject void* IDXGISwapChain2::GetFrameLatencyWaitableObject()

Gets or sets the transform matrix that will be applied to a composition swap chain upon the next present.

Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.

dn268310 GetMatrixTransform / SetMatrixTransform GetMatrixTransform HRESULT IDXGISwapChain2::GetMatrixTransform([Out] DXGI_MATRIX_3X2_F* pMatrix)

Sets the source region to be used for the swap chain.

Use SetSourceSize to specify the portion of the swap chain from which the operating system presents. This allows an effective resize without calling the more-expensive method. Prior to Windows?8.1, calling was the only way to resize the swap chain. The source rectangle is always defined by the region [0, 0, Width, Height].

No documentation. No documentation.

This method can return:

  • E_INVALIDARG if one or more parameters exceed the size of the back buffer.
  • Possibly other error codes that are described in the DXGI_ERROR topic.
dn280409 HRESULT IDXGISwapChain2::SetSourceSize([In] unsigned int Width,[In] unsigned int Height) IDXGISwapChain2::SetSourceSize

Gets the source region used for the swap chain.

Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.

No documentation. No documentation.

This method can return error codes that are described in the DXGI_ERROR topic.

dn280408 HRESULT IDXGISwapChain2::GetSourceSize([Out] unsigned int* pWidth,[Out] unsigned int* pHeight) IDXGISwapChain2::GetSourceSize

Sets the number of frames that the swap chain is allowed to queue for rendering.

The maximum number of back buffer frames that will be queued for the swap chain. This value is 3 by default.

Returns if successful; otherwise, if the device was removed.

This method is only valid for use on swap chains created with . Otherwise, the result will be .

dn268313 HRESULT IDXGISwapChain2::SetMaximumFrameLatency([In] unsigned int MaxLatency) IDXGISwapChain2::SetMaximumFrameLatency

Gets the number of frames that the swap chain is allowed to queue for rendering.

The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default, but should be set to 2 if the scene takes longer than it takes for one vertical refresh (typically about 16ms) to draw.

Returns if successful; otherwise, returns one of the following members of the D3DERR enumerated type:

  • D3DERR_DEVICELOST
  • D3DERR_DEVICEREMOVED
  • D3DERR_DRIVERINTERNALERROR
  • D3DERR_INVALIDCALL
  • D3DERR_OUTOFVIDEOMEMORY
dn268311 HRESULT IDXGISwapChain2::GetMaximumFrameLatency([Out] unsigned int* pMaxLatency) IDXGISwapChain2::GetMaximumFrameLatency

Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.

Windows?8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the flag set, then call GetFrameLatencyWaitableObject to retrieve the waitable handle. Use the waitable handle with WaitForSingleObjectEx to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample.

A handle to the waitable object, or null if the swap chain was not created with .

dn268309 void* IDXGISwapChain2::GetFrameLatencyWaitableObject() IDXGISwapChain2::GetFrameLatencyWaitableObject

Sets the transform matrix that will be applied to a composition swap chain upon the next present.

Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.

No documentation.

SetMatrixTransform returns:

  • if it successfully retrieves the transform matrix.
  • E_INVALIDARG if the pMatrix parameter is incorrect, for example, pMatrix is null or the matrix represented by includes components other than scale and translation.
  • if the method is called on a swap chain that was not created with CreateSwapChainForComposition.
  • Possibly other error codes that are described in the DXGI_ERROR topic.
dn268312 HRESULT IDXGISwapChain2::SetMatrixTransform([In] const DXGI_MATRIX_3X2_F* pMatrix) IDXGISwapChain2::SetMatrixTransform

Gets the transform matrix that will be applied to a composition swap chain upon the next present.

Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in XAML pages using the SwapChainPanel element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch UI. The GetMatrixTransform and SetMatrixTransform methods are used to synchronize scaling of the DirectX swap chain with its associated SwapChainPanel element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.

No documentation.

GetMatrixTransform returns:

  • if it successfully retrieves the transform matrix.
  • if the method is called on a swap chain that was not created with CreateSwapChainForComposition.
  • Possibly other error codes that are described in the DXGI_ERROR topic.
dn268310 HRESULT IDXGISwapChain2::GetMatrixTransform([Out] DXGI_MATRIX_3X2_F* pMatrix) IDXGISwapChain2::GetMatrixTransform

[This documentation is preliminary and is subject to change.]

Gets the source region used for the swap chain.

Use GetSourceSize to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use SetSourceSize to set this portion of the swap chain.

This method can return error codes that are described in the DXGI_ERROR topic.

dn280408 HRESULT IDXGISwapChain2::GetSourceSize([Out] unsigned int* pWidth,[Out] unsigned int* pHeight) IDXGISwapChain2::GetSourceSize

Extends with methods to support getting the index of the swap chain's current back buffer and support for color space.

dn903673 IDXGISwapChain3 IDXGISwapChain3
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Gets the index of the swap chain's current back buffer.

dn903675 GetCurrentBackBufferIndex GetCurrentBackBufferIndex unsigned int IDXGISwapChain3::GetCurrentBackBufferIndex()

Sets the color space used by the swap chain.

dn903676 SetColorSpace1 SetColorSpace1 HRESULT IDXGISwapChain3::SetColorSpace1([In] DXGI_COLOR_SPACE_TYPE ColorSpace)

Gets the index of the swap chain's current back buffer.

Returns the index of the current back buffer.

dn903675 unsigned int IDXGISwapChain3::GetCurrentBackBufferIndex() IDXGISwapChain3::GetCurrentBackBufferIndex

Checks the swap chain's support for color space.

A -typed value that specifies color space type to check support for.

A reference to a variable that receives a combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for color space support.

dn903674 HRESULT IDXGISwapChain3::CheckColorSpaceSupport([In] DXGI_COLOR_SPACE_TYPE ColorSpace,[Out] DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG* pColorSpaceSupport) IDXGISwapChain3::CheckColorSpaceSupport

Sets the color space used by the swap chain.

A -typed value that specifies the color space to set.

This method returns on success, or it returns one of the error codes that are described in the DXGI_ERROR topic.

dn903676 HRESULT IDXGISwapChain3::SetColorSpace1([In] DXGI_COLOR_SPACE_TYPE ColorSpace) IDXGISwapChain3::SetColorSpace1

Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.

The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.

The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the method to create the swap chain for a composition surface.

The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the method to create the swap chain for a composition surface.

A -typed value for the new format of the back buffer. Set this value to to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model.

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.

An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.

An array of command queues ( instances), of total size BufferCount. Each queue provided must match the corresponding creation node mask specified in the pCreationNodeMask array. When Present() is called, in addition to rotating to the next buffer for the next frame, the swapchain will also rotate through these command queues. This allows the app to control which queue requires synchronization for a given present operation.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

This method is only valid to call when the swapchain was created using a D3D12 command queue () as an input device.

When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.

The only difference between in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the or value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the method fails.

Also see the Remarks section in , all of which is relevant to ResizeBuffers1.

mt403341 HRESULT IDXGISwapChain3::ResizeBuffers1([In] unsigned int BufferCount,[In] unsigned int Width,[In] unsigned int Height,[In] DXGI_FORMAT Format,[In] DXGI_SWAP_CHAIN_FLAG SwapChainFlags,[In, Buffer] const unsigned int* pCreationNodeMask,[In, Buffer] const IUnknown** ppPresentQueue) IDXGISwapChain3::ResizeBuffers1

Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.

The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.

The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the method to create the swap chain for a composition surface.

The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the method to create the swap chain for a composition surface.

A -typed value for the new format of the back buffer. Set this value to to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model.

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.

An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.

An array of command queues ( instances), of total size BufferCount. Each queue provided must match the corresponding creation node mask specified in the pCreationNodeMask array. When Present() is called, in addition to rotating to the next buffer for the next frame, the swapchain will also rotate through these command queues. This allows the app to control which queue requires synchronization for a given present operation.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

This method is only valid to call when the swapchain was created using a D3D12 command queue () as an input device.

When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.

The only difference between in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the or value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the method fails.

Also see the Remarks section in , all of which is relevant to ResizeBuffers1.

mt403341 HRESULT IDXGISwapChain3::ResizeBuffers1([In] unsigned int BufferCount,[In] unsigned int Width,[In] unsigned int Height,[In] DXGI_FORMAT Format,[In] DXGI_SWAP_CHAIN_FLAG SwapChainFlags,[In, Buffer] const unsigned int* pCreationNodeMask,[In, Buffer] const IUnknown** ppPresentQueue) IDXGISwapChain3::ResizeBuffers1

Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a D3D12 command queue as an input device. This should be called when the application window is resized.

The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than DXGI_MAX_SWAP_CHAIN_BUFFERS. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model.

The new width of the back buffer. If you specify zero, DXGI will use the width of the client area of the target window. You can't specify the width as zero if you called the method to create the swap chain for a composition surface.

The new height of the back buffer. If you specify zero, DXGI will use the height of the client area of the target window. You can't specify the height as zero if you called the method to create the swap chain for a composition surface.

A -typed value for the new format of the back buffer. Set this value to to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model.

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.

An array of UINTs, of total size BufferCount, where the value indicates which node the back buffer should be created on. Buffers created using ResizeBuffers1 with a non-null pCreationNodeMask array are visible to all nodes.

An array of command queues ( instances), of total size BufferCount. Each queue provided must match the corresponding creation node mask specified in the pCreationNodeMask array. When Present() is called, in addition to rotating to the next buffer for the next frame, the swapchain will also rotate through these command queues. This allows the app to control which queue requires synchronization for a given present operation.

Returns if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

This method is only valid to call when the swapchain was created using a D3D12 command queue () as an input device.

When a swapchain is created on a multi-GPU adapter, the backbuffers are all created on node 1 and only a single command queue is supported. ResizeBuffers1 enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering (AFR) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters.

The only difference between in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the or value set. In Windows?8, you must call ResizeBuffers to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the method fails.

Also see the Remarks section in , all of which is relevant to ResizeBuffers1.

mt403341 HRESULT IDXGISwapChain3::ResizeBuffers1([In] unsigned int BufferCount,[In] unsigned int Width,[In] unsigned int Height,[In] DXGI_FORMAT Format,[In] DXGI_SWAP_CHAIN_FLAG SwapChainFlags,[In, Buffer] const unsigned int* pCreationNodeMask,[In, Buffer] const IUnknown** ppPresentQueue) IDXGISwapChain3::ResizeBuffers1

An interface implements one or more surfaces for storing rendered data before presenting it to an output.

You can create a swap chain by calling , , or . You can also create a swap chain when you call D3D11CreateDeviceAndSwapChain; however, you can then only access the sub-set of swap-chain functionality that the interface provides.

bb174569 IDXGISwapChain4 IDXGISwapChain4
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

This method sets High Dynamic Range (HDR) and Wide Color Gamut (WCG) header metadata.

Specifies one member of the enum.

Specifies the size of pMetaData, in bytes.

Specifies a void reference that references the metadata, if it exists. Refer to the structure.

This method returns an success or error code.

This method sets metadata to enable a monitor's output to be adjusted depending on its capabilities.

mt732708 HRESULT IDXGISwapChain4::SetHDRMetaData([In] DXGI_HDR_METADATA_TYPE Type,[In] unsigned int Size,[In, Buffer, Optional] void* pMetaData) IDXGISwapChain4::SetHDRMetaData

This swap chain interface allows desktop media applications to request a seamless change to a specific refresh rate.

For example, a media application presenting video at a typical framerate of 23.997 frames per second can request a custom refresh rate of 24 or 48 Hz to eliminate jitter. If the request is approved, the app starts presenting frames at the custom refresh rate immediately - without the typical 'mode switch' a user would experience when changing the refresh rate themselves by using the control panel.

Seamless changes to custom framerates can only be done on integrated panels. Custom frame rates cannot be applied to external displays. If the DXGI output adapter is attached to an external display then CheckPresentDurationSupport will return (0, 0) for upper and lower bounds, indicating that the device does not support seamless refresh rate changes.

Custom refresh rates can be used when displaying video with a dynamic framerate. However, the refresh rate change should be kept imperceptible to the user. A best practice for keeping the refresh rate transition imperceptible is to only set the custom framerate if the app determines it can present at that rate for least 5 seconds.

dn384131 IDXGISwapChainMedia IDXGISwapChainMedia
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Queries the system for a structure that indicates whether a custom refresh rate is currently approved by the system.

dn384133 GetFrameStatisticsMedia GetFrameStatisticsMedia HRESULT IDXGISwapChainMedia::GetFrameStatisticsMedia([Out] DXGI_FRAME_STATISTICS_MEDIA* pStats)

Requests a custom presentation duration (custom refresh rate).

dn384134 SetPresentDuration SetPresentDuration HRESULT IDXGISwapChainMedia::SetPresentDuration([In] unsigned int Duration)

Queries the system for a structure that indicates whether a custom refresh rate is currently approved by the system.

No documentation.

This method returns on success, or a DXGI error code on failure.

dn384133 HRESULT IDXGISwapChainMedia::GetFrameStatisticsMedia([Out] DXGI_FRAME_STATISTICS_MEDIA* pStats) IDXGISwapChainMedia::GetFrameStatisticsMedia

Requests a custom presentation duration (custom refresh rate).

The custom presentation duration, specified in hundreds of nanoseconds.

This method returns on success, or a DXGI error code on failure.

dn384134 HRESULT IDXGISwapChainMedia::SetPresentDuration([In] unsigned int Duration) IDXGISwapChainMedia::SetPresentDuration

Queries the graphics driver for a supported frame present duration corresponding to a custom refresh rate.

Indicates the frame duration to check. This value is the duration of one frame at the desired refresh rate, specified in hundreds of nanoseconds. For example, set this field to 167777 to check for 60 Hz refresh rate support.

A variable that will be set to the closest supported frame present duration that's smaller than the requested value, or zero if the device does not support any lower duration.

A variable that will be set to the closest supported frame present duration that's larger than the requested value, or zero if the device does not support any higher duration.

This method returns on success, or a DXGI error code on failure.

If the DXGI output adapter does not support custom refresh rates (for example, an external display) then the display driver will set upper and lower bounds to (0, 0).

dn384132 HRESULT IDXGISwapChainMedia::CheckPresentDurationSupport([In] unsigned int DesiredPresentDuration,[Out] unsigned int* pClosestSmallerPresentDuration,[Out] unsigned int* pClosestLargerPresentDuration) IDXGISwapChainMedia::CheckPresentDurationSupport

Describes an adapter (or video card) by using DXGI 1.0.

The structure provides a description of an adapter. This structure is initialized by using the method.

bb173058 DXGI_ADAPTER_DESC DXGI_ADAPTER_DESC

A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.

bb173058 wchar_t Description[128] wchar_t Description

The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.

bb173058 unsigned int VendorId unsigned int VendorId

The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.

bb173058 unsigned int DeviceId unsigned int DeviceId

The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.

bb173058 unsigned int SubSysId unsigned int SubSysId

The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.

bb173058 unsigned int Revision unsigned int Revision

The number of bytes of dedicated video memory that are not shared with the CPU.

bb173058 SIZE_T DedicatedVideoMemory SIZE_T DedicatedVideoMemory

The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.

bb173058 SIZE_T DedicatedSystemMemory SIZE_T DedicatedSystemMemory

The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.

bb173058 SIZE_T SharedSystemMemory SIZE_T SharedSystemMemory

A unique value that identifies the adapter. See for a definition of the structure. is defined in dxgi.h.

bb173058 LUID AdapterLuid LUID AdapterLuid

Describes an adapter (or video card) using DXGI 1.1.

The structure provides a DXGI 1.1 description of an adapter. This structure is initialized by using the method.

ff471326 DXGI_ADAPTER_DESC1 DXGI_ADAPTER_DESC1

A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc1 returns ?Software Adapter? for the description string.

ff471326 wchar_t Description[128] wchar_t Description

The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware vendor.

ff471326 unsigned int VendorId unsigned int VendorId

The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the hardware device.

ff471326 unsigned int DeviceId unsigned int DeviceId

The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the sub system.

ff471326 unsigned int SubSysId unsigned int SubSysId

The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc1 returns zeros for the PCI ID of the revision number of the adapter.

ff471326 unsigned int Revision unsigned int Revision

The number of bytes of dedicated video memory that are not shared with the CPU.

ff471326 SIZE_T DedicatedVideoMemory SIZE_T DedicatedVideoMemory

The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.

ff471326 SIZE_T DedicatedSystemMemory SIZE_T DedicatedSystemMemory

The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.

ff471326 SIZE_T SharedSystemMemory SIZE_T SharedSystemMemory

A unique value that identifies the adapter. See for a definition of the structure. is defined in dxgi.h.

ff471326 LUID AdapterLuid LUID AdapterLuid

A value of the enumerated type that describes the adapter type. The flag is reserved.

ff471326 DXGI_ADAPTER_FLAG Flags DXGI_ADAPTER_FLAG Flags

Describes an adapter (or video card) that uses Microsoft DirectX Graphics Infrastructure (DXGI) 1.2.

The structure provides a DXGI 1.2 description of an adapter. This structure is initialized by using the method.

hh404493 DXGI_ADAPTER_DESC2 DXGI_ADAPTER_DESC2

A string that contains the adapter description.

hh404493 wchar_t Description[128] wchar_t Description

The PCI ID of the hardware vendor.

hh404493 unsigned int VendorId unsigned int VendorId

The PCI ID of the hardware device.

hh404493 unsigned int DeviceId unsigned int DeviceId

The PCI ID of the sub system.

hh404493 unsigned int SubSysId unsigned int SubSysId

The PCI ID of the revision number of the adapter.

hh404493 unsigned int Revision unsigned int Revision

The number of bytes of dedicated video memory that are not shared with the CPU.

hh404493 SIZE_T DedicatedVideoMemory SIZE_T DedicatedVideoMemory

The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.

hh404493 SIZE_T DedicatedSystemMemory SIZE_T DedicatedSystemMemory

The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.

hh404493 SIZE_T SharedSystemMemory SIZE_T SharedSystemMemory

A unique value that identifies the adapter. See for a definition of the structure. is defined in dxgi.h.

hh404493 LUID AdapterLuid LUID AdapterLuid

A value of the enumerated type that describes the adapter type. The flag is reserved.

hh404493 DXGI_ADAPTER_FLAG Flags DXGI_ADAPTER_FLAG Flags

A value of the enumerated type that describes the granularity level at which the GPU can be preempted from performing its current graphics rendering task.

hh404493 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity

A value of the enumerated type that describes the granularity level at which the GPU can be preempted from performing its current compute task.

hh404493 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity

Describes an adapter (or video card) by using DXGI 1.0.

The structure provides a description of an adapter. This structure is initialized by using the method.

bb173058 DXGI_ADAPTER_DESC3 DXGI_ADAPTER_DESC3

A string that contains the adapter description. On feature level 9 graphics hardware, GetDesc returns ?Software Adapter? for the description string.

bb173058 wchar_t Description[128] wchar_t Description

The PCI ID of the hardware vendor. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware vendor.

bb173058 unsigned int VendorId unsigned int VendorId

The PCI ID of the hardware device. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the hardware device.

bb173058 unsigned int DeviceId unsigned int DeviceId

The PCI ID of the sub system. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the sub system.

bb173058 unsigned int SubSysId unsigned int SubSysId

The PCI ID of the revision number of the adapter. On feature level 9 graphics hardware, GetDesc returns zeros for the PCI ID of the revision number of the adapter.

bb173058 unsigned int Revision unsigned int Revision

The number of bytes of dedicated video memory that are not shared with the CPU.

bb173058 SIZE_T DedicatedVideoMemory SIZE_T DedicatedVideoMemory

The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.

bb173058 SIZE_T DedicatedSystemMemory SIZE_T DedicatedSystemMemory

The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.

bb173058 SIZE_T SharedSystemMemory SIZE_T SharedSystemMemory

A unique value that identifies the adapter. See for a definition of the structure. is defined in dxgi.h.

bb173058 LUID AdapterLuid LUID AdapterLuid
No documentation. bb173058 DXGI_ADAPTER_FLAG3 Flags DXGI_ADAPTER_FLAG3 Flags No documentation. bb173058 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity No documentation. bb173058 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity

Used with ::CreateDecodeSwapChainForCompositionSurfaceHandle to describe a decode swap chain.

dn384106 DXGI_DECODE_SWAP_CHAIN_DESC DXGI_DECODE_SWAP_CHAIN_DESC
No documentation. dn384106 unsigned int Flags unsigned int Flags

Describes timing and presentation statistics for a frame.

You initialize the structure with the or method.

You can only use for swap chains that either use the flip presentation model or draw in full-screen mode. You set the value in the SwapEffect member of the structure to specify that the swap chain uses the flip presentation model.

The values in the PresentCount and PresentRefreshCount members indicate information about when a frame was presented on the display screen. You can use these values to determine whether a glitch occurred. The values in the SyncRefreshCount and SyncQPCTime members indicate timing information that you can use for audio and video synchronization or very precise animation. If the swap chain draws in full-screen mode, these values are based on when the computer booted. If the swap chain draws in windowed mode, these values are based on when the swap chain is created.

bb173060 DXGI_FRAME_STATISTICS DXGI_FRAME_STATISTICS

A value that represents the running total count of times that an image was presented to the monitor since the computer booted.

Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called or . ?
bb173060 unsigned int PresentCount unsigned int PresentCount

A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).

bb173060 unsigned int PresentRefreshCount unsigned int PresentRefreshCount

A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).

bb173060 unsigned int SyncRefreshCount unsigned int SyncRefreshCount

A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.

bb173060 LARGE_INTEGER SyncQPCTime LARGE_INTEGER SyncQPCTime

Reserved. Always returns 0.

bb173060 LARGE_INTEGER SyncGPUTime LARGE_INTEGER SyncGPUTime

Used to verify system approval for the app's custom present duration (custom refresh rate). Approval should be continuously verified on a frame-by-frame basis.

This structure is used with the GetFrameStatisticsMedia method.

dn384108 DXGI_FRAME_STATISTICS_MEDIA DXGI_FRAME_STATISTICS_MEDIA

A value that represents the running total count of times that an image was presented to the monitor since the computer booted.

Note??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called or . ?
dn384108 unsigned int PresentCount unsigned int PresentCount

A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).

dn384108 unsigned int PresentRefreshCount unsigned int PresentRefreshCount

A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling QueryPerformanceCounter and that have happened since the computer booted (for windowed mode, since the swap chain was created).

dn384108 unsigned int SyncRefreshCount unsigned int SyncRefreshCount

A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the QueryPerformanceCounter function.

dn384108 LARGE_INTEGER SyncQPCTime LARGE_INTEGER SyncQPCTime

Reserved. Always returns 0.

dn384108 LARGE_INTEGER SyncGPUTime LARGE_INTEGER SyncGPUTime

A value indicating the composition presentation mode. This value is used to determine whether the app should continue to use the decode swap chain. See .

dn384108 DXGI_FRAME_PRESENTATION_MODE CompositionMode DXGI_FRAME_PRESENTATION_MODE CompositionMode

If the system approves an app's custom present duration request, this field is set to the approved custom present duration.

If the app's custom present duration request is not approved, this field is set to zero.

dn384108 unsigned int ApprovedPresentDuration unsigned int ApprovedPresentDuration

Controls the settings of a gamma curve.

The structure is used by the method.

For info about using gamma correction, see Using gamma correction.

bb173061 DXGI_GAMMA_CONTROL DXGI_GAMMA_CONTROL

A structure with scalar values that are applied to rgb values before being sent to the gamma look up table.

bb173061 DXGI_RGB Scale DXGI_RGB Scale

A structure with offset values that are applied to the rgb values before being sent to the gamma look up table.

bb173061 DXGI_RGB Offset DXGI_RGB Offset

An array of structures that control the points of a gamma curve.

bb173061 DXGI_RGB GammaCurve[1025] DXGI_RGB GammaCurve

Controls the gamma capabilities of an adapter.

To get a list of the capabilities for controlling gamma correction, call .

For info about using gamma correction, see Using gamma correction.

bb173062 DXGI_GAMMA_CONTROL_CAPABILITIES DXGI_GAMMA_CONTROL_CAPABILITIES

True if scaling and offset operations are supported during gamma correction; otherwise, false.

bb173062 BOOL ScaleAndOffsetSupported BOOL ScaleAndOffsetSupported

A value describing the maximum range of the control-point positions.

bb173062 float MaxConvertedValue float MaxConvertedValue

A value describing the minimum range of the control-point positions.

bb173062 float MinConvertedValue float MinConvertedValue

A value describing the number of control points in the array.

bb173062 unsigned int NumGammaControlPoints unsigned int NumGammaControlPoints

An array of values describing control points; the maximum length of control points is 1025.

bb173062 float ControlPointPositions[1025] float ControlPointPositions

Describes the 10 bit display metadata, and is usually used for video. This is used to adjust the output to best match a display's capabilities.

The X and Y coordinates of the parameters mean the xy chromacity coordinate in the CIE1931 color space. The values are normalized to 50000, so to get a value between 0.0 and 1.0, divide by 50000.

This structure is used in conjunction with the SetHDRMetaData method.

mt732700 DXGI_HDR_METADATA_HDR10 DXGI_HDR_METADATA_HDR10

The chromaticity coordinates of the 1.0 red value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.

mt732700 unsigned short RedPrimary[2] unsigned short RedPrimary

The chromaticity coordinates of the 1.0 green value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.

mt732700 unsigned short GreenPrimary[2] unsigned short GreenPrimary

The chromaticity coordinates of the 1.0 blue value. Index 0 contains the X coordinate and index 1 contains the Y coordinate.

mt732700 unsigned short BluePrimary[2] unsigned short BluePrimary

The chromaticity coordinates of the white point. Index 0 contains the X coordinate and index 1 contains the Y coordinate.

mt732700 unsigned short WhitePoint[2] unsigned short WhitePoint

The maximum number of nits of the display used to master the content. Units are 0.0001 nit, so if the value is 1 nit, the value should be 10,000.

mt732700 unsigned int MaxMasteringLuminance unsigned int MaxMasteringLuminance

The minimum number of nits (in units of 0.00001 nit) of the display used to master the content.

mt732700 unsigned int MinMasteringLuminance unsigned int MinMasteringLuminance

The maximum nit value (in units of 0.00001 nit) used anywhere in the content.

mt732700 unsigned short MaxContentLightLevel unsigned short MaxContentLightLevel

The per-frame average of the maximum nit values (in units of 0.00001 nit).

mt732700 unsigned short MaxFrameAverageLightLevel unsigned short MaxFrameAverageLightLevel

Describes a JPEG AC huffman table.

dn903662 DXGI_JPEG_AC_HUFFMAN_TABLE DXGI_JPEG_AC_HUFFMAN_TABLE

The number of codes for each code length.

dn903662 unsigned char CodeCounts[16] unsigned char CodeCounts

The Huffman code values, in order of increasing code length.

dn903662 unsigned char CodeValues[162] unsigned char CodeValues

Describes a JPEG DC huffman table.

dn903663 DXGI_JPEG_DC_HUFFMAN_TABLE DXGI_JPEG_DC_HUFFMAN_TABLE

The number of codes for each code length.

dn903663 unsigned char CodeCounts[12] unsigned char CodeCounts

The Huffman code values, in order of increasing code length.

dn903663 unsigned char CodeValues[12] unsigned char CodeValues

Describes a JPEG quantization table.

dn903664 DXGI_JPEG_QUANTIZATION_TABLE DXGI_JPEG_QUANTIZATION_TABLE

An array of bytes containing the elements of the quantization table.

dn903664 unsigned char Elements[64] unsigned char Elements

Describes a mapped rectangle that is used to access a surface.

The structure is initialized by the method.

bb173063 DXGI_MAPPED_RECT DXGI_MAPPED_RECT

A value that describes the width, in bytes, of the surface.

bb173063 int Pitch int Pitch

A reference to the image buffer of the surface.

bb173063 unsigned char* pBits unsigned char pBits

Describes a display mode.

This structure is used by the GetDisplayModeList and FindClosestMatchingMode methods.

The following format values are valid for display modes and when you create a bit-block transfer (bitblt) model swap chain. The valid values depend on the feature level that you are working with.

  • Feature level >= 9.1

    • (except 10.x on Windows?Vista)
    • (except 10.x on Windows?Vista)
  • Feature level >= 10.0

  • Feature level >= 11.0

You can pass one of these format values to to determine if it is a valid format for displaying on screen. If returns in the bit field to which the pFormatSupport parameter points, the format is valid for displaying on screen.

Starting with Windows?8 for a flip model swap chain (that is, a swap chain that has the value set in the SwapEffect member of ), you must set the Format member of to , , or .

Because of the relaxed render target creation rules that Direct3D 11 has for back buffers, applications can create a render target view from a swap chain so they can use automatic color space conversion when they render the swap chain.

bb173064 DXGI_MODE_DESC DXGI_MODE_DESC

A value that describes the resolution width. If you specify the width as zero when you call the method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the method to retrieve the assigned width value.

bb173064 unsigned int Width unsigned int Width

A value describing the resolution height. If you specify the height as zero when you call the method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the method to retrieve the assigned height value.

bb173064 unsigned int Height unsigned int Height

A structure describing the refresh rate in hertz

bb173064 DXGI_RATIONAL RefreshRate DXGI_RATIONAL RefreshRate

A structure describing the display format.

bb173064 DXGI_FORMAT Format DXGI_FORMAT Format

A member of the enumerated type describing the scanline drawing mode.

bb173064 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering DXGI_MODE_SCANLINE_ORDER ScanlineOrdering

A member of the enumerated type describing the scaling mode.

bb173064 DXGI_MODE_SCALING Scaling DXGI_MODE_SCALING Scaling
Initializes a new instance of the structure. The width. The height. The refresh rate. The format. Initializes a new instance of the struct. The format.

Describes a display mode and whether the display mode supports stereo.

is identical to except that includes the Stereo member.

This structure is used by the GetDisplayModeList1 and FindClosestMatchingMode1 methods.

hh404507 DXGI_MODE_DESC1 DXGI_MODE_DESC1

A value that describes the resolution width.

hh404507 unsigned int Width unsigned int Width

A value that describes the resolution height.

hh404507 unsigned int Height unsigned int Height

A structure that describes the refresh rate in hertz.

hh404507 DXGI_RATIONAL RefreshRate DXGI_RATIONAL RefreshRate

A -typed value that describes the display format.

hh404507 DXGI_FORMAT Format DXGI_FORMAT Format

A -typed value that describes the scan-line drawing mode.

hh404507 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering DXGI_MODE_SCANLINE_ORDER ScanlineOrdering

A -typed value that describes the scaling mode.

hh404507 DXGI_MODE_SCALING Scaling DXGI_MODE_SCALING Scaling

Specifies whether the full-screen display mode is stereo. TRUE if stereo; otherwise, .

hh404507 BOOL Stereo BOOL Stereo

Describes an output or physical connection between the adapter (video card) and a device.

The structure is initialized by the method.

bb173068 DXGI_OUTPUT_DESC DXGI_OUTPUT_DESC

A string that contains the name of the output device.

bb173068 wchar_t DeviceName[32] wchar_t DeviceName

A structure containing the bounds of the output in desktop coordinates. Desktop coordinates depend on the dots per inch (DPI) of the desktop. For info about writing DPI-aware Win32 apps, see High DPI.

bb173068 RECT DesktopCoordinates RECT DesktopCoordinates

True if the output is attached to the desktop; otherwise, false.

bb173068 BOOL AttachedToDesktop BOOL AttachedToDesktop

A member of the enumerated type describing on how an image is rotated by the output.

bb173068 DXGI_MODE_ROTATION Rotation DXGI_MODE_ROTATION Rotation

An handle that represents the display monitor. For more information, see and the Device Context.

bb173068 HMONITOR Monitor HMONITOR Monitor

Describes an output or physical connection between the adapter (video card) and a device.

The structure is initialized by the method.

bb173068 DXGI_OUTPUT_DESC1 DXGI_OUTPUT_DESC1

A string that contains the name of the output device.

bb173068 wchar_t DeviceName[32] wchar_t DeviceName

A structure containing the bounds of the output in desktop coordinates. Desktop coordinates depend on the dots per inch (DPI) of the desktop. For info about writing DPI-aware Win32 apps, see High DPI.

bb173068 RECT DesktopCoordinates RECT DesktopCoordinates

True if the output is attached to the desktop; otherwise, false.

bb173068 BOOL AttachedToDesktop BOOL AttachedToDesktop

A member of the enumerated type describing on how an image is rotated by the output.

bb173068 DXGI_MODE_ROTATION Rotation DXGI_MODE_ROTATION Rotation

An handle that represents the display monitor. For more information, see and the Device Context.

bb173068 HMONITOR Monitor HMONITOR Monitor
No documentation. bb173068 unsigned int BitsPerColor unsigned int BitsPerColor No documentation. bb173068 DXGI_COLOR_SPACE_TYPE ColorSpace DXGI_COLOR_SPACE_TYPE ColorSpace No documentation. bb173068 float RedPrimary[2] float RedPrimary No documentation. bb173068 float GreenPrimary[2] float GreenPrimary No documentation. bb173068 float BluePrimary[2] float BluePrimary No documentation. bb173068 float WhitePoint[2] float WhitePoint No documentation. bb173068 float MinLuminance float MinLuminance No documentation. bb173068 float MaxLuminance float MaxLuminance No documentation. bb173068 float MaxFullFrameLuminance float MaxFullFrameLuminance

The structure describes the dimension of the output and the surface that contains the desktop image. The format of the desktop image is always .

This structure is used by GetDesc.

hh404510 DXGI_OUTDUPL_DESC DXGI_OUTDUPL_DESC
No documentation. hh404510 DXGI_MODE_DESC ModeDesc DXGI_MODE_DESC ModeDesc No documentation. hh404510 DXGI_MODE_ROTATION Rotation DXGI_MODE_ROTATION Rotation No documentation. hh404510 BOOL DesktopImageInSystemMemory BOOL DesktopImageInSystemMemory

The structure describes the current desktop image.

A non-zero LastMouseUpdateTime indicates an update to either a mouse reference position or a mouse reference position and shape. That is, the mouse reference position is always valid for a non-zero LastMouseUpdateTime; however, the application must check the value of the PointerShapeBufferSize member to determine whether the shape was updated too.

If only the reference was updated (that is, the desktop image was not updated), the AccumulatedFrames, TotalMetadataBufferSize, and LastPresentTime members are set to zero.

An AccumulatedFrames value of one indicates that the application completed processing the last frame before a new desktop image was presented. If the AccumulatedFrames value is greater than one, more desktop image updates have occurred while the application processed the last desktop update. In this situation, the operating system accumulated the update regions. For more information about desktop updates, see Desktop Update Data.

A non-zero TotalMetadataBufferSize indicates the total size of the buffers that are required to store all the desktop update metadata. An application cannot determine the size of each type of metadata. The application must call the , , or method to obtain information about each type of metadata.

Note??To correct visual effects, an application must process the move region data before it processes the dirty rectangles.?
hh404512 DXGI_OUTDUPL_FRAME_INFO DXGI_OUTDUPL_FRAME_INFO

The time stamp of the last update of the desktop image. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the desktop image was not updated since an application last called the method to acquire the next frame of the desktop image.

hh404512 LARGE_INTEGER LastPresentTime LARGE_INTEGER LastPresentTime

The time stamp of the last update to the mouse. The operating system calls the QueryPerformanceCounter function to obtain the value. A zero value indicates that the position or shape of the mouse was not updated since an application last called the method to acquire the next frame of the desktop image. The mouse position is always supplied for a mouse update. A new reference shape is indicated by a non-zero value in the PointerShapeBufferSize member.

hh404512 LARGE_INTEGER LastMouseUpdateTime LARGE_INTEGER LastMouseUpdateTime

The number of frames that the operating system accumulated in the desktop image surface since the calling application processed the last desktop image. For more information about this number, see Remarks.

hh404512 unsigned int AccumulatedFrames unsigned int AccumulatedFrames

Specifies whether the operating system accumulated updates by coalescing dirty regions. Therefore, the dirty regions might contain unmodified pixels. TRUE if dirty regions were accumulated; otherwise, .

hh404512 BOOL RectsCoalesced BOOL RectsCoalesced

Specifies whether the desktop image might contain protected content that was already blacked out in the desktop image. TRUE if protected content was already blacked; otherwise, . The application can use this information to notify the remote user that some of the desktop content might be protected and therefore not visible.

hh404512 BOOL ProtectedContentMaskedOut BOOL ProtectedContentMaskedOut

A structure that describes the most recent mouse position if the LastMouseUpdateTime member is a non-zero value; otherwise, this value is ignored. This value provides the coordinates of the location where the top-left-hand corner of the reference shape is drawn; this value is not the desktop position of the hot spot.

hh404512 DXGI_OUTDUPL_POINTER_POSITION PointerPosition DXGI_OUTDUPL_POINTER_POSITION PointerPosition

Size in bytes of the buffers to store all the desktop update metadata for this frame. For more information about this size, see Remarks.

hh404512 unsigned int TotalMetadataBufferSize unsigned int TotalMetadataBufferSize

Size in bytes of the buffer to hold the new pixel data for the mouse shape. For more information about this size, see Remarks.

hh404512 unsigned int PointerShapeBufferSize unsigned int PointerShapeBufferSize

The structure describes the movement of a rectangle.

This structure is used by GetFrameMoveRects.

hh404514 DXGI_OUTDUPL_MOVE_RECT DXGI_OUTDUPL_MOVE_RECT

The starting position of a rectangle.

hh404514 POINT SourcePoint POINT SourcePoint

The target region to which to move a rectangle.

hh404514 RECT DestinationRect RECT DestinationRect

The structure describes the position of the hardware cursor.

The Position member is valid only if the Visible member?s value is set to TRUE.

hh404516 DXGI_OUTDUPL_POINTER_POSITION DXGI_OUTDUPL_POINTER_POSITION

The position of the hardware cursor relative to the top-left of the adapter output.

hh404516 POINT Position POINT Position

Specifies whether the hardware cursor is visible. TRUE if visible; otherwise, . If the hardware cursor is not visible, the calling application does not display the cursor in the client.

hh404516 BOOL Visible BOOL Visible

The structure describes information about the cursor shape.

An application draws the cursor shape with the top-left-hand corner drawn at the position that the Position member of the structure specifies; the application does not use the hot spot to draw the cursor shape.

An application calls the method to retrieve cursor shape information in a structure.

hh404518 DXGI_OUTDUPL_POINTER_SHAPE_INFO DXGI_OUTDUPL_POINTER_SHAPE_INFO

A -typed value that specifies the type of cursor shape.

hh404518 unsigned int Type unsigned int Type

The width in pixels of the mouse cursor.

hh404518 unsigned int Width unsigned int Width

The height in scan lines of the mouse cursor.

hh404518 unsigned int Height unsigned int Height

The width in bytes of the mouse cursor.

hh404518 unsigned int Pitch unsigned int Pitch

The position of the cursor's hot spot relative to its upper-left pixel. An application does not use the hot spot when it determines where to draw the cursor shape.

hh404518 POINT HotSpot POINT HotSpot

Describes information about present that helps the operating system optimize presentation.

This structure is used by the Present1 method.

The scroll rectangle and the list of dirty rectangles could overlap. In this situation, the dirty rectangles take priority. Applications can then have pieces of dynamic content on top of a scrolled area. For example, an application could scroll a page and play video at the same time.

The following diagram and coordinates illustrate this example.

DirtyRectsCount = 2 pDirtyRects[ 0 ] = { 10, 30, 40, 50 } // Video pDirtyRects[ 1 ] = { 0, 70, 50, 80 } // New line *pScrollRect = { 0, 0, 50, 70 } *pScrollOffset = { 0, -10 }

Parts of the previous frame and content that the application renders are combined to produce the final frame that the operating system presents on the display screen. Most of the window is scrolled from the previous frame. The application must update the video frame with the new chunk of content that appears due to scrolling.

The dashed rectangle shows the scroll rectangle in the current frame. The scroll rectangle is specified by the pScrollRect member. The arrow shows the scroll offset. The scroll offset is specified by the pScrollOffset member. Filled rectangles show dirty rectangles that the application updated with new content. The filled rectangles are specified by the DirtyRectsCount and pDirtyRects members.

The scroll rectangle and offset are not supported for the or present option. Dirty rectangles and scroll rectangle are not supported for multisampled swap chains.

The actual implementation of composition and necessary bitblts is different for the bitblt model and the flip model. For more info about these models, see DXGI Flip Model.

For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.

hh404522 DXGI_PRESENT_PARAMETERS DXGI_PRESENT_PARAMETERS

The number of updated rectangles that you update in the back buffer for the presented frame. The operating system uses this information to optimize presentation. You can set this member to 0 to indicate that you update the whole frame.

hh404522 unsigned int DirtyRectsCount unsigned int DirtyRectsCount

A list of updated rectangles that you update in the back buffer for the presented frame. An application must update every single pixel in each rectangle that it reports to the runtime; the application cannot assume that the pixels are saved from the previous frame. For more information about updating dirty rectangles, see Remarks. You can set this member to null if DirtyRectsCount is 0. An application must not update any pixel outside of the dirty rectangles.

hh404522 RECT* pDirtyRects RECT pDirtyRects

A reference to the scrolled rectangle. The scrolled rectangle is the rectangle of the previous frame from which the runtime bit-block transfers (bitblts) content. The runtime also uses the scrolled rectangle to optimize presentation in terminal server and indirect display scenarios.

The scrolled rectangle also describes the destination rectangle, that is, the region on the current frame that is filled with scrolled content. You can set this member to null to indicate that no content is scrolled from the previous frame.

hh404522 RECT* pScrollRect RECT pScrollRect

A reference to the offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). You can set this member to null to indicate no offset.

hh404522 POINT* pScrollOffset POINT pScrollOffset
A list of updated rectangles that you update in the back buffer for the presented frame. An application must update every single pixel in each rectangle that it reports to the runtime; the application cannot assume that the pixels are saved from the previous frame. For more information about updating dirty rectangles, see Remarks. You can set this member to null if DirtyRectsCount is 0. An application must not update any pixel outside of the dirty rectangles. RECT* pDirtyRects A reference to the scrolled rectangle. The scrolled rectangle is the rectangle of the previous frame from which the runtime bit-block transfers (bitblts) content. The runtime also uses the scrolled rectangle to optimize presentation in terminal server and indirect display scenarios. The scrolled rectangle also describes the destination rectangle, that is, the region on the current frame that is filled with scrolled content. You can set this member to null to indicate that no content is scrolled from the previous frame. RECT* pScrollRect A reference to the offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). You can set this member to null to indicate no offset. POINT* pScrollOffset

Describes the current video memory budgeting parameters.

Use this structure with QueryVideoMemoryInfo.

Refer to the remarks for .

dn933220 DXGI_QUERY_VIDEO_MEMORY_INFO DXGI_QUERY_VIDEO_MEMORY_INFO

Specifies the OS-provided video memory budget, in bytes, that the application should target. If CurrentUsage is greater than Budget, the application may incur stuttering or performance penalties due to background activity by the OS to provide other applications with a fair usage of video memory.

dn933220 unsigned longlong Budget unsigned longlong Budget

Specifies the application?s current video memory usage, in bytes.

dn933220 unsigned longlong CurrentUsage unsigned longlong CurrentUsage

The amount of video memory, in bytes, that the application has available for reservation. To reserve this video memory, the application should call .

dn933220 unsigned longlong AvailableForReservation unsigned longlong AvailableForReservation

The amount of video memory, in bytes, that is reserved by the application. The OS uses the reservation as a hint to determine the application?s minimum working set. Applications should attempt to ensure that their video memory usage can be trimmed to meet this requirement.

dn933220 unsigned longlong CurrentReservation unsigned longlong CurrentReservation

Represents a rational number.

This structure is a member of the structure.

The structure operates under the following rules:

  • 0/0 is legal and will be interpreted as 0/1.
  • 0/anything is interpreted as zero.
  • If you are representing a whole number, the denominator should be 1.
bb173069 DXGI_RATIONAL DXGI_RATIONAL

An unsigned integer value representing the top of the rational number.

bb173069 unsigned int Numerator unsigned int Numerator

An unsigned integer value representing the bottom of the rational number.

bb173069 unsigned int Denominator unsigned int Denominator
An empty rational that can be used for comparisons. Initializes a new instance of the structure. The numerator of the rational pair. The denominator of the rational pair.

Describes multi-sampling parameters for a resource.

This structure is a member of the structure.

The default sampler mode, with no anti-aliasing, has a count of 1 and a quality level of 0.

If multi-sample antialiasing is being used, all bound render targets and depth buffers must have the same sample counts and quality levels.

Differences between Direct3D 10.0 and Direct3D 10.1 and between Direct3D 10.0 and Direct3D 11:

Direct3D 10.1 has defined two standard quality levels: D3D10_STANDARD_MULTISAMPLE_PATTERN and D3D10_CENTER_MULTISAMPLE_PATTERN in the D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS enumeration in D3D10_1.h.

Direct3D 11 has defined two standard quality levels: and in the enumeration in D3D11.h.

?

bb173072 DXGI_SAMPLE_DESC DXGI_SAMPLE_DESC

The number of multisamples per pixel.

bb173072 unsigned int Count unsigned int Count

The image quality level. The higher the quality, the lower the performance. The valid range is between zero and one less than the level returned by ID3D10Device::CheckMultisampleQualityLevels for Direct3D 10 or for Direct3D 11.

For Direct3D 10.1 and Direct3D 11, you can use two special quality level values. For more information about these quality level values, see Remarks.

bb173072 unsigned int Quality unsigned int Quality
Initializes a new instance of the structure. The sample count. The sample quality.

Represents a handle to a shared resource.

To create a shared surface, pass a shared-resource handle into the method.

bb173073 DXGI_SHARED_RESOURCE DXGI_SHARED_RESOURCE

A handle to a shared resource.

bb173073 void* Handle void Handle

Describes a surface.

This structure is used by the GetDesc and CreateSurface methods.

bb173074 DXGI_SURFACE_DESC DXGI_SURFACE_DESC

A value describing the surface width.

bb173074 unsigned int Width unsigned int Width

A value describing the surface height.

bb173074 unsigned int Height unsigned int Height

A member of the enumerated type that describes the surface format.

bb173074 DXGI_FORMAT Format DXGI_FORMAT Format

A member of the structure that describes multi-sampling parameters for the surface.

bb173074 DXGI_SAMPLE_DESC SampleDesc DXGI_SAMPLE_DESC SampleDesc

Describes a swap chain.

This structure is used by the GetDesc and CreateSwapChain methods.

In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.

If you create a swap chain with one buffer, specifying does not cause the contents of the single buffer to be swapped with the front buffer.

For performance information about flipping swap-chain buffers in full-screen application, see Full-Screen Application Performance Hints.

bb173075 DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC

A structure that describes the backbuffer display mode.

bb173075 DXGI_MODE_DESC BufferDesc DXGI_MODE_DESC BufferDesc

A structure that describes multi-sampling parameters.

bb173075 DXGI_SAMPLE_DESC SampleDesc DXGI_SAMPLE_DESC SampleDesc

A member of the DXGI_USAGE enumerated type that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.

bb173075 DXGI_USAGE_ENUM BufferUsage DXGI_USAGE_ENUM BufferUsage

A value that describes the number of buffers in the swap chain. When you call to create a full-screen swap chain, you typically include the front buffer in this value. For more information about swap-chain buffers, see Remarks.

bb173075 unsigned int BufferCount unsigned int BufferCount

An handle to the output window. This member must not be null.

bb173075 HWND OutputWindow HWND OutputWindow

A Boolean value that specifies whether the output is in windowed mode. TRUE if the output is in windowed mode; otherwise, .

We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through ; that is, do not set this member to to force the swap chain to be full screen. However, if you create the swap chain as full screen, also provide the end user with a list of supported display modes through the BufferDesc member because a swap chain that is created with an unsupported display mode might cause the display to go black and prevent the end user from seeing anything.

For more information about choosing windowed verses full screen, see .

bb173075 BOOL Windowed BOOL Windowed

A member of the enumerated type that describes options for handling the contents of the presentation buffer after presenting a surface.

bb173075 DXGI_SWAP_EFFECT SwapEffect DXGI_SWAP_EFFECT SwapEffect

A member of the enumerated type that describes options for swap-chain behavior.

bb173075 DXGI_SWAP_CHAIN_FLAG Flags DXGI_SWAP_CHAIN_FLAG Flags

Describes a swap chain.

This structure is used by the CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, CreateSwapChainForComposition, CreateSwapChainForCompositionSurfaceHandle, and GetDesc1 methods.

Note??You cannot cast a to a and vice versa. An application must explicitly use the method to retrieve the newer version of the swap-chain description structure.?

In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.

For a flip-model swap chain (that is, a swap chain that has the value set in the SwapEffect member), you must set the Format member to , , or ; you must set the Count member of the structure that the SampleDesc member specifies to one and the Quality member of to zero because multiple sample antialiasing (MSAA) is not supported; you must set the BufferCount member to from two to sixteen. For more info about flip-model swap chain, see DXGI Flip Model.

hh404528 DXGI_SWAP_CHAIN_DESC1 DXGI_SWAP_CHAIN_DESC1

A value that describes the resolution width. If you specify the width as zero when you call the method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the method to retrieve the assigned width value. You cannot specify the width as zero when you call the method.

hh404528 unsigned int Width unsigned int Width

A value that describes the resolution height. If you specify the height as zero when you call the method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the method to retrieve the assigned height value. You cannot specify the height as zero when you call the method.

hh404528 unsigned int Height unsigned int Height

A structure that describes the display format.

hh404528 DXGI_FORMAT Format DXGI_FORMAT Format

Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. TRUE if stereo; otherwise, . If you specify stereo, you must also specify a flip-model swap chain (that is, a swap chain that has the value set in the SwapEffect member).

hh404528 BOOL Stereo BOOL Stereo

A structure that describes multi-sampling parameters. This member is valid only with bit-block transfer (bitblt) model swap chains.

hh404528 DXGI_SAMPLE_DESC SampleDesc DXGI_SAMPLE_DESC SampleDesc

A DXGI_USAGE-typed value that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.

hh404528 DXGI_USAGE_ENUM BufferUsage DXGI_USAGE_ENUM BufferUsage

A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.

hh404528 unsigned int BufferCount unsigned int BufferCount

A -typed value that identifies resize behavior if the size of the back buffer is not equal to the target output.

hh404528 DXGI_SCALING Scaling DXGI_SCALING Scaling

A -typed value that describes the presentation model that is used by the swap chain and options for handling the contents of the presentation buffer after presenting a surface. You must specify the value when you call the method because this method supports only flip presentation model.

hh404528 DXGI_SWAP_EFFECT SwapEffect DXGI_SWAP_EFFECT SwapEffect

A -typed value that identifies the transparency behavior of the swap-chain back buffer.

hh404528 DXGI_ALPHA_MODE AlphaMode DXGI_ALPHA_MODE AlphaMode

A combination of -typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.

hh404528 DXGI_SWAP_CHAIN_FLAG Flags DXGI_SWAP_CHAIN_FLAG Flags

Describes full-screen mode for a swap chain.

This structure is used by the CreateSwapChainForHwnd and GetFullscreenDesc methods.

hh404531 DXGI_SWAP_CHAIN_FULLSCREEN_DESC DXGI_SWAP_CHAIN_FULLSCREEN_DESC

A structure that describes the refresh rate in hertz.

hh404531 DXGI_RATIONAL RefreshRate DXGI_RATIONAL RefreshRate

A member of the enumerated type that describes the scan-line drawing mode.

hh404531 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering DXGI_MODE_SCANLINE_ORDER ScanlineOrdering

A member of the enumerated type that describes the scaling mode.

hh404531 DXGI_MODE_SCALING Scaling DXGI_MODE_SCALING Scaling

A Boolean value that specifies whether the swap chain is in windowed mode. TRUE if the swap chain is in windowed mode; otherwise, .

hh404531 BOOL Windowed BOOL Windowed
Internal class used to initialize this assembly. Initializes this assembly. This method is called when the assembly is loaded. The namespace provides a managed DXGI API. hh404534 DXGI DXGI Internal VirtualSurfaceUpdatesCallbackNative Callback Get a native callback pointer from a managed callback. The geometry sink. A pointer to the unmanaged geometry sink counterpart