Specifies the elements in a buffer resource to use in a shader-resource view.
typedef struct D3D11_BUFFER_SRV {
union {
UINT FirstElement;
UINT ElementOffset;
};
union {
UINT NumElements;
UINT ElementWidth;
};
} D3D11_BUFFER_SRV;
FirstElement
Number of bytes between the beginning of the buffer and the first element to access.
ElementOffset
The offset of the first element in the view to access, relative to element 0.
NumElements
The total number of elements in the view.
ElementWidth
The width of each element (in bytes). This can be determined from the format stored in the shader-resource-view description.
The D3D11_BUFFER_SRV structure is a member of the D3D11_SHADER_RESOURCE_VIEW_DESC structure, which represents a shader-resource view description. You can create a shader-resource view by calling the ID3D11Device::CreateShaderResourceView method.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).