D3D11_BIND_FLAG enumeration (d3d11.h)
Identifies how to bind a resource to the pipeline.
Syntax
typedef enum D3D11_BIND_FLAG {
D3D11_BIND_VERTEX_BUFFER = 0x1L,
D3D11_BIND_INDEX_BUFFER = 0x2L,
D3D11_BIND_CONSTANT_BUFFER = 0x4L,
D3D11_BIND_SHADER_RESOURCE = 0x8L,
D3D11_BIND_STREAM_OUTPUT = 0x10L,
D3D11_BIND_RENDER_TARGET = 0x20L,
D3D11_BIND_DEPTH_STENCIL = 0x40L,
D3D11_BIND_UNORDERED_ACCESS = 0x80L,
D3D11_BIND_DECODER = 0x200L,
D3D11_BIND_VIDEO_ENCODER = 0x400L
} ;
Constants
D3D11_BIND_VERTEX_BUFFER Value: 0x1L Bind a buffer as a vertex buffer to the input-assembler stage. |
D3D11_BIND_INDEX_BUFFER Value: 0x2L Bind a buffer as an index buffer to the input-assembler stage. |
D3D11_BIND_CONSTANT_BUFFER Value: 0x4L Bind a buffer as a constant buffer to a shader stage; this flag may NOT be combined with any other bind flag. |
D3D11_BIND_SHADER_RESOURCE Value: 0x8L Bind a buffer or texture to a shader stage; this flag cannot be used with the D3D11_MAP_WRITE_NO_OVERWRITE flag. Note The Direct3D 11.1 runtime, which is available starting with Windows 8, enables mapping dynamic constant buffers and shader resource views (SRVs) of dynamic buffers with D3D11_MAP_WRITE_NO_OVERWRITE. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call ID3D11Device::CheckFeatureSupport with D3D11_FEATURE_D3D11_OPTIONS. CheckFeatureSupport fills members of a D3D11_FEATURE_DATA_D3D11_OPTIONS structure with the device's features. The relevant members here are MapNoOverwriteOnDynamicConstantBuffer and MapNoOverwriteOnDynamicBufferSRV. |
D3D11_BIND_STREAM_OUTPUT Value: 0x10L Bind an output buffer for the stream-output stage. |
D3D11_BIND_RENDER_TARGET Value: 0x20L Bind a texture as a render target for the output-merger stage. |
D3D11_BIND_DEPTH_STENCIL Value: 0x40L Bind a texture as a depth-stencil target for the output-merger stage. |
D3D11_BIND_UNORDERED_ACCESS Value: 0x80L Bind an unordered access resource. |
D3D11_BIND_DECODER Value: 0x200L 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. Direct3D 11: This value is not supported until Direct3D 11.1. |
D3D11_BIND_VIDEO_ENCODER Value: 0x400L 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. Direct3D 11: This value is not supported until Direct3D 11.1. |
Remarks
In general, binding flags can be combined using a bitwise 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:
- Buffer description when creating a buffer.
- Texture description when creating a texture (see D3D11_TEXTURE1D_DESC or D3D11_TEXTURE2D_DESC or D3D11_TEXTURE3D_DESC).
Note The Direct3D 11.1 runtime, which is available starting with Windows 8, enables mapping dynamic constant buffers and shader resource views (SRVs) of dynamic buffers with D3D11_MAP_WRITE_NO_OVERWRITE. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call ID3D11Device::CheckFeatureSupport with D3D11_FEATURE_D3D11_OPTIONS. CheckFeatureSupport fills members of a D3D11_FEATURE_DATA_D3D11_OPTIONS structure with the device's features. The relevant members here are MapNoOverwriteOnDynamicConstantBuffer and MapNoOverwriteOnDynamicBufferSRV.
Requirements
Requirement | Value |
---|---|
Header | d3d11.h |