11.01.2014 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

228 Module Documentation<br />

Not all Direct3D resources of the above types may be used for interoperability with <strong>CUDA</strong>. The following are some<br />

limitations.<br />

• The primary rendertarget may not be registered with <strong>CUDA</strong>.<br />

• Resources allocated as shared may not be registered with <strong>CUDA</strong>.<br />

• 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<br />

cannot be shared.<br />

• Surfaces of depth or stencil formats cannot be shared.<br />

If Direct3D interoperability is not initialized for this context using cuD3D11CtxCreate then <strong>CUDA</strong>_ERROR_-<br />

INVALID_CONTEXT is returned. If pD3DResource is of incorrect type or is already registered then <strong>CUDA</strong>_-<br />

ERROR_INVALID_HANDLE is returned. If pD3DResource cannot be registered then <strong>CUDA</strong>_ERROR_-<br />

UNKNOWN is returned. If Flags is not one of the above specified value then <strong>CUDA</strong>_ERROR_INVALID_VALUE<br />

is returned.<br />

Parameters:<br />

pCudaResource - Returned graphics resource handle<br />

pD3DResource - Direct3D resource to register<br />

Flags - Parameters for resource registration<br />

Returns:<br />

Note:<br />

<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-<br />

ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_INVALID_HANDLE,<br />

<strong>CUDA</strong>_ERROR_OUT_OF_MEMORY, <strong>CUDA</strong>_ERROR_UNKNOWN<br />

See also:<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cuD3D11CtxCreate, cuGraphicsUnregisterResource, cuGraphicsMapResources, cuGraphicsSubResourceGetMappedArray,<br />

cuGraphicsResourceGetMappedPointer<br />

Generated for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!