SWDEV-296911 - Enable clgl interop for both MesaGL and OrcaGL

Change-Id: Ie3ad85a8335b1fc751812c09bb0cd30aad38dcae
This commit is contained in:
Jason Tang
2021-07-28 17:18:21 -04:00
کامیت شده توسط Maneesh Gupta
والد ce5cc020af
کامیت f165737096
3فایلهای تغییر یافته به همراه5 افزوده شده و 8 حذف شده
+1 -1
مشاهده پرونده
@@ -96,7 +96,7 @@ else()
option(BUILD_LINUXPRO "Build LinuxPro" OFF)
if(BUILD_LINUXPRO)
target_compile_definitions(rocclr PUBLIC
ROCCLR_DISABLE_PREVEGA ROCCLR_ENABLE_GL_SHARING)
ROCCLR_DISABLE_PREVEGA )
endif()
endif()
@@ -269,13 +269,12 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
if (status != HSA_STATUS_SUCCESS) return false;
//! @todo Need to handle metadata correctly
#if 0
// if map_buffer wrote anything in metadata, copy it to amdImageDesc_
if (metadata_size != 0) {
// if map_buffer wrote a legitimate SRD, copy it to amdImageDesc_
if ((metadata_size != 0) &&
(reinterpret_cast<hsa_amd_image_descriptor_t*>(metadata)->deviceID ==
amdImageDesc_->deviceID)) {
memcpy(amdImageDesc_, metadata, metadata_size);
}
#endif //0
kind_ = MEMORY_KIND_INTEROP;
assert(deviceMemory_ != nullptr && "Interop map failed to produce a pointer!");
@@ -129,11 +129,9 @@ bool Settings::create(bool fullProfile, uint32_t gfxipMajor, uint32_t gfxipMinor
enableExtension(ClAmdMediaOps2);
enableExtension(ClKhrImage2dFromBuffer);
#ifdef ROCCLR_ENABLE_GL_SHARING
if (MesaInterop::Supported()) {
enableExtension(ClKhrGlSharing);
}
#endif
// Enable platform extension
enableExtension(ClAmdDeviceAttributeQuery);