SWDEV-439004, SWDEV-440021 - Fix GL Interop & Unit_hipP2pLinkTypeAndHopFunc testcases

- hipGLDeviceListNextFrame is not supported yet
- Initialize GL interop before calling interop related APIs
- Skip GL interop tests when display is not connected
- Load librocm_smi64.so from /opt/rocm/lib/

Change-Id: Ie4879c18317aa377a95d6f2d0d5314d4adf38649


[ROCm/hip-tests commit: d7789d328c]
このコミットが含まれているのは:
Rakesh Roy authored and Rakesh Roy committed 2024-03-08 12:13:39 -05:00
1 親 96db0dbd8d
コミット 2bcd9b782f
11ファイル変更
+152 -25

検索条件に一致するファイルはありません

+27
ファイルの表示
@@ -29,6 +29,15 @@ THE SOFTWARE.
TEST_CASE("Unit_hipGraphicsResourceGetMappedPointer_Positive_Basic") {
GLContextScopeGuard gl_context;
const int device_count = HipTest::getDeviceCount();
unsigned int gl_device_count = 0;
std::vector<int> gl_devices(device_count, -1);
// Initialize GL interop
HIP_CHECK(hipGLGetDevices(&gl_device_count, gl_devices.data(), device_count, hipGLDeviceListAll));
REQUIRE(gl_device_count == 1);
REQUIRE(gl_devices.at(0) == 0);
GLBufferObject vbo;
hipGraphicsResource* vbo_resource;
@@ -54,6 +63,15 @@ TEST_CASE("Unit_hipGraphicsResourceGetMappedPointer_Positive_Basic") {
TEST_CASE("Unit_hipGraphicsResourceGetMappedPointer_Positive_Parameters") {
GLContextScopeGuard gl_context;
const int device_count = HipTest::getDeviceCount();
unsigned int gl_device_count = 0;
std::vector<int> gl_devices(device_count, -1);
// Initialize GL interop
HIP_CHECK(hipGLGetDevices(&gl_device_count, gl_devices.data(), device_count, hipGLDeviceListAll));
REQUIRE(gl_device_count == 1);
REQUIRE(gl_devices.at(0) == 0);
GLBufferObject vbo;
hipGraphicsResource* vbo_resource;
@@ -84,6 +102,15 @@ TEST_CASE("Unit_hipGraphicsResourceGetMappedPointer_Positive_Parameters") {
TEST_CASE("Unit_hipGraphicsResourceGetMappedPointer_Negative_Parameters") {
GLContextScopeGuard gl_context;
const int device_count = HipTest::getDeviceCount();
unsigned int gl_device_count = 0;
std::vector<int> gl_devices(device_count, -1);
// Initialize GL interop
HIP_CHECK(hipGLGetDevices(&gl_device_count, gl_devices.data(), device_count, hipGLDeviceListAll));
REQUIRE(gl_device_count == 1);
REQUIRE(gl_devices.at(0) == 0);
GLBufferObject vbo;
hipGraphicsResource* vbo_resource;