Export (0) Print
Expand All

D3D10_SHADER_RESOURCE_VIEW_DESC1 structure

Describes a shader-resource view.

Syntax


typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1 {
  DXGI_FORMAT          Format;
  D3D10_SRV_DIMENSION1 ViewDimension;
  union {
    D3D10_BUFFER_SRV         Buffer;
    D3D10_TEX1D_SRV          Texture1D;
    D3D10_TEX1D_ARRAY_SRV    Texture1DArray;
    D3D10_TEX2D_SRV          Texture2D;
    D3D10_TEX2D_ARRAY_SRV    Texture2DArray;
    D3D10_TEX2DMS_SRV        Texture2DMS;
    D3D10_TEX2DMS_ARRAY_SRV  Texture2DMSArray;
    D3D10_TEX3D_SRV          Texture3D;
    D3D10_TEXCUBE_SRV        TextureCube;
    D3D10_TEXCUBE_ARRAY_SRV1 TextureCube;
  };
} D3D10_SHADER_RESOURCE_VIEW_DESC1;

Members

Format

Type: DXGI_FORMAT

The viewing format. See remarks.

ViewDimension

Type: D3D10_SRV_DIMENSION1

The resource type of the view. See D3D10_SRV_DIMENSION1. This should be the same as the resource type of the underlying resource. This parameter also determines which _SRV to use in the union below.

Buffer

Type: D3D10_BUFFER_SRV

View the resource as a buffer using information from a shader-resource view (see D3D10_BUFFER_SRV).

Texture1D

Type: D3D10_TEX1D_SRV

View the resource as a 1D texture using information from a shader-resource view (see D3D10_TEX1D_SRV).

Texture1DArray

Type: D3D10_TEX1D_ARRAY_SRV

View the resource as a 1D-texture array using information from a shader-resource view (see D3D10_TEX1D_ARRAY_SRV.

Texture2D

Type: D3D10_TEX2D_SRV

View the resource as a 2D-texture using information from a shader-resource view (see D3D10_TEX2D_SRV.

Texture2DArray

Type: D3D10_TEX2D_ARRAY_SRV

View the resource as a 2D-texture array using information from a shader-resource view (see D3D10_TEX2D_ARRAY_SRV.

Texture2DMS

Type: D3D10_TEX2DMS_SRV

View the resource as a 2D-multisampled texture using information from a shader-resource view (see D3D10_TEX2DMS_SRV.

Texture2DMSArray

Type: D3D10_TEX2DMS_ARRAY_SRV

View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see D3D10_TEX2DMS_ARRAY_SRV.

Texture3D

Type: D3D10_TEX3D_SRV

View the resource as a 3D texture using information from a shader-resource view (see D3D10_TEX3D_SRV.

TextureCube

Type: D3D10_TEXCUBE_SRV

View the resource as a 3D-cube texture using information from a shader-resource view (see D3D10_TEXCUBE_SRV).

TextureCube

Type: D3D10_TEXCUBE_ARRAY_SRV1

View the resource as an array of cube textures using information from a shader-resource view (see D3D10_TEXCUBE_ARRAY_SRV1).

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. For more information about how views work, see Views

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 ID3D10Device1::CreateShaderResourceView1. To view a shader-resource-view description, call ID3D10ShaderResourceView::GetDesc.

This structure requires Windows Vista Service Pack 1.

Requirements

Header

D3D10_1Shader.h

See also

Shader Structures

 

 

Community Additions

ADD
Show:
© 2015 Microsoft