Direct3D 10 Interoperability
- Provided by: nvidia-cuda-dev (Version: 7.5.18-0ubuntu1)
- Source: nvidia-cuda-toolkit
- Report a bug
enum CUd3d10DeviceList { CU_D3D10_DEVICE_LIST_ALL =
0x01, CU_D3D10_DEVICE_LIST_CURRENT_FRAME = 0x02,
CU_D3D10_DEVICE_LIST_NEXT_FRAME = 0x03 }
CUresult cuD3D10GetDevice (CUdevice
*pCudaDevice, IDXGIAdapter *pAdapter)
Gets the CUDA device corresponding to a display adapter.
CUresult cuD3D10GetDevices (unsigned int *pCudaDeviceCount,
CUdevice *pCudaDevices, unsigned int cudaDeviceCount, ID3D10Device
*pD3D10Device, CUd3d10DeviceList deviceList)
Gets the CUDA devices corresponding to a Direct3D 10 device.
CUresult cuGraphicsD3D10RegisterResource
(CUgraphicsResource *pCudaResource, ID3D10Resource *pD3DResource,
unsigned int Flags)
Register a Direct3D 10 resource for access by CUDA.
\brief Direct3D 10 interoperability functions of the low-level CUDA driver API (cudaD3D10.h)
This section describes the Direct3D 10 interoperability functions of the low-level CUDA driver application programming interface. Note that mapping of Direct3D 10 resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interoperability.
CUDA devices corresponding to a D3D10 device
Enumerator:
Returns in *pCudaDevice the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters.
If no device on pAdapter is CUDA-compatible then the call will fail.
Parameters:
Returns:
Note:
See also:
Returns in *pCudaDeviceCount the number of CUDA-compatible device corresponding to the Direct3D 10 device pD3D10Device. Also returns in *pCudaDevices at most cudaDeviceCount of the CUDA-compatible devices corresponding to the Direct3D 10 device pD3D10Device.
If any of the GPUs being used to render pDevice are not CUDA capable then the call will return CUDA_ERROR_NO_DEVICE.
Parameters:
Returns:
Note:
See also:
Registers the Direct3D 10 resource pD3DResource for access by CUDA and returns a CUDA handle to pD3Dresource in pCudaResource. The handle returned in pCudaResource may be used to map and unmap this resource until it is unregistered. On success this call will increase the internal reference count on pD3DResource. This reference count will be decremented when this resource is unregistered through cuGraphicsUnregisterResource().
This call is potentially high-overhead and should not be called every frame in interactive applications.
The type of pD3DResource must be one of the following.
The Flags argument may be used to specify additional parameters at register time. The valid values for this parameter are
Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.
A complete list of supported DXGI formats is as follows. For compactness the notation A_{B,C,D} represents A_B, A_C, and A_D.
If pD3DResource is of incorrect type or is already registered then CUDA_ERROR_INVALID_HANDLE is returned. If pD3DResource cannot be registered then CUDA_ERROR_UNKNOWN is returned. If Flags is not one of the above specified value then CUDA_ERROR_INVALID_VALUE is returned.
Parameters:
Returns:
Note:
See also:
Generated automatically by Doxygen from the source code.