12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.10 Direct3D 9 Interoperability 61If pResource has not been registered for use with <strong>CUDA</strong> then cudaErrorInvalidResourceHandle is returned. IfpResource was not registered with usage flags cudaD3D9RegisterFlagsNone, then cudaErrorInvalidResourceHandleis returned. If pResource is not mapped for access by <strong>CUDA</strong> then cudaErrorUnknown is returned.For usage requirements of face and level parameters, see cudaD3D9ResourceGetMappedPointer().Parameters:pSize - Returned size of subresourcepResource - Mapped resource to accessface - Face of resource to accesslevel - Level of resource to accessReturns:Note:See also:cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknownNote that this function may also return error codes from previous, asynchronous launches.cudaD3D9GetDevice, cudaD3D9SetDirect3DDevice, cudaD3D9GetDirect3DDevice, cudaD3D9RegisterResource,cudaD3D9UnregisterResource, cudaD3D9MapResources, cudaD3D9UnmapResources,cudaD3D9ResourceGetSurfaceDimensions, cudaD3D9ResourceSetMapFlags,cudaD3D9ResourceGetMappedArray, cudaD3D9ResourceGetMappedPointer, cudaD3D9ResourceGetMappedPitch3.10.3.9 cudaError_t cudaD3D9ResourceGetSurfaceDimensions (size_t ∗ pWidth, size_t ∗ pHeight, size_t ∗pDepth, IDirect3DResource9 ∗ pResource, unsigned int face, unsigned int level)Returns in ∗pWidth, ∗pHeight, and ∗pDepth the dimensions of the subresource of the mapped Direct3D resourcepResource which corresponds to face and level.Because anti-aliased surfaces may have multiple samples per pixel, it is possible that the dimensions of a resource willbe 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 willbe 0.If pResource is not of type IDirect3DBaseTexture9 or IDirect3DSurface9 or if pResource has not been registeredfor use with <strong>CUDA</strong>, then cudaErrorInvalidResourceHandle is returned.For usage requirements of face and level parameters, see cudaD3D9ResourceGetMappedPointer.Parameters:pWidth - Returned width of surfacepHeight - Returned height of surfacepDepth - Returned depth of surfacepResource - Registered resource to accessface - Face of resource to accesslevel - Level of resource to accessGenerated on Wed Apr 1 16:11:42 2009 for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!