Returns in *array
an array through which the subresource of the mapped graphics resource resource
which corresponds to array index arrayIndex
and mipmap level mipLevel
may be accessed. The value set in array
may change every time that resource
is mapped.
If resource
is not a texture then it cannot be accessed via an array and cudaErrorUnknown is returned. If arrayIndex
is not a valid array index for resource
then cudaErrorInvalidValue is returned. If mipLevel
is not a valid mipmap level for resource
then cudaErrorInvalidValue is returned. If resource
is not mapped then cudaErrorUnknown is returned.
- Parameters:
-
| array | - Returned array through which a subresource of resource may be accessed |
| resource | - Mapped resource to access |
| arrayIndex | - Array index for array textures or cubemap face index as defined by cudaGraphicsCubeFace for cubemap textures for the subresource to access |
| mipLevel | - Mipmap level for the subresource to access |
- Returns:
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaGraphicsResourceGetMappedPointer