From 66fb828a7c41153d40e7c2f6509209d2d34ca42e Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Mon, 17 Jul 2023 01:16:31 +0100 Subject: [PATCH] SWDEV-398472 - [ABI Break] Added new include file for openGL interop APIs for AMD backend Change-Id: Ib6ff6ebf4f1f4b84d64560de807b6e19ab5904cc --- include/hip/hip_gl_interop.h | 5 +-- include/hip/hip_runtime_api.h | 63 ----------------------------------- 2 files changed, 3 insertions(+), 65 deletions(-) diff --git a/include/hip/hip_gl_interop.h b/include/hip/hip_gl_interop.h index 207beea3df..ed1f72c789 100644 --- a/include/hip/hip_gl_interop.h +++ b/include/hip/hip_gl_interop.h @@ -23,8 +23,9 @@ THE SOFTWARE. #define HIP_GL_INTEROP_H #include - -#if !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) +#if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) +#include "hip/amd_detail/amd_hip_gl_interop.h" +#elif !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__)) #include "hip/nvidia_detail/nvidia_hip_gl_interop.h" #endif #endif \ No newline at end of file diff --git a/include/hip/hip_runtime_api.h b/include/hip/hip_runtime_api.h index 3ccd444e68..c8725d9ef7 100644 --- a/include/hip/hip_runtime_api.h +++ b/include/hip/hip_runtime_api.h @@ -1063,17 +1063,6 @@ typedef struct hipExternalSemaphoreWaitParams_st { void __hipGetPCH(const char** pch, unsigned int*size); #endif -/** - * HIP Devices used by current OpenGL Context. - */ -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; - /** * HIP Access falgs for Interop resources. */ @@ -7772,58 +7761,6 @@ hipError_t hipMemUnmap(void* ptr, size_t size); * @} */ -/** - *------------------------------------------------------------------------------------------------- - *------------------------------------------------------------------------------------------------- - * @defgroup GL OpenGL Interop - * @{ - * This section describes the OpenGL and graphics interoperability functions of HIP runtime API. - */ -/** GLuint as uint.*/ -typedef unsigned int GLuint; -/** GLenum as uint.*/ -typedef unsigned int GLenum; - -/** - * @brief Queries devices associated with the current OpenGL context. - * - * @param [out] pHipDeviceCount - Pointer of number of devices on the current GL context. - * @param [out] pHipDevices - Pointer of devices on the current OpenGL context. - * @param [in] hipDeviceCount - Size of device. - * @param [in] deviceList - The setting of devices. It could be either hipGLDeviceListCurrentFrame - * for the devices used to render the current frame, or hipGLDeviceListAll for all devices. - * The default setting is Invalid deviceList value. - * - * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported - * - */ -hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, - unsigned int hipDeviceCount, hipGLDeviceList deviceList); -/** - * @brief Registers a GL Buffer for interop and returns corresponding graphics resource. - * - * @param [out] resource - Returns pointer of graphics resource. - * @param [in] buffer - Buffer to be registered. - * @param [in] flags - Register flags. - * - * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle - * - */ -hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, - unsigned int flags); -/** - * @brief Register a GL Image for interop and returns the corresponding graphic resource. - * - * @param [out] resource - Returns pointer of graphics resource. - * @param [in] image - Image to be registered. - * @param [in] target - Valid target value Id. - * @param [in] flags - Register flags. - * - * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle - * - */ -hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, - GLenum target, unsigned int flags); /** * @brief Maps a graphics resource for access. *