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.
public:
void SetFastResourcesFromBatch(
void *pBatch,
UINT Size
)
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 ID3D11ComputeContextX::EndResourceBatch. Must be a multiple of 16.
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 ID3D11ComputeContextX::SetFastResources_Debug 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.
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.
Optimizing Monolithic Driver Performance