Skip to content

Latest commit

 

History

History
125 lines (90 loc) · 5.26 KB

nf-d3d11-id3d11device-createdeferredcontext.md

File metadata and controls

125 lines (90 loc) · 5.26 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d11.ID3D11Device.CreateDeferredContext
ID3D11Device::CreateDeferredContext (d3d11.h)
Creates a deferred context, which can record command lists. (ID3D11Device.CreateDeferredContext)
CreateDeferredContext
CreateDeferredContext method [Direct3D 11]
CreateDeferredContext method [Direct3D 11]
ID3D11Device interface
ID3D11Device interface [Direct3D 11]
CreateDeferredContext method
ID3D11Device.CreateDeferredContext
ID3D11Device::CreateDeferredContext
ad59e9e8-de25-e887-81b2-63e050b34473
d3d11/ID3D11Device::CreateDeferredContext
direct3d11.id3d11device_createdeferredcontext
direct3d11\id3d11device_createdeferredcontext.htm
direct3d11
fbf01844-eaf1-4360-833e-c95ba686fff5
12/05/2018
CreateDeferredContext, CreateDeferredContext method [Direct3D 11], CreateDeferredContext method [Direct3D 11],ID3D11Device interface, ID3D11Device interface [Direct3D 11],CreateDeferredContext method, ID3D11Device.CreateDeferredContext, ID3D11Device::CreateDeferredContext, ad59e9e8-de25-e887-81b2-63e050b34473, d3d11/ID3D11Device::CreateDeferredContext, direct3d11.id3d11device_createdeferredcontext
d3d11.h
Windows
D3d11.lib
Windows
19H1
ID3D11Device::CreateDeferredContext
d3d11/ID3D11Device::CreateDeferredContext
c++
APIRef
kbSyntax
COM
d3d11.lib
d3d11.dll
ID3D11Device.CreateDeferredContext

ID3D11Device::CreateDeferredContext

-description

Creates a deferred context, which can record command lists.

-parameters

-param ContextFlags

Type: UINT

Reserved for future use. Pass 0.

-param ppDeferredContext [out, optional]

Type: ID3D11DeviceContext**

Upon completion of the method, the passed pointer to an ID3D11DeviceContext interface pointer is initialized.

-returns

Type: HRESULT

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

  • Returns DXGI_ERROR_DEVICE_REMOVED if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. If this error occurs, you should destroy and recreate the device.
  • Returns DXGI_ERROR_INVALID_CALL if the CreateDeferredContext method cannot be called from the current context. For example, if the device was created with the D3D11_CREATE_DEVICE_SINGLETHREADED value, CreateDeferredContext returns DXGI_ERROR_INVALID_CALL.
  • Returns E_INVALIDARG if the ContextFlags parameter is invalid.
  • Returns E_OUTOFMEMORY if the application has exhausted available memory.

-remarks

A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. Using a deferred context, you can record graphics commands into a command list that is encapsulated by the ID3D11CommandList interface. After all scene items are recorded, you can then submit them to the main render thread for final rendering. In this manner, you can perform rendering tasks concurrently across multiple threads and potentially improve performance in multi-core CPU scenarios.

You can create multiple deferred contexts.

Note  If you use the D3D11_CREATE_DEVICE_SINGLETHREADED value to create the device that is represented by ID3D11Device, the CreateDeferredContext method will fail, and you will not be able to create a deferred context.
 
For more information about deferred contexts, see Immediate and Deferred Rendering.

Windows Phone 8: This API is supported.

-see-also

ID3D11Device

ID3D11Device1::CreateDeferredContext1

ID3D11Device2::CreateDeferredContext2

ID3D11Device3::CreateDeferredContext3