Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 3771

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

.TH "Direct3D 9 Interoperability" 3 "24 Apr 2019" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Direct3D 9 Interoperability \- 
.SS "Modules"

.in +1c
.ti -1c
.RI "\fBDirect3D 9 Interoperability [DEPRECATED]\fP"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBCUd3d9DeviceList\fP { \fBCU_D3D9_DEVICE_LIST_ALL\fP =  0x01, \fBCU_D3D9_DEVICE_LIST_CURRENT_FRAME\fP =  0x02, \fBCU_D3D9_DEVICE_LIST_NEXT_FRAME\fP =  0x03 }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBCUresult\fP \fBcuD3D9CtxCreate\fP (\fBCUcontext\fP *pCtx, \fBCUdevice\fP *pCudaDevice, unsigned int Flags, IDirect3DDevice9 *pD3DDevice)"
.br
.RI "\fICreate a CUDA context for interoperability with Direct3D 9. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuD3D9CtxCreateOnDevice\fP (\fBCUcontext\fP *pCtx, unsigned int flags, IDirect3DDevice9 *pD3DDevice, \fBCUdevice\fP cudaDevice)"
.br
.RI "\fICreate a CUDA context for interoperability with Direct3D 9. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuD3D9GetDevice\fP (\fBCUdevice\fP *pCudaDevice, const char *pszAdapterName)"
.br
.RI "\fIGets the CUDA device corresponding to a display adapter. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuD3D9GetDevices\fP (unsigned int *pCudaDeviceCount, \fBCUdevice\fP *pCudaDevices, unsigned int cudaDeviceCount, IDirect3DDevice9 *pD3D9Device, \fBCUd3d9DeviceList\fP deviceList)"
.br
.RI "\fIGets the CUDA devices corresponding to a Direct3D 9 device. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuD3D9GetDirect3DDevice\fP (IDirect3DDevice9 **ppD3DDevice)"
.br
.RI "\fIGet the Direct3D 9 device against which the current CUDA context was created. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsD3D9RegisterResource\fP (\fBCUgraphicsResource\fP *pCudaResource, IDirect3DResource9 *pD3DResource, unsigned int Flags)"
.br
.RI "\fIRegister a Direct3D 9 resource for access by CUDA. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\\brief Direct3D 9 interoperability functions of the low-level CUDA driver API (\fBcudaD3D9.h\fP)
.PP
This section describes the Direct3D 9 interoperability functions of the low-level CUDA driver application programming interface. Note that mapping of Direct3D 9 resources is performed with the graphics API agnostic, resource mapping interface described in \fBGraphics Interoperability\fP. 
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBCUd3d9DeviceList\fP"
.PP
CUDA devices corresponding to a D3D9 device 
.PP
\fBEnumerator: \fP
.in +1c
.TP
\fB\fICU_D3D9_DEVICE_LIST_ALL \fP\fP
The CUDA devices for all GPUs used by a D3D9 device 
.TP
\fB\fICU_D3D9_DEVICE_LIST_CURRENT_FRAME \fP\fP
The CUDA devices for the GPUs used by a D3D9 device in its currently rendering frame 
.TP
\fB\fICU_D3D9_DEVICE_LIST_NEXT_FRAME \fP\fP
The CUDA devices for the GPUs to be used by a D3D9 device in the next frame 
.SH "Function Documentation"
.PP 
.SS "\fBCUresult\fP cuD3D9CtxCreate (\fBCUcontext\fP * pCtx, \fBCUdevice\fP * pCudaDevice, unsigned int Flags, IDirect3DDevice9 * pD3DDevice)"
.PP
Creates a new CUDA context, enables interoperability for that context with the Direct3D device \fCpD3DDevice\fP, and associates the created CUDA context with the calling thread. The created \fBCUcontext\fP will be returned in \fC*pCtx\fP. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. If \fCpCudaDevice\fP is non-NULL then the \fBCUdevice\fP on which this CUDA context was created will be returned in \fC*pCudaDevice\fP.
.PP
On success, this call will increase the internal reference count on \fCpD3DDevice\fP. This reference count will be decremented upon destruction of this context through \fBcuCtxDestroy()\fP. This context will cease to function if \fCpD3DDevice\fP is destroyed or encounters an error.
.PP
Note that this function is never required for correct functionality. Use of this function will result in accelerated interoperability only when the operating system is Windows Vista or Windows 7, and the device \fCpD3DDdevice\fP is not an IDirect3DDevice9Ex. In all other circumstances, this function is not necessary.
.PP
\fBParameters:\fP
.RS 4
\fIpCtx\fP - Returned newly created CUDA context 
.br
\fIpCudaDevice\fP - Returned pointer to the device on which the context was created 
.br
\fIFlags\fP - Context creation flags (see \fBcuCtxCreate()\fP for details) 
.br
\fIpD3DDevice\fP - Direct3D device to create interoperability context with
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_OUT_OF_MEMORY\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9GetDevice\fP, \fBcuGraphicsD3D9RegisterResource\fP 
.RE
.PP

