From 09259cd49f7d4f4c23110cef69b10de694337109 Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Fri, 19 Feb 2021 12:06:25 -0500 Subject: [PATCH] SWDEV-198364 - Only enable clgl sharing in ROCm path when building LinuxPro Change-Id: Ie4d87e252519d090a62b930f7ebb315d3477b690 [ROCm/clr commit: 54a7170e40d17df08c7697f94ad429b362568565] --- projects/clr/rocclr/CMakeLists.txt | 1 + projects/clr/rocclr/device/rocm/rocsettings.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/projects/clr/rocclr/CMakeLists.txt b/projects/clr/rocclr/CMakeLists.txt index b73959c134..886d860bb7 100644 --- a/projects/clr/rocclr/CMakeLists.txt +++ b/projects/clr/rocclr/CMakeLists.txt @@ -119,6 +119,7 @@ option(BUILD_LINUXPRO "Build LinuxPro" OFF) if (BUILD_LINUXPRO) message(STATUS "Building LinuxPro") add_definitions(-DROCCLR_DISABLE_PREVEGA) + add_definitions(-DROCCLR_ENABLE_GL_SHARING) endif() option(BUILD_PAL "Build PAL backend" OFF) diff --git a/projects/clr/rocclr/device/rocm/rocsettings.cpp b/projects/clr/rocclr/device/rocm/rocsettings.cpp index e2f62210f5..855074c642 100644 --- a/projects/clr/rocclr/device/rocm/rocsettings.cpp +++ b/projects/clr/rocclr/device/rocm/rocsettings.cpp @@ -129,9 +129,13 @@ bool Settings::create(bool fullProfile, uint32_t gfxipMajor, uint32_t gfxipMinor enableExtension(ClAmdMediaOps); enableExtension(ClAmdMediaOps2); enableExtension(ClKhrImage2dFromBuffer); + +#ifdef ROCCLR_ENABLE_GL_SHARING if (MesaInterop::Supported()) { enableExtension(ClKhrGlSharing); } +#endif + // Enable platform extension enableExtension(ClAmdDeviceAttributeQuery);