From 56f90df89e1e18899dd4e92004af0e2649a58333 Mon Sep 17 00:00:00 2001 From: pghafari Date: Mon, 14 Jun 2021 20:36:15 -0400 Subject: [PATCH] SWDEV-245531 - GLInterop: Add Buffer Interop support Change-Id: I97ed7366d3cecafc2f621894258ecf8ab0d26612 --- include/hip/hip_runtime_api.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h index 1fbe2a5b12..30f12bc329 100644 --- a/include/hip/hip_runtime_api.h +++ b/include/hip/hip_runtime_api.h @@ -804,6 +804,39 @@ typedef struct hipExternalSemaphoreWaitParams_st { */ void __hipGetPCH(const char** pch, unsigned int*size); #endif + +/* + * @brief HIP Devices used by current OpenGL Context. + * @enum + * @ingroup Enumerations + */ +typedef enum hipGLDeviceList { + hipGLDeviceListAll = 1, ///< All hip devices used by current OpenGL context. + hipGLDeviceListCurrentFrame = 2, ///< Hip devices used by current OpenGL context in current + ///< frame + hipGLDeviceListNextFrame = 3 ///< Hip devices used by current OpenGL context in next + ///< frame. +} hipGLDeviceList; + +/* + * @brief HIP Access falgs for Interop resources. + * @enum + * @ingroup Enumerations + */ +typedef enum hipGraphicsRegisterFlags { + hipGraphicsRegisterFlagsNone = 0, + hipGraphicsRegisterFlagsReadOnly = 1, ///< HIP will not write to this registered resource + hipGraphicsRegisterFlagsWriteDiscard = + 2, ///< HIP will only write and will not read from this registered resource + hipGraphicsRegisterFlagsSurfaceLoadStore = 4, ///< HIP will bind this resource to a surface + hipGraphicsRegisterFlagsTextureGather = + 8 ///< HIP will perform texture gather operations on this registered resource +} hipGraphicsRegisterFlags; + +typedef struct _hipGraphicsResource hipGraphicsResource; + +typedef hipGraphicsResource* hipGraphicsResource_t; + // Doxygen end group GlobalDefs /** @} */ //-------------------------------------------------------------------------------------------------