Linux repositories inspector

CUDART_D3D10(3)

version 6.0
8 Feb 2019
Aliases: cudaD3D10DeviceList(3), cudaD3D10DeviceList(3), cudaD3D10DeviceListAll(3), cudaD3D10DeviceListAll(3), cudaD3D10DeviceListCurrentFrame(3), cudaD3D10DeviceListCurrentFrame(3), cudaD3D10DeviceListNextFrame(3), cudaD3D10DeviceListNextFrame(3), cudaD3D10GetDevice(3), cudaD3D10GetDevice(3), cudaD3D10GetDevices(3), cudaD3D10GetDevices(3), cudaGraphicsD3D10RegisterResource(3), cudaGraphicsD3D10RegisterResource(3)

nvidia-cuda-dev

NVIDIA CUDA development files

cuda

NVIDIA's GPU programming toolkit

NAME

Direct3D 10 Interoperability -

Enumerations

enum cudaD3D10DeviceList { cudaD3D10DeviceListAll = 1, cudaD3D10DeviceListCurrentFrame = 2, cudaD3D10DeviceListNextFrame = 3 }

Functions

cudaError_t cudaD3D10GetDevice (int *device, IDXGIAdapter *pAdapter)
Gets the device number for an adapter. cudaError_t cudaD3D10GetDevices (unsigned int *pCudaDeviceCount, int *pCudaDevices, unsigned int cudaDeviceCount, ID3D10Device *pD3D10Device, enum cudaD3D10DeviceList deviceList)
Gets the CUDA devices corresponding to a Direct3D 10 device. cudaError_t cudaGraphicsD3D10RegisterResource (struct cudaGraphicsResource **resource, ID3D10Resource *pD3DResource, unsigned int flags)
Registers a Direct3D 10 resource for access by CUDA.

Detailed Description

This section describes the Direct3D 10 interoperability functions of the CUDA runtime application programming interface. Note that mapping of Direct3D 10 resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interopability.

Enumeration Type Documentation

enum cudaD3D10DeviceList

CUDA devices corresponding to a D3D10 device
Enumerator:
cudaD3D10DeviceListAll
The CUDA devices for all GPUs used by a D3D10 device
cudaD3D10DeviceListCurrentFrame
The CUDA devices for the GPUs used by a D3D10 device in its currently rendering frame
cudaD3D10DeviceListNextFrame
The CUDA devices for the GPUs to be used by a D3D10 device in the next frame

Function Documentation

cudaError_t cudaD3D10GetDevice (int * device, IDXGIAdapter * pAdapter)

Returns in *device the CUDA-compatible device corresponding to the adapter pAdapter obtained from IDXGIFactory::EnumAdapters. This call will succeed only if a device on adapter pAdapter is CUDA-compatible.
Parameters:
device - Returns the device corresponding to pAdapter
pAdapter - D3D10 adapter to get device for
Returns:
cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaGraphicsD3D10RegisterResource, cuD3D10GetDevice

cudaError_t cudaD3D10GetDevices (unsigned int * pCudaDeviceCount, int * pCudaDevices, unsigned int cudaDeviceCount, ID3D10Device * pD3D10Device, enum cudaD3D10DeviceList deviceList)

Returns in *pCudaDeviceCount the number of CUDA-compatible devices corresponding to the Direct3D 10 device pD3D10Device. Also returns in *pCudaDevices at most cudaDeviceCount of the 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 cudaErrorNoDevice.
Parameters:
pCudaDeviceCount - Returned number of CUDA devices corresponding to pD3D10Device
pCudaDevices - Returned CUDA devices corresponding to pD3D10Device
cudaDeviceCount - The size of the output device array pCudaDevices
pD3D10Device - Direct3D 10 device to query for CUDA devices
deviceList - The set of devices to return. This set may be cudaD3D10DeviceListAll for all devices, cudaD3D10DeviceListCurrentFrame for the devices used to render the current frame (in SLI), or cudaD3D10DeviceListNextFrame for the devices used to render the next frame (in SLI).
Returns:
cudaSuccess, cudaErrorNoDevice, cudaErrorUnknown
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaGraphicsUnregisterResource, cudaGraphicsMapResources, cudaGraphicsSubResourceGetMappedArray, cudaGraphicsResourceGetMappedPointer, cuD3D10GetDevices

cudaError_t cudaGraphicsD3D10RegisterResource (struct cudaGraphicsResource ** resource, ID3D10Resource * pD3DResource, unsigned int flags)

Registers the Direct3D 10 resource pD3DResource 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 cudaGraphicsUnregisterResource(). Also on success, this call will increase the internal reference count on pD3DResource. This reference count will be decremented when this resource is unregistered through cudaGraphicsUnregisterResource().
This call potentially has a high-overhead and should not be called every frame in interactive applications.
The type of pD3DResource must be one of the following.
o ID3D10Buffer: may be accessed via a device pointer
o ID3D10Texture1D: individual subresources of the texture may be accessed via arrays
o ID3D10Texture2D: individual subresources of the texture may be accessed via arrays
o ID3D10Texture3D: individual subresources of the texture may be accessed via arrays
The flags argument may be used to specify additional parameters at register time. The valid values for this parameter are
o cudaGraphicsRegisterFlagsNone: Specifies no hints about how this resource will be used.
o cudaGraphicsRegisterFlagsSurfaceLoadStore: Specifies that CUDA will bind this resource to a surface reference.
o cudaGraphicsRegisterFlagsTextureGather: Specifies that CUDA will perform texture gather operations on this resource.
Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.
o The primary rendertarget may not be registered with CUDA.
o 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.
o Surfaces of depth or stencil formats cannot be shared.
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.
o DXGI_FORMAT_A8_UNORM
o DXGI_FORMAT_B8G8R8A8_UNORM
o DXGI_FORMAT_B8G8R8X8_UNORM
o DXGI_FORMAT_R16_FLOAT
o DXGI_FORMAT_R16G16B16A16_{FLOAT,SINT,SNORM,UINT,UNORM}
o DXGI_FORMAT_R16G16_{FLOAT,SINT,SNORM,UINT,UNORM}
o DXGI_FORMAT_R16_{SINT,SNORM,UINT,UNORM}
o DXGI_FORMAT_R32_FLOAT
o DXGI_FORMAT_R32G32B32A32_{FLOAT,SINT,UINT}
o DXGI_FORMAT_R32G32_{FLOAT,SINT,UINT}
o DXGI_FORMAT_R32_{SINT,UINT}
o DXGI_FORMAT_R8G8B8A8_{SINT,SNORM,UINT,UNORM,UNORM_SRGB}
o DXGI_FORMAT_R8G8_{SINT,SNORM,UINT,UNORM}
o DXGI_FORMAT_R8_{SINT,SNORM,UINT,UNORM}
If pD3DResource is of incorrect type or is already registered, then cudaErrorInvalidResourceHandle is returned. If pD3DResource cannot be registered, then cudaErrorUnknown is returned.
Parameters:
resource - Pointer to returned resource handle
pD3DResource - Direct3D resource to register
flags - Parameters for resource registration
Returns:
cudaSuccess, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cudaGraphicsUnregisterResource, cudaGraphicsMapResources, cudaGraphicsSubResourceGetMappedArray, cudaGraphicsResourceGetMappedPointer, cuGraphicsD3D10RegisterResource

Author

Generated automatically by Doxygen from the source code.
⇧ Top