Export (0) Print
Expand All
Expand Minimize

CopyStructureCount routine

The CopyStructureCount function copies the number of items in the filled portion (that is, the filled-size value) of an append buffer unordered access view (UAV) to an offset into a destination buffer.

Syntax


PFND3D11DDI_COPYSTRUCTURECOUNT CopyStructureCount;

VOID APIENTRY CopyStructureCount(
  _In_  D3D10DDI_HDEVICE hDevice,
  _In_  D3D10DDI_HRESOURCE hDstBuffer,
  _In_  UINT DstAlignedByteOffset,
  _In_  D3D11DDI_HUNORDEREDACCESSVIEW hSrcView
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

hDstBuffer [in]

A handle to a destination buffer to copy the filled-size value of an UAV to. To create this destination buffer, the runtime must have previously called the driver's CreateResource(D3D11) function with the ResourceDimension member of the D3D11DDIARG_CREATERESOURCE structure set to the D3D10DDIRESOURCE_BUFFER value.

DstAlignedByteOffset [in]

The 4-byte aligned offset, in bytes, into the destination buffer that the hDstBuffer parameter specifies. CopyStructureCount copies the filled-size value of the append buffer view that the hSrcView parameter specifies to this offset in hDstBuffer. DstAlignedByteOffset must be a multiple of four.

hSrcView [in]

A handle to the source append UAV, which must be an append buffer view. CopyStructureCount copies the filled-size value of this view to the destination buffer that the hDstBuffer parameter specifies. To create this append buffer view, the runtime must have previously called the driver's CreateUnorderedAccessView function with the D3D11_DDI_BUFFER_UAV_FLAG_APPEND flag set.

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 following Remarks section.

Remarks

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 determines that the error is critical. Even if the device is removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if the device removal interferes with the operation of CopyStructureCount (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

CopyStructureCount takes the filled-size value of the append buffer UAV (a UAV that supports push and pop-up operations on structures like on a stack) and copies this value to an offset into the destination buffer. The graphics hardware uses a 4-byte filled-size value to keep track of how much data is filled in the append buffer UAV.

Requirements

Version

CopyStructureCount is supported beginning with the Windows 7 operating system.

Header

D3d10umddi.h (include D3d10umddi.h)

See also

CreateResource(D3D11)
CreateUnorderedAccessView
D3D11DDI_DEVICEFUNCS
pfnSetErrorCb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft