D3D12XBOX_SHADER_RESOURCE_VIEW_DESC Structure

Describes a shader-resource view (SRV).

Syntax

typedef struct D3D12XBOX_SHADER_RESOURCE_VIEW_DESC {
    DXGI_FORMAT Format;
    D3D12_SRV_DIMENSION ViewDimension;
    UINT Shader4ComponentMapping;
    union {
        D3D12_BUFFER_SRV Buffer;
        D3D12_TEX1D_SRV Texture1D;
        D3D12_TEX1D_ARRAY_SRV Texture1DArray;
        D3D12_TEX2D_SRV Texture2D;
        D3D12_TEX2D_ARRAY_SRV Texture2DArray;
        D3D12_TEX2DMS_SRV Texture2DMS;
        D3D12_TEX2DMS_ARRAY_SRV Texture2DMSArray;
        D3D12_TEX3D_SRV Texture3D;
        D3D12_TEXCUBE_SRV TextureCube;
        D3D12_TEXCUBE_ARRAY_SRV TextureCubeArray;
    };
    D3D12_GPU_VIRTUAL_ADDRESS ResourceLocation;
    D3D12XBOX_DATA_FORMAT DataFormat;
    D3D12XBOX_NUMBER_FORMAT NumberFormat;
    UINT MemoryType;
    FLOAT TextureWarnLevelOfDetail;
    INT TexturePerfModulation;
} D3D12XBOX_SHADER_RESOURCE_VIEW_DESC;  

Members

Format
The viewing format, as a DXGI_FORMAT enumeration constant. See Remarks.

ViewDimension
A D3D12_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.

Shader4ComponentMapping
A D3D12_SHADER_COMPONENT_MAPPING enumeration constant, such as return component 0 (red) from memory, or force the resulting value to 0. This mapping enables the shader resource view (SRV) to choose how memory gets routed to the 4 return components in a shader after a memory fetch.

Buffer
A D3D12_BUFFER_SRV structure that views the resource as a buffer.

Texture1D
A D3D12_TEX1D_SRV structure that views the resource as a 1D texture.

Texture1DArray
A D3D12_TEX1D_ARRAY_SRV structure that views the resource as a 1D-texture array.

Texture2D
A D3D12_TEX2D_SRV structure that views the resource as a 2D-texture.

Texture2DArray
A D3D12_TEX2D_ARRAY_SRV structure that views the resource as a 2D-texture array.

Texture2DMS
A D3D12_TEX2DMS_SRV structure that views the resource as a 2D-multisampled texture.

Texture2DMSArray
A D3D12_TEX2DMS_ARRAY_SRV structure that views the resource as a 2D-multisampled-texture array.

Texture3D
A D3D12_TEX3D_SRV structure that views the resource as a 3D texture.

TextureCube
A D3D12_TEXCUBE_SRV structure that views the resource as a 3D-cube texture.

TextureCubeArray
A D3D12_TEXCUBE_ARRAY_SRV structure that views the resource as a 3D-cube-texture array.

ResourceLocation
(Xbox One; not on PC) The location of the resource, as a D3D12_GPU_VIRTUAL_ADDRESS (a UINT64).

DataFormat
(Xbox One; not on PC) The data format, as a D3D12XBOX_DATA_FORMAT enumeration constant.

NumberFormat
(Xbox One; not on PC) The number format, as a D3D12XBOX_NUMBER_FORMAT enumeration constant.

MemoryType
(Xbox One; not on PC) The type of memory. Reserved; use zero.

TextureWarnLevelOfDetail
(Xbox One; not on PC) The level of detail for a texture at which a warning message will be issued.

TexturePerfModulation
(Xbox One; not on PC) The texture performance modulation.

Remarks

This structure is used by ID3D12Device::CreatePlacedShaderResourceViewX and ID3D12Device::CreatePlacedRawShaderResourceViewX.

Requirements

Header: Declared in d3d12_x.h.