Skip to main content

cudaGraphicsUnregisterResource

Function cudaGraphicsUnregisterResource 

Source
pub unsafe extern "C" fn cudaGraphicsUnregisterResource(
    resource: cudaGraphicsResource_t,
) -> cudaError_t
Expand description

Unregisters a graphics resource for access by CUDA.

Unregisters the graphics resource resource so it is not accessible by CUDA unless registered again.

If resource is invalid then cudaError_t::CUDA_ERROR_INVALID_HANDLE is returned.

Note that this function may also return error codes from previous, asynchronous launches.

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

Note: Use of the handle after this call is undefined behavior.

§Parameters

  • resource: Resource to unregister

§Return value

See also: cudaGraphicsD3D9RegisterResource, cudaGraphicsD3D10RegisterResource, cudaGraphicsD3D11RegisterResource, cudaGraphicsGLRegisterBuffer, cudaGraphicsGLRegisterImage, cuGraphicsUnregisterResource.