diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h index 30f12bc329..22b2086f15 100644 --- a/include/hip/hip_runtime_api.h +++ b/include/hip/hip_runtime_api.h @@ -4335,7 +4335,41 @@ static inline hipError_t hipUnbindTexture( { return hipUnbindTexture(&tex); } + + #endif // __cplusplus + +/** + *------------------------------------------------------------------------------------------------- + *------------------------------------------------------------------------------------------------- + * @defgroup GL Interop + * @{ + * This section describes Stream Memory Wait and Write functions of HIP runtime API. + */ +typedef unsigned int GLuint; + +// Queries devices associated with GL Context. +hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, + unsigned int hipDeviceCount, hipGLDeviceList deviceList); +// Registers a GL Buffer for interop and returns corresponding graphics resource. +hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, + unsigned int flags); +// Maps a graphics resource for hip access. +hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, + hipStream_t stream __dparm(0) ); +// Gets device accessible address of a graphics resource. +hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, + hipGraphicsResource_t resource); +// Unmaps a graphics resource for hip access. +hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t* resources, + hipStream_t stream __dparm(0)); +// Unregisters a graphics resource. +hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource); +// doxygen end GL Interop +/** + * @} + */ + #ifdef __GNUC__ #pragma GCC visibility pop #endif