SWDEV-245531 - GLInterop: updating glEnv logic

Change-Id: I6103243c477547a6a2b714bbf836ce36abe84f8c
이 커밋은 다음에 포함됨:
pghafari
2021-10-12 11:04:51 -04:00
커밋한 사람 Payam Ghafari
부모 52e57b660b
커밋 5b6b2e6d2c
+12
파일 보기
@@ -294,6 +294,18 @@ int Context::create(const intptr_t* properties) {
}
} else {
if (info_.flags_ & GLDeviceKhr) {
if (glenv_ == NULL) {
HMODULE h = (HMODULE)Os::loadLibrary(
#ifdef _WIN32
"OpenGL32.dll"
#else //!_WIN32
"libGL.so.1"
#endif //!_WIN32
);
if (!h || !(glenv_ = new GLFunctions(h, (info_.flags_ & Flags::EGLDeviceKhr) != 0))) {
return CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR;
}
}
if (!glenv_->init(reinterpret_cast<intptr_t>(info_.hDev_[GLDeviceKhrIdx]),
reinterpret_cast<intptr_t>(info_.hCtx_))) {
delete glenv_;