Expand Minimize

ResourceUpdateSubresourceUP(D3D11_1) routine

Updates a destination subresource region from a source system-memory region. Implemented by Windows Display Driver Model (WDDM) 1.2 and later user-mode display drivers.

Syntax


PFND3D11_1DDI_RESOURCEUPDATESUBRESOURCEUP ResourceUpdateSubresourceUP(D3D11_1);

VOID APIENTRY* ResourceUpdateSubresourceUP(D3D11_1)(
  _In_      D3D10DDI_HDEVICE hDevice,
  _In_      D3D10DDI_HRESOURCE hDstResource,
  _In_      UINT DstSubresource,
  _In_opt_  const D3D10_DDI_BOX *pDstBox,
  _In_      const VOID *pSysMemUP,
  _In_      UINT RowPitch,
  _In_      UINT DepthPitch,
  UINT CopyFlags
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

hDstResource [in]

A handle to the destination resource to copy to.

DstSubresource [in]

An index that indicates the destination subresource to copy to.

pDstBox [in, optional]

A pointer to a D3D10_DDI_BOX structure that specifies the region of the destination subresource to copy data to. If pDstBox is NULL, the driver should copy to the entire destination subresouce.

If the members of the D3D10_DDI_BOX structure are such that left>=right, top>=bottom, or front>=back, then pDstBox is considered empty, and ResourceUpdateSubresourceUP(D3D11_1) must not perform any update operation.

pSysMemUP [in]

A pointer to the beginning address of the source data that this function uses to update the destination subresouce.

RowPitch [in]

The offset, in bytes, to move to the next row of source data.

DepthPitch [in]

The offset, in bytes, to move to the next depth slice of source data.

CopyFlags

[in] A value that specifies characteristics of the copy operation as a bitwise OR of the values in the D3D11_1_DDI_COPY_FLAGS enumeration type.

Return value

None

The driver can use the pfnSetErrorCb callback function to set an error code. For more information about setting error codes, see the Remarks section.

Remarks

The Microsoft Direct3D runtime calls the user-mode display driver's ResourceUpdateSubresourceUP function to copy from a source system-memory region to a destination subresource region. The source data must be in the format type (DXGI_FORMAT-typed value) of the destination subresource. The box that the pDstBox parameter points to must not extend over the edges of the destination subresource.

In addition, the resource creation flags restrict whether the resource can participate in the update operation. The runtime will typically not call ResourceUpdateSubresourceUP if the runtime can call ResourceMap to populate the destination subresource and might not call either ResourceUpdateSubresourceUP or ResourceMap to update the destination subresource if, for example, the resource is immutable.

The driver should not encounter any error, except for D3DDDIERR_DEVICEREMOVED. Therefore, if the driver passes any error, except for D3DDDIERR_DEVICEREMOVED, in a call to the pfnSetErrorCb function, the Direct3D runtime will determine that the error is critical. Even if the device was removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if device removal interfered with the operation of ResourceUpdateSubresourceUP (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

D3d10umddi.h (include D3d10umddi.h)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft