|
|
Creates a new CUDA context, enables interoperability for that context with the Direct3D device pD3DDevice, and associates the created CUDA context with the calling thread. The created CUcontext will be returned in *pCtx. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.
On success, this call will increase the internal reference count on pD3DDevice. This reference count will be decremented upon destruction of this context through cuCtxDestroy(). This context will cease to function if pD3DDevice is destroyed or encounters an error.
- Parameters:
-
| pCtx | - Returned newly created CUDA context |
| flags | - Context creation flags (see cuCtxCreate() for details) |
| pD3DDevice | - Direct3D device to create interoperability context with |
| cudaDevice | - The CUDA device on which to create the context. This device must be among the devices returned when querying CU_D3D10_DEVICES_ALL from cuD3D10GetDevices. |
- Returns:
- CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_UNKNOWN
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cuD3D10GetDevices, cuGraphicsD3D10RegisterResource
|