Graphics interoperability#
- 
hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t *resources, hipStream_t stream)#
- Maps a graphics resource for access. - Parameters:
- count – [in] - Number of resources to map. 
- resources – [in] - Pointer of resources to map. 
- stream – [in] - Stream for synchronization. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue, hipErrorUnknown, hipErrorInvalidResourceHandle 
 
- 
hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t *array, hipGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel)#
- Get an array through which to access a subresource of a mapped graphics resource. - Note - In this API, the value of arrayIndex higher than zero is currently not supported. - Parameters:
- array – [out] - Pointer of array through which a subresource of resource may be accessed. 
- resource – [in] - Mapped resource to access. 
- arrayIndex – [in] - Array index for the subresource to access. 
- mipLevel – [in] - Mipmap level for the subresource to access. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphicsResourceGetMappedPointer(void **devPtr, size_t *size, hipGraphicsResource_t resource)#
- Gets device accessible address of a graphics resource. - Parameters:
- devPtr – [out] - Pointer of device through which graphic resource may be accessed. 
- size – [out] - Size of the buffer accessible from devPtr. 
- resource – [in] - Mapped resource to access. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t *resources, hipStream_t stream)#
- Unmaps graphics resources. - Parameters:
- count – [in] - Number of resources to unmap. 
- resources – [in] - Pointer of resources to unmap. 
- stream – [in] - Stream for synchronization. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue, hipErrorUnknown, hipErrorContextIsDestroyed 
 
- 
hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource)#
- Unregisters a graphics resource. - Parameters:
- resource – [in] - Graphics resources to unregister. 
- Returns:
- hipSuccess