D3D11_SUBRESOURCE_FOOTPRINT Structure
Represents the memory footprint of a subresource.
Syntax
typedef struct D3D11_SUBRESOURCE_FOOTPRINT {
UINT Width;
UINT Height;
UINT Depth;
UINT ArraySize;
UINT MipSlice;
UINT MiscFlags;
DXGI_FORMAT Format;
UINT Stride;
UINT RowSize;
} D3D11_SUBRESOURCE_FOOTPRINT;
Members
| Member | Description |
|---|---|
Width |
The width of the subresource in texels (for textures) or elements (for buffers). |
Height |
The height of the subresource in texels (for textures) or elements (for buffers). |
Depth |
The depth of the subresource in texels (for 3D textures). For 1D textures and buffers, this member is 1. |
ArraySize |
The number of elements in the subresource array. For a non-arrayed texture, this member is 1. |
MipSlice |
The mipmap level index for the subresource. |
MiscFlags |
Flags that specify additional information about the subresource. Possible values include:
|
Format |
A DXGI_FORMAT-typed value that specifies the format of the subresource. |
Stride |
The size of each row in bytes. This is the distance from the beginning of one row to the beginning of the next row. |
RowSize |
The size of the row in bytes. This is the distance from the beginning of one row to the beginning of the next row. |
Remarks
This structure is used to describe the memory layout of a subresource, such as a texture or a buffer. It is returned by methods like ID3D11Device::GetResourceAllocationInfo and ID3D11DeviceContext::GetResourceAllocationInfo.
The Stride and RowSize members are identical and represent the number of bytes from the start of one row to the start of the next. The Stride is typically calculated as (Width * BytesPerPixel), but might be larger due to alignment requirements.
Requirements
| Attribute | Description |
|---|---|
| Header | d3d11.h |
See Also
D3D11_PLACED_SUBRESOURCE_FOOTPRINT
Direct3D 11 Structures
Direct3D 11 API Reference