cuda.bindings._v2.driver.graphics_sub_resource_get_mapped_array#

cuda.bindings._v2.driver.graphics_sub_resource_get_mapped_array(
intptr_t resource,
unsigned int array_index,
unsigned int mip_level,
) → intptr_t#

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

Returns in *p_array an array through which the subresource of the mapped graphics resource resource which corresponds to array index array_index and mipmap level mip_level may be accessed. The value set in *p_array may change every time that resource is mapped. If resource is not a texture then it cannot be accessed via an array and CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned. If array_index is not a valid array index for resource then CUDA_ERROR_INVALID_VALUE is returned. If mip_level is not a valid mipmap level for resource then CUDA_ERROR_INVALID_VALUE is returned. If resource is not mapped then CUDA_ERROR_NOT_MAPPED is returned.

Parameters:
  • resource (intptr_t) – Mapped resource to access.

  • array_index (unsigned int) – Array index for array textures or cubemap face index as defined by CUarray_cubemap_face for cubemap textures for the subresource to access.

  • mip_level (unsigned int) – Mipmap level for the subresource to access.

Returns:

Returned array through which a subresource of

resource may be accessed.

Return type:

intptr_t

See also

cuGraphicsSubResourceGetMappedArray