Skip to content

Latest commit

 

History

History
102 lines (80 loc) · 4.04 KB

ns-d3d11-d3d11_mapped_subresource.md

File metadata and controls

102 lines (80 loc) · 4.04 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:d3d11.D3D11_MAPPED_SUBRESOURCE
D3D11_MAPPED_SUBRESOURCE (d3d11.h)
Provides access to subresource data.
6581ca11-abcb-9ae4-0972-0f8f36933283
D3D11_MAPPED_SUBRESOURCE
D3D11_MAPPED_SUBRESOURCE structure [Direct3D 11]
d3d11/D3D11_MAPPED_SUBRESOURCE
direct3d11.d3d11_mapped_subresource
direct3d11\d3d11_mapped_subresource.htm
direct3d11
cbbb8689-0a7d-43b9-bde3-29d93cc7f0fe
12/05/2018
6581ca11-abcb-9ae4-0972-0f8f36933283, D3D11_MAPPED_SUBRESOURCE, D3D11_MAPPED_SUBRESOURCE structure [Direct3D 11], d3d11/D3D11_MAPPED_SUBRESOURCE, direct3d11.d3d11_mapped_subresource
d3d11.h
Windows
Windows
D3D11_MAPPED_SUBRESOURCE
19H1
D3D11_MAPPED_SUBRESOURCE
d3d11/D3D11_MAPPED_SUBRESOURCE
c++
APIRef
kbSyntax
HeaderDef
D3D11.h
D3D11_MAPPED_SUBRESOURCE

D3D11_MAPPED_SUBRESOURCE structure

-description

Provides access to subresource data.

-struct-fields

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

-field RowPitch

Type: UINT

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

-field DepthPitch

Type: UINT

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:

  • 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.
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:
  • 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.
Note  The runtime might assign values to RowPitch and DepthPitch that are larger than anticipated because there might be padding between rows and depth.
 

-see-also

Resource Structures