Helper functions for Direct3D 12

These helper functions help particularly in handling subresources, and are declared in d3dx12.h.

d3dx12.h is available separately from the Direct3D 12 headers. You can download d3dx12.h from The D3D12 Helper Library.

In this section

Topic Description
CommandListCast This function template casts a constant pointer to any command list into a const pointer to an ID3D12CommandList.
D3D12CalcSubresource Calculates a subresource index for a texture.
D3D12DecomposeSubresource Outputs the mip slice, array slice, and plane slice that correspond to the specified subresource index.
D3D12GetFormatPlaneCount Gets the number of planes for the specified DXGI format for the specified virtual adapter (an ID3D12Device).
D3D12IsLayoutOpaque Indicates whether the layout is opaque.
D3DX12GetBaseSubobjectType Returns the subobject type that corresponds to the base class of the passed-in subobject type.
D3DX12ParsePipelineStateStream Parses a pipeline state stream description, calling a user-defined callback for each subobject instance parsed.
D3DX12SerializeVersionedRootSignature Helps enable root signature 1.1 features when they are available, and does not require maintaining two code paths for building root signatures. This helper method reconstructs a version 1.0 root signature when version 1.1 is not supported.
GetRequiredIntermediateSize Returns the required size of a buffer to be used for data upload.
Memcpysubresource Copies a subresource row by row.
Updatesubresources Updates subresources, all the subresource arrays should be populated, typically by calling ID3D12Device::GetCopyableFootprints.
Updatesubresources (heap-allocating) Updates subresources with a heap-allocating implementation.
Updatesubresources (stack-allocating) Updates subresources with a stack-allocating implementation.