public:
void SetFastResourcesIntoBatch(
D3D11X_SET_FAST SetType,
UINT Slot,
const <Resource> * pResource,
UINT64 OffsetAndStride
)
SetType
Type: D3D11X_SET_FAST
[in] Specifies attributes including the pipeline stage for the resource and the type of set operation to be applied, as D3D11X_SET_FAST enumeration constants.
The _WITH_OFFSET variants in the enumeration specify that the OffsetAndStride offset should be added to the resource’s base address as part of the set operation. This forms the basis of efficient alternatives to dynamic resources such as a simple linear allocator. When _WITH_OFFSET is specified for a shader resource view, the view must always be of a texture and cannot be a view of a buffer.
For best performance and code size, SetType should always be specified as a compile-time constant.
Slot
Type: UINT
[in] The slot to be set.
The valid range is dependent on the type of resource being set:
pResource
Type: const <Resource> *
[in] A pointer to the resource to be set. The pointer can never be NULL. Resources cannot be dynamic.
The type of this parameter can be any of the following D3D11 object or descriptor types:
The structure type usually disambiguates between different types of resources being set to the same stage. For example, if SetType is D3D11X_SET_FAST_VS and the structure type is ID3D11SamplerState, then the API knows that the sampler should be updated rather than the shader resource view. ID3D11Buffer and D3D11X_DESCRIPTOR_BUFFER_VIEW types are assumed to represent constant buffers unless D3D11X_SET_FAST_IA_VB or D3D11X_SET_FAST_IA_VB_WITH_OFFSET is specified, in which case they represent vertex buffers.
OffsetAndStride
Type: UINT64
[in] For vertex buffers, this represents a packed form of the stride and optional offset in bytes. If D3D11X_SET_FAST_IA_VB_WITH_OFFSET is specified, use the D3D11X_MAKE_OFFSET_AND_STRIDE macro to pack the offset and stride into the required 64-bit form. If D3D11X_SET_FAST_IA_VB is specified, then use the D3D11X_MAKE_STRIDE macro to pack the stride appropriately.
When SetType is a _WITH_OFFSET variant for a resource other than a vertex buffer, this parameter specifies only the offset, in bytes. Use of the D3D11X_MAKE_OFFSET macro is optional, because the offset is always in the lowest 48 bits. For shader resource views, the offset must be a multiple of 256. Offsets can be negative.
When SetType is anything other than the above, the entire parameter must be zero.
SetFastResourcesIntoBatch adds resources into a batch. The batch must be set up for recording by first calling BeginResourceBatch.
SetFastResourcesIntoBatch has all of the same semantics as SetFastResources; see that method’s Remarks for more information.
The entire set of parameters can occur one or more times, comma-delimited.
The pair of parameters pResource and OffsetAndStride can occur one or more times, within a set of parameters, comma-delimited.
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.
Optimizing Monolithic Driver Performance