Expand Minimize

DestroyUnorderedAccessView routine

Destroys an unordered access view.



VOID APIENTRY DestroyUnorderedAccessView(
  _In_  D3D10DDI_HDEVICE hDevice,
  _In_  D3D11DDI_HUNORDEREDACCESSVIEW hUnorderedAccessView
{ ... }


hDevice [in]

A handle to the display device (graphics context).

hUnorderedAccessView [in]

A handle to the driver's private data for the unordered access view to destroy. The Microsoft Direct3D runtime frees the memory region that it previously allocated for the unordered access view. Therefore, the driver can no longer access this memory region.

Return value


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.


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 device removal interferes with the operation of DestroyUnorderedAccessView (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Note  During the destruction of the immediate context and device or the destruction of a deferred context, Windows 7 does not clear the Compute Shader Unordered Access View (CS UAV) bind points. As a result, a driver sees a UAV handle to still be bound to a context, which violates the general guarantees provided by the runtime. The driver can work around this problem by following these steps:

  • Use either the AbandonCommandList or the CreateCommandList method because each marks the end of a command list.
  • Deduce the unbinding of CS UAV bind points by verifying that any one of the following states is set to NULL: blend state, rasterizer state, and depth/stencil state.



DestroyUnorderedAccessView is supported beginning with the Windows 7 operating system.


D3d10umddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft

© 2014 Microsoft