Export (0) Print
Expand All
Expand Minimize

D3D10DDIARG_CREATERESOURCE structure

Describes a resource to create.

Syntax


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

Members

pMipInfoList

[in] 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 } }.

pInitialDataUP

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

ResourceDimension

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

Usage

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

BindFlags

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

MapFlags

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

MiscFlags

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

Format

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

SampleDesc

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

MipLevels

[in] The number of MIP-map levels for the resource.

ArraySize

[in] 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.

pPrimaryDesc

[in, out] 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

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3d10umddi.h (include D3d10umddi.h)

See also

CreateResource(D3D10)
D3D10_DDI_MAP
D3D10_DDI_RESOURCE_BIND_FLAG
D3D10_DDI_RESOURCE_MISC_FLAG
D3D10_DDI_RESOURCE_USAGE
D3D10_DDIARG_SUBRESOURCE_UP
D3D10DDI_MIPINFO
D3D10DDIRESOURCE_TYPE
DXGI_DDI_PRIMARY_DESC
DXGI_FORMAT
DXGI_SAMPLE_DESC

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft