D3DDDIARG_CREATERESOURCE2 structure (d3dukmdt.h)

Contains information for creating a resource. Used by Windows Display Driver Model (WDDM) 1.2 and later user-mode display drivers.

Syntax

typedef struct _D3DDDIARG_CREATERESOURCE2 {
  [in]     D3DDDIFORMAT                   Format;
  [in]     D3DDDI_POOL                    Pool;
  [in]     D3DDDIMULTISAMPLE_TYPE         MultisampleType;
  [in]     UINT                           MultisampleQuality;
  [in]     const D3DDDI_SURFACEINFO       *pSurfList;
  [in]     UINT                           SurfCount;
  [in]     UINT                           MipLevels;
  [in]     UINT                           Fvf;
  [in]     D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
  [in]     D3DDDI_RATIONAL                RefreshRate;
  [in/out] HANDLE                         hResource;
  [in]     D3DDDI_RESOURCEFLAGS           Flags;
  [in]     D3DDDI_ROTATION                Rotation;
  [in]     D3DDDI_RESOURCEFLAGS2          Flags2;
} D3DDDIARG_CREATERESOURCE2;

Members

[in] Format

A value of type D3DDDIFORMAT that indicates the format of the resources.

[in] Pool

A value of type D3DDDI_POOL that indicates the type of memory pool that the resources are created from.

[in] MultisampleType

A value of type D3DDDIMULTISAMPLE_TYPE that indicates the number of samples for a multiple-sampled surface. If the surface is not multiple sampled, this value is D3DDDIMULTISAMPLE_NONE (0).

[in] MultisampleQuality

The quality level of rendering samples in a multiple-sampled surface. The quality level must be a number from 0 through 7 that represents a quality level from 1 through 8, respectively.

Note that even if the surface is not multiple-sampled (that is, if D3DDDIMULTISAMPLE_NONE is specified in MultisampleType) it can still have a quality level that is greater than 1 (which is specified by using a number greater than 0).

[in] pSurfList

An array of D3DDDI_SURFACEINFO structures for the list of surfaces (or other resource types) to create.

[in] SurfCount

The number of resources in the array that is specified by the pSurfList member.

[in] MipLevels

The number of MIP-map levels for the resources.

[in] Fvf

The FVF format for vertex buffers.

[in] VidPnSourceId

The zero-based identification number of the video present source in a path of a video present network (VidPN) topology that the primary surface is created on (if the resource contains a primary surface).

[in] RefreshRate

A D3DDDI_RATIONAL structure that specifies the refresh rate that the resource is used with. This member is applicable only if the resource is the primary surface and the MatchGdiPrimary bit-field flag is not set in the Flags member. In addition, if the InterlacedRefresh bit-field flag is set in Flags, the user-mode display driver determines that the refresh rate is interleaved (otherwise, progressive).

[in/out] hResource

A handle to the resource. On input to the CreateResource2 function, hResource specifies the handle that the driver should use anytime it calls back into the Microsoft Direct3D runtime.

The driver generates a unique handle and passes it back to the Direct3D runtime. On output from the CreateResource2 function, hResource specifies the handle that the Direct3D runtime should use in subsequent driver calls to identify the resource.

[in] Flags

A D3DDDI_RESOURCEFLAGS structure that identifies the type of resources to create. Note that some of the bit-field flags in D3DDDI_RESOURCEFLAGS require that additional bit-field flags are set as well.

[in] Rotation

A D3DDDI_ROTATION-typed value that identifies the orientation of the resource.

For example, consider that the user-mode display driver receives a request for a 480x640 surface to be rotated 90 degrees (D3DDDI_ROTATION_90). The driver should allocate the surface in 640x480 mode for scanning purposes. When rendering to the surface, the driver should perform the 90 degree rotation.

Orientations other than D3DDDI_ROTATION_IDENTITY are set only when the Primary bit-field flag is also set in the Flags member.

[in] Flags2

A D3DDDI_RESOURCEFLAGS2 structure that identifies the type of resources to create. Note that some of the bit-field flags in D3DDDI_RESOURCEFLAGS2 require that additional bit-field flags are set as well.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Header d3dukmdt.h (include D3dukmdt.h, D3dkmddi.h)

See also

CreateResource2

D3DDDIFORMAT

D3DDDIMULTISAMPLE_TYPE

D3DDDI_POOL

D3DDDI_RATIONAL

D3DDDI_RESOURCEFLAGS2

D3DDDI_ROTATION

D3DDDI_SURFACEINFO