Bewerken

Delen via


D3D11DDIARG_CREATERESOURCE structure (d3d10umddi.h)

The D3D11DDIARG_CREATERESOURCE structure describes a resource to create.

Syntax

typedef struct D3D11DDIARG_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;
  [in]      UINT                                 ByteStride;
  [in]      D3D11_1DDI_VIDEO_DECODER_BUFFER_TYPE DecoderBufferType;
            D3DWDDM2_0DDI_TEXTURE_LAYOUT         TextureLayout;
} D3D11DDIARG_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 values of type D3D10_DDI_RESOURCE_BIND_FLAG 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 values of type D3D10_DDI_RESOURCE_MISC_FLAG 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 the ArraySize member of the D3D11DDIARG_CREATERESOURCE structure 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.

[in] ByteStride

The size, in bytes, from one scan line to the next scan line in the surface.

[in] DecoderBufferType

A value of type D3D11_DDI_VIDEO_DECODER_BUFFER_TYPE that indicates the buffer type used by the video decoder.

If the driver does not check that D3D11DDI_MINOR_HEADER_VERSION >= 3 before accessing this structure member, it should access this member only when the D3D11_DDI_BIND_DECODER flag is set in the BindFlags member.

TextureLayout

Requirements

Requirement Value
Minimum supported client Windows 7 (WDDM 1.1)
Header d3d10umddi.h (include D3d10umddi.h)

See also

CreateResource(D3D11)

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

D3D11_DDI_VIDEO_DECODER_BUFFER_TYPE

DXGI_DDI_PRIMARY_DESC

DXGI_FORMAT

DXGI_SAMPLE_DESC