.SS "\fBCUresult\fP cuD3D9CtxCreateOnDevice (\fBCUcontext\fP * pCtx, unsigned int flags, IDirect3DDevice9 * pD3DDevice, \fBCUdevice\fP cudaDevice)"
.PP
Creates a new CUDA context, enables interoperability for that context with the Direct3D device \fCpD3DDevice\fP, and associates the created CUDA context with the calling thread. The created \fBCUcontext\fP will be returned in \fC*pCtx\fP. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.
.PP
On success, this call will increase the internal reference count on \fCpD3DDevice\fP. This reference count will be decremented upon destruction of this context through \fBcuCtxDestroy()\fP. This context will cease to function if \fCpD3DDevice\fP is destroyed or encounters an error.
.PP
Note that this function is never required for correct functionality. Use of this function will result in accelerated interoperability only when the operating system is Windows Vista or Windows 7, and the device \fCpD3DDdevice\fP is not an IDirect3DDevice9Ex. In all other circumstances, this function is not necessary.
.PP
\fBParameters:\fP
.RS 4
\fIpCtx\fP - Returned newly created CUDA context 
.br
\fIflags\fP - Context creation flags (see \fBcuCtxCreate()\fP for details) 
.br
\fIpD3DDevice\fP - Direct3D device to create interoperability context with 
.br
\fIcudaDevice\fP - The CUDA device on which to create the context. This device must be among the devices returned when querying CU_D3D9_DEVICES_ALL from \fBcuD3D9GetDevices\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_OUT_OF_MEMORY\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9GetDevices\fP, \fBcuGraphicsD3D9RegisterResource\fP 
.RE
.PP

.SS "\fBCUresult\fP cuD3D9GetDevice (\fBCUdevice\fP * pCudaDevice, const char * pszAdapterName)"
.PP
Returns in \fC*pCudaDevice\fP the CUDA-compatible device corresponding to the adapter name \fCpszAdapterName\fP obtained from EnumDisplayDevices() or IDirect3D9::GetAdapterIdentifier().
.PP
If no device on the adapter with name \fCpszAdapterName\fP is CUDA-compatible, then the call will fail.
.PP
\fBParameters:\fP
.RS 4
\fIpCudaDevice\fP - Returned CUDA device corresponding to pszAdapterName 
.br
\fIpszAdapterName\fP - Adapter name to query for device
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_NOT_FOUND\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9CtxCreate\fP, cudaD3D9GetDevice 
.RE
.PP

.SS "\fBCUresult\fP cuD3D9GetDevices (unsigned int * pCudaDeviceCount, \fBCUdevice\fP * pCudaDevices, unsigned int cudaDeviceCount, IDirect3DDevice9 * pD3D9Device, \fBCUd3d9DeviceList\fP deviceList)"
.PP
Returns in \fC*pCudaDeviceCount\fP the number of CUDA-compatible device corresponding to the Direct3D 9 device \fCpD3D9Device\fP. Also returns in \fC*pCudaDevices\fP at most \fCcudaDeviceCount\fP of the CUDA-compatible devices corresponding to the Direct3D 9 device \fCpD3D9Device\fP.
.PP
If any of the GPUs being used to render \fCpDevice\fP are not CUDA capable then the call will return \fBCUDA_ERROR_NO_DEVICE\fP.
.PP
\fBParameters:\fP
.RS 4
\fIpCudaDeviceCount\fP - Returned number of CUDA devices corresponding to \fCpD3D9Device\fP 
.br
\fIpCudaDevices\fP - Returned CUDA devices corresponding to \fCpD3D9Device\fP 
.br
\fIcudaDeviceCount\fP - The size of the output device array \fCpCudaDevices\fP 
.br
\fIpD3D9Device\fP - Direct3D 9 device to query for CUDA devices 
.br
\fIdeviceList\fP - The set of devices to return. This set may be \fBCU_D3D9_DEVICE_LIST_ALL\fP for all devices, \fBCU_D3D9_DEVICE_LIST_CURRENT_FRAME\fP for the devices used to render the current frame (in SLI), or \fBCU_D3D9_DEVICE_LIST_NEXT_FRAME\fP for the devices used to render the next frame (in SLI).
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_NO_DEVICE\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_NOT_FOUND\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9CtxCreate\fP, cudaD3D9GetDevices 
.RE
.PP

