Bewerken

Delen via


D3D10DDIARG_CREATERESOURCE structure (d3d10umddi.h)

D3D10DDIARG_CREATERESOURCE contains the arguments used by PFND3D10DDI_CREATERESOURCE to create a resource.

Syntax

typedef struct D3D10DDIARG_CREATERESOURCE {
  [in]      const D3D10DDI_MIPINFO            *pMipInfoList;
  [in]      const D3D10_DDIARG_SUBRESOURCE_UP *pInitialDataUP;
  [in]      D3D10DDIRESOURCE_TYPE             ResourceDimension;
  [in]      UINT                              Usage;
  [in]      UINT                              BindFlags;
  [in]      UINT                              MapFlags;
  [in]      UINT                              MiscFlags;
  [in]      DXGI_FORMAT                       Format;
  [in]      DXGI_SAMPLE_DESC                  SampleDesc;
  [in]      UINT                              MipLevels;
  [in]      UINT                              ArraySize;
  [in, out] DXGI_DDI_PRIMARY_DESC             *pPrimaryDesc;
} D3D10DDIARG_CREATERESOURCE;

Members

[in] pMipInfoList

An array of D3D10DDI_MIPINFO structures that contains dimensions for MIP levels. For resource formats where a single pixel or texel cannot be referenced directly with a byte address, the dimensions of the physical resource are typically larger or equal to the texel dimensions, in order to satisfy the necessary space requirements. For example, to create a fully mipped BC1 Texture2D, where the most detailed level is 8x8, the pMipInfoList array is: { { 8, 8, 1, 8, 8, 1 }, { 4, 4, 1, 4, 4, 1 }, { 2, 2, 1, 4, 4, 1 }, { 1, 1, 1, 4, 4, 1 } }.

[in] pInitialDataUP

An array of D3D10_DDIARG_SUBRESOURCE_UP structures that provides initialization information for the resource's list of subresources.

[in] ResourceDimension

A value of type D3D10DDIRESOURCE_TYPE that indicates the resource type and dimensionality.

[in] Usage

A value of type D3D10_DDI_RESOURCE_USAGE that indicates how the resource is used.

[in] BindFlags

A valid bitwise OR of D3D10_DDI_RESOURCE_BIND_FLAG values that indicates how the resource is bound.

[in] MapFlags

A value of type D3D10_DDI_MAP that indicates the access level to map to the resource.

[in] MiscFlags

A valid bitwise OR of D3D10_DDI_RESOURCE_MISC_FLAG values that indicates miscellaneous information about the resource.

[in] Format

A value of type DXGI_FORMAT that indicates the pixel format of the resource.

[in] SampleDesc

A value of type DXGI_SAMPLE_DESC that describes the sample count and quality of the resource.

[in] MipLevels

The number of MIP-map levels for the resource.

[in] ArraySize

The number of array elements for a 2-D texture or 1-D texture. ArraySize must be set to 6 for a cube texture.

Beginning in Windows 8, if the driver must create a stereo back buffer, it should set this member to a value of 2.

[in, pPrimaryDesc

A pointer to a DXGI_DDI_PRIMARY_DESC structure that describes a resource that is used as a primary.

The Microsoft Direct3D runtime sets pPrimaryDesc to a non-NULL value only if the D3D10_DDI_BIND_PRESENT bit is set in the BindFlags member; however, even if D3D10_DDI_BIND_PRESENT is set, the runtime does not always set pPrimaryDesc to non-NULL. Setting pPrimaryDesc to non-NULL indicates that the runtime will use the created resource as a primary (that is, the resource is scanned out to the display) and in flip-style present operations.

The user-mode display driver can return the DXGI_DDI_PRIMARY_DRIVER_FLAG_NO_SCANOUT flag in the DriverFlags member of DXGI_DDI_PRIMARY_DESC to prevent the runtime from performing flip-style present operations.

If pPrimaryDesc is set to NULL, the runtime will use the created resource in copy-style (bit-block transfer) present operations.

Requirements

Requirement Value
Minimum supported client Windows Vista
Header d3d10umddi.h (include D3d10umddi.h)

See also

CreateResource(D3D10)

D3D10DDIRESOURCE_TYPE

D3D10DDI_MIPINFO

D3D10_DDIARG_SUBRESOURCE_UP

D3D10_DDI_MAP

D3D10_DDI_RESOURCE_BIND_FLAG

D3D10_DDI_RESOURCE_MISC_FLAG

D3D10_DDI_RESOURCE_USAGE

DXGI_DDI_PRIMARY_DESC

DXGI_FORMAT

DXGI_SAMPLE_DESC