Direct3D 10 Interoperability [DEPRECATED]
- Provided by: nvidia-cuda-dev (Version: 10.1.243-3)
- Source: nvidia-cuda-toolkit
- Report a bug
__CUDA_DEPRECATED CUresult cuD3D10CtxCreate
(CUcontext *pCtx, CUdevice *pCudaDevice, unsigned int Flags,
ID3D10Device *pD3DDevice)
Create a CUDA context for interoperability with Direct3D 10.
__CUDA_DEPRECATED CUresult cuD3D10CtxCreateOnDevice
(CUcontext *pCtx, unsigned int flags, ID3D10Device *pD3DDevice,
CUdevice cudaDevice)
Create a CUDA context for interoperability with Direct3D 10.
__CUDA_DEPRECATED CUresult cuD3D10GetDirect3DDevice
(ID3D10Device **ppD3DDevice)
Get the Direct3D 10 device against which the current CUDA context was
created. __CUDA_DEPRECATED CUresult cuD3D10MapResources
(unsigned int count, ID3D10Resource **ppResources)
Map Direct3D resources for access by CUDA. __CUDA_DEPRECATED
CUresult cuD3D10RegisterResource (ID3D10Resource *pResource,
unsigned int Flags)
Register a Direct3D resource for access by CUDA. __CUDA_DEPRECATED
CUresult cuD3D10ResourceGetMappedArray (CUarray
*pArray, ID3D10Resource *pResource, unsigned int SubResource)
Get an array through which to access a subresource of a Direct3D resource
which has been mapped for access by CUDA. __CUDA_DEPRECATED
CUresult cuD3D10ResourceGetMappedPitch (size_t *pPitch, size_t
*pPitchSlice, ID3D10Resource *pResource, unsigned int SubResource)
Get the pitch of a subresource of a Direct3D resource which has been mapped
for access by CUDA. __CUDA_DEPRECATED CUresult
cuD3D10ResourceGetMappedPointer (CUdeviceptr *pDevPtr,
ID3D10Resource *pResource, unsigned int SubResource)
Get a pointer through which to access a subresource of a Direct3D resource
which has been mapped for access by CUDA. __CUDA_DEPRECATED
CUresult cuD3D10ResourceGetMappedSize (size_t *pSize,
ID3D10Resource *pResource, unsigned int SubResource)
Get the size of a subresource of a Direct3D resource which has been mapped
for access by CUDA. __CUDA_DEPRECATED CUresult
cuD3D10ResourceGetSurfaceDimensions (size_t *pWidth, size_t *pHeight,
size_t *pDepth, ID3D10Resource *pResource, unsigned int SubResource)
Get the dimensions of a registered surface. __CUDA_DEPRECATED
CUresult cuD3D10ResourceSetMapFlags (ID3D10Resource
*pResource, unsigned int Flags)
Set usage flags for mapping a Direct3D resource. __CUDA_DEPRECATED
CUresult cuD3D10UnmapResources (unsigned int count,
ID3D10Resource **ppResources)
Unmap Direct3D resources. __CUDA_DEPRECATED CUresult
cuD3D10UnregisterResource (ID3D10Resource *pResource)
Unregister a Direct3D resource.
\brief deprecated Direct3D 10 interoperability functions of the low-level CUDA driver API (cudaD3D10.h)
This section describes deprecated Direct3D 10 interoperability functionality.
Flags to map or unmap a resource
Flags to register a resource
Deprecated
This function is deprecated and should no longer be used. It is no longer necessary to associate a CUDA context with a D3D10 device in order to achieve maximum interoperability performance.
Parameters:
Returns:
Note:
See also:
Deprecated
This function is deprecated and should no longer be used. It is no longer necessary to associate a CUDA context with a D3D10 device in order to achieve maximum interoperability performance.
Parameters:
Returns:
Note:
See also:
Deprecated
This function is deprecated and should no longer be used. It is no longer necessary to associate a CUDA context with a D3D10 device in order to achieve maximum interoperability performance.
Parameters:
Returns:
Note:
See also:
Deprecated
Maps the count Direct3D resources in ppResources for access by CUDA.
The resources in ppResources may be accessed in CUDA kernels until they are unmapped. Direct3D should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.
This function provides the synchronization guarantee that any Direct3D calls issued before cuD3D10MapResources() will complete before any CUDA kernels issued after cuD3D10MapResources() begin.
If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries, then CUDA_ERROR_INVALID_HANDLE is returned. If any of ppResources are presently mapped for access by CUDA, then CUDA_ERROR_ALREADY_MAPPED is returned.
Parameters:
Returns:
Note:
See also:
Deprecated
Registers the Direct3D resource pResource 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 cuD3D10UnregisterResource(). 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 cuD3D10UnregisterResource().
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.
The 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.
If Direct3D interoperability is not initialized on this context then CUDA_ERROR_INVALID_CONTEXT is returned. If pResource is of incorrect type or is already registered, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource cannot be registered, then CUDA_ERROR_UNKNOWN is returned.
Parameters:
Returns:
Note:
See also:
Deprecated
Returns in *pArray an array through which the subresource of the mapped Direct3D resource pResource, which corresponds to SubResource may be accessed. The value set in pArray may change every time that pResource is mapped.
If pResource is not registered, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_ARRAY, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is not mapped, then CUDA_ERROR_NOT_MAPPED is returned.
For usage requirements of the SubResource parameter, see cuD3D10ResourceGetMappedPointer().
Parameters:
Returns:
Note:
See also:
Deprecated
Returns in *pPitch and *pPitchSlice the pitch and Z-slice pitch of the subresource of the mapped Direct3D resource pResource, which corresponds to SubResource. The values set in pPitch and pPitchSlice may change every time that pResource is mapped.
The pitch and Z-slice pitch values may be used to compute the location of a sample on a surface as follows.
For a 2D surface, the byte offset of the sample at position x, y from the base pointer of the surface is:
y * pitch + (bytes per pixel) * x
For a 3D surface, the byte offset of the sample at position x, y, z from the base pointer of the surface is:
z* slicePitch + y * pitch + (bytes per pixel) * x
Both parameters pPitch and pPitchSlice are optional and may be set to NULL.
If pResource is not of type IDirect3DBaseTexture10 or one of its sub-types or if pResource has not been registered for use with CUDA, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is not mapped for access by CUDA, then CUDA_ERROR_NOT_MAPPED is returned.
For usage requirements of the SubResource parameter, see cuD3D10ResourceGetMappedPointer().
Parameters:
Returns:
Note:
See also:
Deprecated
Returns in *pDevPtr the base pointer of the subresource of the mapped Direct3D resource pResource, which corresponds to SubResource. The value set in pDevPtr may change every time that pResource is mapped.
If pResource is not registered, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is not mapped, then CUDA_ERROR_NOT_MAPPED is returned.
If pResource is of type ID3D10Buffer, then SubResource must be 0. If pResource is of any other type, then the value of SubResource must come from the subresource calculation in D3D10CalcSubResource().
Parameters:
Returns:
Note:
See also:
Deprecated
Returns in *pSize the size of the subresource of the mapped Direct3D resource pResource, which corresponds to SubResource. The value set in pSize may change every time that pResource is mapped.
If pResource has not been registered for use with CUDA, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource was not registered with usage flags CU_D3D10_REGISTER_FLAGS_NONE, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is not mapped for access by CUDA, then CUDA_ERROR_NOT_MAPPED is returned.
For usage requirements of the SubResource parameter, see cuD3D10ResourceGetMappedPointer().
Parameters:
Returns:
Note:
See also:
Deprecated
Returns in *pWidth, *pHeight, and *pDepth the dimensions of the subresource of the mapped Direct3D resource pResource, which corresponds to SubResource.
Because anti-aliased surfaces may have multiple samples per pixel, it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime.
The parameters pWidth, pHeight, and pDepth are optional. For 2D surfaces, the value returned in *pDepth will be 0.
If pResource is not of type IDirect3DBaseTexture10 or IDirect3DSurface10 or if pResource has not been registered for use with CUDA, then CUDA_ERROR_INVALID_HANDLE is returned.
For usage requirements of the SubResource parameter, see cuD3D10ResourceGetMappedPointer().
Parameters:
Returns:
Note:
See also:
Deprecated
Set flags for mapping the Direct3D resource pResource.
Changes to flags will take effect the next time pResource is mapped. The Flags argument may be any of the following.
If pResource has not been registered for use with CUDA, then CUDA_ERROR_INVALID_HANDLE is returned. If pResource is presently mapped for access by CUDA then CUDA_ERROR_ALREADY_MAPPED is returned.
Parameters:
Returns:
Note:
See also:
Deprecated
Unmaps the count Direct3D resources in ppResources.
This function provides the synchronization guarantee that any CUDA kernels issued before cuD3D10UnmapResources() will complete before any Direct3D calls issued after cuD3D10UnmapResources() begin.
If any of ppResources have not been registered for use with CUDA or if ppResources contains any duplicate entries, then CUDA_ERROR_INVALID_HANDLE is returned. If any of ppResources are not presently mapped for access by CUDA, then CUDA_ERROR_NOT_MAPPED is returned.
Parameters:
Returns:
Note:
See also:
Deprecated
Unregisters the Direct3D resource pResource so it is not accessible by CUDA unless registered again.
If pResource is not registered, then CUDA_ERROR_INVALID_HANDLE is returned.
Parameters:
Returns:
Note:
See also:
Generated automatically by Doxygen from the source code.