Freigeben über


D3D11_SUBRESOURCE_DATA Structure

Specifies data for initializing a subresource.

Syntax

typedef struct D3D11_SUBRESOURCE_DATA {
  const void *pSysMem;
  UINT       SysMemPitch;
  UINT       SysMemSlicePitch;
} D3D11_SUBRESOURCE_DATA;

Mitglieder

  • pSysMem
    Typ: const void*

    Pointer to the initialization data.

  • SysMemPitch
    Typ: UINT

    The distance (in bytes) from the beginning of one line of a texture to the next line. System-memory pitch is used only for 2D and 3D texture data as it is has no meaning for the other resource types.

  • SysMemSlicePitch
    Typ: UINT

    The distance (in bytes) from the beginning of one depth level to the next. System-memory-slice pitch is only used for 3D texture data as it has no meaning for the other resource types.

Hinweise

This structure is used in calls to create buffers (ID3D11Device::CreateBuffer) and textures (ID3D11Device::CreateTexture1D, ID3D11Device::CreateTexture2D, and ID3D11Device::CreateTexture3D). If the resource being created does not require a system-memory pitch or a system-memory-pitch slice, then you are free to use those members to pass size information which may help you when debugging a problem creating a resource.

Note that an application should not rely on SysMemPitch being exactly equal to the number of texels in a line times the size of a texel. In some cases SysMemPitch will include padding to skip past additional data in a line. This could be padding for alignment or the texture could be a subsection of a larger texture. For example the D3D11_SUBRESOURCE_DATA structure could represent a 32 by 32 subsection of a 128 by 128 texture. The value for SysMemSlicePitch will reflect any padding included in SysMemPitch.

Anforderungen

Header

D3D11.h

Siehe auch

Resource Structures