D3DDDIARG_LOCKASYNC structure

The D3DDDIARG_LOCKASYNC structure describes a resource or a surface within the resource to lock.

Syntax


typedef struct _D3DDDIARG_LOCKASYNC {
  HANDLE                 hResource;
  UINT                   SubResourceIndex;
  D3DDDI_LOCKASYNCFLAGS  Flags;
  union {
    D3DDDIRANGE Range;
    RECT        Area;
    D3DDDIBOX   Box;
  };
  HANDLE                 hCookie;
  VOID                   *pSurfData;
  UINT                   Pitch;
  UINT                   SlicePitch;
#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN7)
  D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress;
#endif 
} D3DDDIARG_LOCKASYNC;

Members

hResource

[in] A handle to the resource to be locked.

SubResourceIndex

[in] The zero-based index into the resource that hResource specifies. This index indicates the subresource or surface to be locked.

Flags

[in] A D3DDDI_LOCKASYNCFLAGS structure that indicates, in bit-field flags, how to lock the resource.

Note   Some flags are mutually exclusive with other flags. For more information, see the following Remarks section.
 
Range

[in] A D3DDDIRANGE structure that describes the subrange of the linear resource to lock, if the RangeValid bit-field flag is set in the D3DDDI_LOCKASYNCFLAGS structure that Flags specifies.

Area

[in] A RECT structure that describes the subrectangle of the surface to lock, if the AreaValid bit-field flag is set in the D3DDDI_LOCKASYNCFLAGS structure that Flags specifies.

Box

[in] A D3DDDIBOX structure that describes the subvolume of the volume to lock, if the BoxValid bit-field flag is set in the D3DDDI_LOCKASYNCFLAGS structure that Flags specifies.

hCookie

[out] A handle that represents the renamed resource. This handle is valid only if the Discard bit-field flag is set in the D3DDDI_LOCKASYNCFLAGS structure that Flags specifies.

pSurfData

[out] A pointer to the memory region for the resource that was locked. The user-mode display driver's LockAsync function returns this pointer to the Microsoft Direct3D runtime.

Pitch

[out] The pitch, in bytes, of the surface that was locked. The user-mode display driver's LockAsync function returns this pitch value to the Direct3D runtime.

SlicePitch

[out] The slice pitch, in bytes, of the surface that was locked. The user-mode display driver's LockAsync function returns this slice pitch value to the Direct3D runtime.

GpuVirtualAddress

This member is reserved and should be set to zero.

This member is available beginning with Windows 7.

Remarks

The members of the D3DDDI_LOCKASYNCFLAGS structure that the Flags member specifies must adhere to the following rules:

  • The NoOverwrite bit-field flag must not be simultaneously set with the Discard bit-field flag.

  • Only one of the RangeValid, AreaValid, and BoxValid bit-field flags must be set at any time.

Requirements

Version

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

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDI_LOCKASYNCFLAGS
LockAsync
RECT

 

 

Send comments about this topic to Microsoft

Show: