Identifies how to bind a resource to the pipeline.
enum XG_BIND_FLAG
{
XG_BIND_VERTEX_BUFFER = 0x1L,
XG_BIND_INDEX_BUFFER = 0x2L,
XG_BIND_CONSTANT_BUFFER = 0x4L,
XG_BIND_SHADER_RESOURCE = 0x8L,
XG_BIND_STREAM_OUTPUT = 0x10L,
XG_BIND_RENDER_TARGET = 0x20L,
XG_BIND_DEPTH_STENCIL = 0x40L,
XG_BIND_UNORDERED_ACCESS = 0x80L,
XG_BIND_DECODER = 0x200L,
XG_BIND_VIDEO_ENCODER = 0x400L
};
| Constant | Description | ||
|---|---|---|---|
| XG_BIND_VERTEX_BUFFER | Bind a buffer as a vertex buffer to the input-assembler stage. | ||
| XG_BIND_INDEX_BUFFER | Bind a buffer as an index buffer to the input-assembler stage. | ||
| XG_BIND_CONSTANT_BUFFER | Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag. | ||
| XG_BIND_SHADER_RESOURCE | Bind a buffer or texture to a shader stage. | ||
| XG_BIND_STREAM_OUTPUT | Bind an output buffer for the stream-output stage. | ||
| XG_BIND_RENDER_TARGET | Bind a texture as a render target for the output-merger stage. | ||
| XG_BIND_DEPTH_STENCIL | Bind a texture as a depth-stencil target for the output-merger stage. | ||
| XG_BIND_UNORDERED_ACCESS | Bind an unordered access resource. | ||
| XG_BIND_DECODER | Set this flag to indicate that a 2D texture is used to receive output from the decoder API. The common way to create resources for a decoder output is by calling the ID3D11Device::CreateTexture2D method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to ID3D11Device::CreateShaderResourceView.
Direct 3D 11
| ||
| XG_BIND_VIDEO_ENCODER | Set this flag to indicate that a 2D texture is used to receive input from the video encoder API. The common way to create resources for a video encoder is by calling the ID3D11Device::CreateTexture2D method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to ID3D11Device::CreateShaderResourceView.
Direct 3D 11
|
XG_BIND_FLAG is similar to D3D11_BIND_FLAG.
In general, binding flags can be combined using a logical OR (except the constant-buffer flag); however, you should use a single flag to allow the device to optimize the resource usage.
This enumeration is used by a:
A shader-resource buffer is not a constant buffer; rather, it is a texture or buffer resource that is bound to a shader, that contains texture or buffer data (it is not limited to a single element type in the buffer). A shader-resource buffer is created with the XG_BIND_SHADER_RESOURCE flag and is bound to the pipeline using one of these APIs: ID3D11DeviceContext::GSSetShaderResources, ID3D11DeviceContext::PSSetShaderResources, or ID3D11DeviceContext::VSSetShaderResources.
Header: Declared in xg.h.
Library: Use xg_x.lib.