SWDEV-398472 - [ABI Break] Added new include file for openGL interop APIs for AMD backend

Change-Id: Ib6ff6ebf4f1f4b84d64560de807b6e19ab5904cc
This commit is contained in:
Ioannis Assiouras
2023-07-17 01:16:31 +01:00
committed by Rakesh Roy
parent a4066ec239
commit 66fb828a7c
2 changed files with 3 additions and 65 deletions
+3 -2
View File
@@ -23,8 +23,9 @@ THE SOFTWARE.
#define HIP_GL_INTEROP_H
#include <hip/hip_common.h>
#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
-63
View File
@@ -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.
*