.SS "\fBCUresult\fP cuD3D9GetDirect3DDevice (IDirect3DDevice9 ** ppD3DDevice)"
.PP
Returns in \fC*ppD3DDevice\fP the Direct3D device against which this CUDA context was created in \fBcuD3D9CtxCreate()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIppD3DDevice\fP - Returned Direct3D device corresponding to CUDA context
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP \fBCUDA_ERROR_INVALID_GRAPHICS_CONTEXT\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9GetDevice\fP, cudaD3D9GetDirect3DDevice 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsD3D9RegisterResource (\fBCUgraphicsResource\fP * pCudaResource, IDirect3DResource9 * pD3DResource, unsigned int Flags)"
.PP
Registers the Direct3D 9 resource \fCpD3DResource\fP for access by CUDA and returns a CUDA handle to \fCpD3Dresource\fP in \fCpCudaResource\fP. The handle returned in \fCpCudaResource\fP may be used to map and unmap this resource until it is unregistered. On success this call will increase the internal reference count on \fCpD3DResource\fP. This reference count will be decremented when this resource is unregistered through \fBcuGraphicsUnregisterResource()\fP.
.PP
This call is potentially high-overhead and should not be called every frame in interactive applications.
.PP
The type of \fCpD3DResource\fP must be one of the following.
.IP "\(bu" 2
IDirect3DVertexBuffer9: may be accessed through a device pointer
.IP "\(bu" 2
IDirect3DIndexBuffer9: may be accessed through a device pointer
.IP "\(bu" 2
IDirect3DSurface9: may be accessed through an array. Only stand-alone objects of type IDirect3DSurface9 may be explicitly shared. In particular, individual mipmap levels and faces of cube maps may not be registered directly. To access individual surfaces associated with a texture, one must register the base texture object.
.IP "\(bu" 2
IDirect3DBaseTexture9: individual surfaces on this texture may be accessed through an array.
.PP
.PP
The \fCFlags\fP argument may be used to specify additional parameters at register time. The valid values for this parameter are
.IP "\(bu" 2
CU_GRAPHICS_REGISTER_FLAGS_NONE: Specifies no hints about how this resource will be used.
.IP "\(bu" 2
CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: Specifies that CUDA will bind this resource to a surface reference.
.IP "\(bu" 2
CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: Specifies that CUDA will perform texture gather operations on this resource.
.PP
.PP
Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.
.IP "\(bu" 2
The primary rendertarget may not be registered with CUDA.
.IP "\(bu" 2
Resources allocated as shared may not be registered with CUDA.
.IP "\(bu" 2
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.
.IP "\(bu" 2
Surfaces of depth or stencil formats cannot be shared.
.PP
.PP
A complete list of supported formats is as follows:
.IP "\(bu" 2
D3DFMT_L8
.IP "\(bu" 2
D3DFMT_L16
.IP "\(bu" 2
D3DFMT_A8R8G8B8
.IP "\(bu" 2
D3DFMT_X8R8G8B8
.IP "\(bu" 2
D3DFMT_G16R16
.IP "\(bu" 2
D3DFMT_A8B8G8R8
.IP "\(bu" 2
D3DFMT_A8
.IP "\(bu" 2
D3DFMT_A8L8
.IP "\(bu" 2
D3DFMT_Q8W8V8U8
.IP "\(bu" 2
D3DFMT_V16U16
.IP "\(bu" 2
D3DFMT_A16B16G16R16F
.IP "\(bu" 2
D3DFMT_A16B16G16R16
.IP "\(bu" 2
D3DFMT_R32F
.IP "\(bu" 2
D3DFMT_G16R16F
.IP "\(bu" 2
D3DFMT_A32B32G32R32F
.IP "\(bu" 2
D3DFMT_G32R32F
.IP "\(bu" 2
D3DFMT_R16F
.PP
.PP
If Direct3D interoperability is not initialized for this context using \fBcuD3D9CtxCreate\fP then \fBCUDA_ERROR_INVALID_CONTEXT\fP is returned. If \fCpD3DResource\fP is of incorrect type or is already registered then \fBCUDA_ERROR_INVALID_HANDLE\fP is returned. If \fCpD3DResource\fP cannot be registered then \fBCUDA_ERROR_UNKNOWN\fP is returned. If \fCFlags\fP is not one of the above specified value then \fBCUDA_ERROR_INVALID_VALUE\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIpCudaResource\fP - Returned graphics resource handle 
.br
\fIpD3DResource\fP - Direct3D resource to register 
.br
\fIFlags\fP - Parameters for resource registration
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_OUT_OF_MEMORY\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuD3D9CtxCreate\fP, \fBcuGraphicsUnregisterResource\fP, \fBcuGraphicsMapResources\fP, \fBcuGraphicsSubResourceGetMappedArray\fP, \fBcuGraphicsResourceGetMappedPointer\fP, cudaGraphicsD3D9RegisterResource 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen from the source code.