D3D10DDI_MAPPED_SUBRESOURCE structure (d3d10umddi.h)
The D3D10DDI_MAPPED_SUBRESOURCE structure describes a subresource that the driver maps to through a call to the driver's ResourceMap function.
Syntax
typedef struct D3D10DDI_MAPPED_SUBRESOURCE {
[out] void *pData;
[out] UINT RowPitch;
[out] UINT DepthPitch;
} D3D10DDI_MAPPED_SUBRESOURCE;
Members
[out] pData
A pointer to a buffer that contains the contents of the subresource.
[out] RowPitch
The row pitch, width, or physical size (in bytes) of the data.
[out] DepthPitch
The depth pitch, width, or physical size (in bytes) of the data.
Remarks
The pData member points to row 0 and slice 0.
The RowPitch member is the value that is added to pData to move from row to row. Each row should contain multiple pixels.
The DepthPitch member is the value that is added to pData to move from depth slice to depth slice. Each depth slice should contain multiple rows.
It is not advisable to assign a value of zero to the RowPitch and DepthPitch members.
To avoid zero values for these members, it helps to think of all resources as being three-dimensional, as in these two examples:
- If the resource attribute is Buffer or Texture1D and contains 8 bytes, then appropriate values for RowPitch and DepthPitch would be 8 or more.
- If the resource attribute is Texture2d, even if DepthPitch is not used, DepthPitch must not be assigned a value of zero.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows Vista. |
Header | d3d10umddi.h (include D3d10umddi.h) |