D3D11_MAPPED_SUBRESOURCE Structure
Provides access to subresource data.
Syntax
typedef struct D3D11_MAPPED_SUBRESOURCE {
void *pData;
UINT RowPitch;
UINT DepthPitch;
} D3D11_MAPPED_SUBRESOURCE;
Mitglieder
pData
Typ: 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
Typ: UINTThe row pitch, or width, or physical size (in bytes) of the data.
DepthPitch
Typ: UINTThe depth pitch, or width, or physical size (in bytes)of the data.
Hinweise
This structure is used in a call to ID3D11DeviceContext::Map.
Hinweis
- pData points to row 0 and depth slice 0.
- RowPitch is the value that is added to pData to move from row to row. Where each row contains multiple pixels.
- DepthPitch is the value that is added to pData to move from depth slice to depth slice. Where each depth slice contains multiple rows.
When the data is not appropriate, it is advisable not to assign a value of zero to RowPitch and DepthPitch. In this case, to avoid zero values, you can assume that all the resources are three dimensional. These are some examples:
- Buffer and Texture1d must assign values to RowPitch and DepthPitch that are not 0. For example, if a Buffer contains 8 bytes, then correct values for RowPitch & DepthPitch should be greater than or equal to 8.
- Texture2d must still assign a value to DepthPitch that is not 0, assuming that the field is not used.
Anforderungen
Header |
D3D11.h |