D3D11_MAPPED_SUBRESOURCE Structure

Provides access to subresource data.

Syntax

typedef struct D3D11_MAPPED_SUBRESOURCE {
    void *pData;
    UINT RowPitch;
    UINT DepthPitch;
} D3D11_MAPPED_SUBRESOURCE;  

Members

pData
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:

RowPitch
The row pitch, or width, or physical size (in bytes) of the data.

DepthPitch
The depth pitch, or width, or physical size (in bytes)of the data.

Remarks

This structure is used in a call to ID3D11DeviceContext::Map.

The values in these members tell you how much data you can view:

When RowPitch and DepthPitch are not appropriate for the resource type, the runtime might set their values to 0. So, don’t use these values for anything other than iterating over rows and depth. Here are some examples:

Note

The runtime might assign values to RowPitch and DepthPitch that are larger than anticipated because there might be padding between rows and depth.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).