ID3D11DeviceContextX::SetFastResourcesFromBatch Method

Sets resources into the D3D11 pipeline when the permutation of state is known at run time but not compile time, as when setting the resources on behalf of an object.

Syntax

public:
void SetFastResourcesFromBatch(
         void *pBatch,
         UINT Size
)  

Parameters

pBatch
Type: void *

[in] Pointer to the batch data. Must be 16-byte aligned.

Size
Type: UINT 

[in] Size of the batch in bytes, as returned by ID3D11DeviceContextX::EndResourceBatch. Must be a multiple of 16.

Return value

None.

Remarks

SetFastResourcesFromBatch is the fastest way to set resources into the D3D11 pipeline when the permutation of state is known at run time but not compile time, as when setting the resources on behalf of an object. (SetFastResources is the fastest way to set resources into the D3D11 pipeline when the permutation of state is known at compile time.) We recommend that titles use SetFastResourcesFromBatch and SetFastResources for setting resource state whenever possible for best performance (at least until Descriptor Tables are implemented in a future release).

A batch is essentially a Constant Engine command buffer snippet containing a pre-compiled collection of commands for setting resources into the pipeline. SetFastResourcesFromBatch simply does an inline copy of this pre-compiled command buffer snippet directly into the Constant Engine command buffer.

This API obeys the usage for D3D11X fast semantics. Note in particular that it is the caller’s responsibility to ensure that all resources referenced by the batch still exist at the time that the GPU executes SetFastResourcesFromBatch.

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.

See also

Optimizing Monolithic Driver Performance

Fast Semantics

Fast Semantics Render Loops

Reference

BeginResourceBatch

EndResourceBatch

SetFastResourcesIntoBatch

ID3D11DeviceContextX Interface

ID3D11DeviceContextX Members