D3D12SerializeVersionedRootSignature function

Serializes a root signature of any version that can be passed to ID3D12Device::CreateRootSignature.

Syntax

HRESULT D3D12SerializeVersionedRootSignature(
  const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *pRootSignature,
  ID3DBlob                                  **ppBlob,
  ID3DBlob                                  **ppErrorBlob
);

Parameters

pRootSignature

Type: const D3D12_VERSIONED_ROOT_SIGNATURE_DESC*

Specifies a D3D12_VERSIONED_ROOT_SIGNATURE_DESC that contains a description of any version of a root signature.

ppBlob

Type: ID3DBlob**

A pointer to a memory block that receives a pointer to the ID3DBlob interface that you can use to access the serialized root signature.

ppErrorBlob

Type: ID3DBlob**

A pointer to a memory block that receives a pointer to the ID3DBlob interface that you can use to access serializer error messages, or NULL if there are no errors.

Return Value

Type: HRESULT

Returns S_OK if successful; otherwise, returns one of the Direct3D 12 Return Codes.

Remarks

If an application procedurally generates a D3D12_ROOT_SIGNATURE_DESC1 data structure, it must pass a pointer to this D3D12_ROOT_SIGNATURE_DESC1 in a call to D3D12SerializeVersionedRootSignature to make the serialized form. The application then passes the serialized form to which ppBlob points into ID3D12Device::CreateRootSignature.

If a shader has been authored with a root signature in it (when that capability is added), the compiled shader will contain a serialized root signature in it already.

The function signature PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.

This function was released with the Windows 10 Anniversary Update (14393) and supersedes D3D12SerializeRootSignature.

Requirements

   
Target Platform Windows
Header d3d12.h
Library D3d12.lib
DLL D3d12.dll

See Also

Core Functions

Creating a Root Signature

D3DX12SerializeVersionedRootSignature

Root Signature Version 1.1