- This function is deprecated as of Cuda 3.0.
Registers the Direct3D resource
for access by CUDA.
If this call is successful, then the application will be able to map and unmap this resource until it is unregistered through cudaD3D10UnregisterResource(). Also on success, this call will increase the internal reference count on
pResource. This reference count will be decremented when this resource is unregistered through cudaD3D10UnregisterResource().
This call is potentially high-overhead and should not be called every frame in interactive applications.
The type of
pResource must be one of the following:
- ID3D10Buffer: Cannot be used with
flags set to
- ID3D10Texture1D: No restrictions.
- ID3D10Texture2D: No restrictions.
- ID3D10Texture3D: No restrictions.
flags argument specifies the mechanism through which CUDA will access the Direct3D resource. The following values are allowed.
Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.
- The primary rendertarget may not be registered with CUDA.
- Resources allocated as shared may not be registered with CUDA.
- Textures which are not of a format which is 1, 2, or 4 channels of 8, 16, or 32-bit integer or floating-point data cannot be shared.
- Surfaces of depth or stencil formats cannot be shared.
If Direct3D interoperability is not initialized on this context then cudaErrorInvalidDevice is returned. If
pResource is of incorrect type or is already registered then cudaErrorInvalidResourceHandle is returned. If
pResource cannot be registered then cudaErrorUnknown is returned.
|pResource ||- Resource to register |
|flags ||- Parameters for resource registration|
- cudaSuccess, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
- Note that this function may also return error codes from previous, asynchronous launches.
- See also: