Function cuGraphicsSubResourceGetMappedArray

Source
pub unsafe extern "C" fn cuGraphicsSubResourceGetMappedArray(
    pArray: *mut CUarray,
    resource: CUgraphicsResource,
    arrayIndex: c_uint,
    mipLevel: c_uint,
) -> CUresult
Expand description

\brief Get an array through which to access a subresource of a mapped graphics resource.

Returns in \p *pArray an array through which the subresource of the mapped graphics resource \p resource which corresponds to array index \p arrayIndex and mipmap level \p mipLevel may be accessed. The value set in \p *pArray may change every time that \p resource is mapped.

If \p resource is not a texture then it cannot be accessed via an array and ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned. If \p arrayIndex is not a valid array index for \p resource then ::CUDA_ERROR_INVALID_VALUE is returned. If \p mipLevel is not a valid mipmap level for \p resource then ::CUDA_ERROR_INVALID_VALUE is returned. If \p resource is not mapped then ::CUDA_ERROR_NOT_MAPPED is returned.

\param pArray - Returned array through which a subresource of \p resource may be accessed \param resource - Mapped resource to access \param arrayIndex - Array index for array textures or cubemap face index as defined by ::CUarray_cubemap_face for cubemap textures for the subresource to access \param mipLevel - Mipmap level for the subresource to access

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_NOT_MAPPED, ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY \notefnerr

\sa ::cuGraphicsResourceGetMappedPointer, ::cudaGraphicsSubResourceGetMappedArray