D3D11_SHADER_RESOURCE_VIEW_DESC1 structure (d3d11_3.h)
Describes a shader-resource view.
Syntax
typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC1 {
DXGI_FORMAT Format;
D3D11_SRV_DIMENSION ViewDimension;
union {
D3D11_BUFFER_SRV Buffer;
D3D11_TEX1D_SRV Texture1D;
D3D11_TEX1D_ARRAY_SRV Texture1DArray;
D3D11_TEX2D_SRV1 Texture2D;
D3D11_TEX2D_ARRAY_SRV1 Texture2DArray;
D3D11_TEX2DMS_SRV Texture2DMS;
D3D11_TEX2DMS_ARRAY_SRV Texture2DMSArray;
D3D11_TEX3D_SRV Texture3D;
D3D11_TEXCUBE_SRV TextureCube;
D3D11_TEXCUBE_ARRAY_SRV TextureCubeArray;
D3D11_BUFFEREX_SRV BufferEx;
};
} D3D11_SHADER_RESOURCE_VIEW_DESC1;
Members
Format
A DXGI_FORMAT-typed value that specifies the viewing format. See remarks.
ViewDimension
A D3D11_SRV_DIMENSION-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _SRV to use in the union below.
Buffer
A D3D11_BUFFER_SRV structure that views the resource as a buffer.
Texture1D
A D3D11_TEX1D_SRV structure that views the resource as a 1D texture.
Texture1DArray
A D3D11_TEX1D_ARRAY_SRV structure that views the resource as a 1D-texture array.
Texture2D
A D3D11_TEX2D_SRV1 structure that views the resource as a 2D-texture.
Texture2DArray
A D3D11_TEX2D_ARRAY_SRV1 structure that views the resource as a 2D-texture array.
Texture2DMS
A D3D11_TEX2DMS_SRV structure that views the resource as a 2D-multisampled texture.
Texture2DMSArray
A D3D11_TEX2DMS_ARRAY_SRV structure that views the resource as a 2D-multisampled-texture array.
Texture3D
A D3D11_TEX3D_SRV structure that views the resource as a 3D texture.
TextureCube
A D3D11_TEXCUBE_SRV structure that views the resource as a 3D-cube texture.
TextureCubeArray
A D3D11_TEXCUBE_ARRAY_SRV structure that views the resource as a 3D-cube-texture array.
BufferEx
A D3D11_BUFFEREX_SRV structure that views the resource as a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.
Remarks
A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read.
When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a DXGI_FORMAT_R32G32B32_TYPELESS resource can be viewed with one of these typed formats: DXGI_FORMAT_R32G32B32_FLOAT, DXGI_FORMAT_R32G32B32_UINT, and DXGI_FORMAT_R32G32B32_SINT, since these typed formats are compatible with the typeless resource.
Create a shader-resource-view description by calling ID3D11Device3::CreateShaderResourceView1. To view a shader-resource-view description, call ID3D11ShaderResourceView1::GetDesc1.
Requirements
Requirement | Value |
---|---|
Header | d3d11_3.h |