D3D10_1DDIARG_CREATESHADERRESOURCEVIEW structure (d3d10umddi.h)
The D3D10_1DDIARG_CREATESHADERRESOURCEVIEW structure describes the shader resource view to create.
Syntax
typedef struct D3D10_1DDIARG_CREATESHADERRESOURCEVIEW {
[in] D3D10DDI_HRESOURCE hDrvResource;
[in] DXGI_FORMAT Format;
[in] D3D10DDIRESOURCE_TYPE ResourceDimension;
union {
[in] D3D10DDIARG_BUFFER_SHADERRESOURCEVIEW Buffer;
[in] D3D10DDIARG_TEX1D_SHADERRESOURCEVIEW Tex1D;
[in] D3D10DDIARG_TEX2D_SHADERRESOURCEVIEW Tex2D;
[in] D3D10DDIARG_TEX3D_SHADERRESOURCEVIEW Tex3D;
[in] D3D10_1DDIARG_TEXCUBE_SHADERRESOURCEVIEW TexCube;
};
} D3D10_1DDIARG_CREATESHADERRESOURCEVIEW;
Members
[in] hDrvResource
A handle to the shader resource.
[in] Format
A DXGI_FORMAT-typed value that indicates the pixel format of the view.
[in] ResourceDimension
A D3D10DDIRESOURCE_TYPE-typed value that indicates the resource type and dimensionality.
[in] Buffer
If the value in the ResourceDimension member is set to D3D10DDIRESOURCE_BUFFER, a member in the union that is contained in D3D10_1DDIARG_CREATESHADERRESOURCEVIEW that can hold a D3D10DDIARG_BUFFER_SHADERRESOURCEVIEW structure for a buffer.
[in] Tex1D
If the value in the ResourceDimension member is set to D3D10DDIRESOURCE_TEXTURE1D, a member in the union that is contained in D3D10_1DDIARG_CREATESHADERRESOURCEVIEW that can hold a D3D10DDIARG_TEX1D_SHADERRESOURCEVIEW structure for a one-dimensional texture.
[in] Tex2D
If the value in the ResourceDimension member is set to D3D10DDIRESOURCE_TEXTURE2D, a member in the union that is contained in D3D10_1DDIARG_CREATESHADERRESOURCEVIEW that can hold a D3D10DDIARG_TEX2D_SHADERRESOURCEVIEW structure for a two-dimensional texture.
[in] Tex3D
If the value in the ResourceDimension member is set to D3D10DDIRESOURCE_TEXTURE3D, a member in the union that is contained in D3D10_1DDIARG_CREATESHADERRESOURCEVIEW that can hold a D3D10DDIARG_TEX3D_SHADERRESOURCEVIEW structure for a three-dimensional texture.
[in] TexCube
If the value in the ResourceDimension member is set to D3D10DDIRESOURCE_TEXTURECUBE, a member in the union that is contained in D3D10_1DDIARG_CREATESHADERRESOURCEVIEW that can hold a D3D10DDIARG_TEXCUBE_SHADERRESOURCEVIEW structure for a cube texture.
Remarks
CreateShaderResourceView(D3D10_1) has a major functionality difference from the Direct3D 10.0 version (that is,CreateShaderResourceView) in regard to the ResourceDimension member of D3D10_1DDIARG_CREATESHADERRESOURCEVIEW. If the Direct3D runtime attempts to create a view on a shader resource, CreateShaderResourceView requires that the ResourceDimension member of D3D10DDIARG_CREATESHADERRESOURCEVIEW match the ResourceDimension member of D3D10DDIARG_CREATERESOURCE for the shader resource that was created in a call to the driver's CreateResource(D3D10) function. If the Direct3D 10.1 runtime attempts to create a view on a shader resource, CreateShaderResourceView(D3D10_1) allows a slight relaxation for its ResourceDimension member. CreateShaderResourceView(D3D10_1) allows the creation of Tex2D views on TexCube resources. In addition, the distinction between TexCube at the resource level is gone in Direct3D version 10.1. CreateShaderResourceView(D3D10_1) only represents whether it can create a TexCube view. In Direct3D version 10.0, copying a resource, validation of a multiple render target, and so on (that is, various operations that required the resource type to be identical) all included the distinction of TexCube to factor into the resource type. In Direct3D version 10.1, the runtime can determine only Tex2D.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista Service Pack 1 (SP1) |
Minimum supported server | Windows Server 2008 |
Header | d3d10umddi.h (include D3d10umddi.h) |
See also
CalcPrivateShaderResourceViewSize(D3D10_1)
CreateShaderResourceView(D3D10_1)
D3D10DDIARG_BUFFER_SHADERRESOURCEVIEW
D3D10DDIARG_TEX1D_SHADERRESOURCEVIEW
D3D10DDIARG_TEX2D_SHADERRESOURCEVIEW
D3D10DDIARG_TEX3D_SHADERRESOURCEVIEW