D3D11_MAPPED_SUBRESOURCE structure (d3d11.h)
Provides access to subresource data.
typedef struct D3D11_MAPPED_SUBRESOURCE {
void *pData;
UINT RowPitch;
UINT DepthPitch;
} D3D11_MAPPED_SUBRESOURCE;
pData
Type: void*
Pointer to the data. When ID3D11DeviceContext::Map provides the pointer, the runtime ensures that the pointer has a specific alignment, depending on the following feature levels:
- For D3D_FEATURE_LEVEL_10_0 and higher, the pointer is aligned to 16 bytes.
- For lower than D3D_FEATURE_LEVEL_10_0, the pointer is aligned to 4 bytes.
RowPitch
Type: UINT
The row pitch, or width, or physical size (in bytes) of the data.
DepthPitch
Type: UINT
The depth pitch, or width, or physical size (in bytes)of the data.
This structure is used in a call to ID3D11DeviceContext::Map.
The values in these members tell you how much data you can view:
- pData points to row 0 and depth slice 0.
- RowPitch contains the value that the runtime adds to pData to move from row to row, where each row contains multiple pixels.
- DepthPitch contains the value that the runtime adds to pData to move from depth slice to depth slice, where each depth slice contains multiple rows.
- For Buffer and Texture1D, the runtime assigns values that aren't 0 to RowPitch and DepthPitch. For example, if a Buffer contains 8 bytes, the runtime assigns values to RowPitch and DepthPitch that are greater than or equal to 8.
- For Texture2D, the runtime still assigns a value that isn't 0 to DepthPitch, assuming that the field isn't used.
Requirement | Value |
---|---|
Header | d3d11.h |