From eeb06dd4b7624c038e692cd5c2a925dd8987b391 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Wed, 5 May 2021 12:42:35 -0400 Subject: [PATCH] SWDEV-273235 - Remove implicit dependancy on WGL Change-Id: I8355587be50492767caa3d2a4e602bdd6eb73960 [ROCm/clr commit: 4127be5c63e030c5f579036eb48f33015edbd3d0] --- projects/clr/opencl/amdocl/cl_gl.cpp | 4 ++-- projects/clr/opencl/amdocl/cl_gl_amd.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/clr/opencl/amdocl/cl_gl.cpp b/projects/clr/opencl/amdocl/cl_gl.cpp index 2af2d28d26..4d01b02790 100644 --- a/projects/clr/opencl/amdocl/cl_gl.cpp +++ b/projects/clr/opencl/amdocl/cl_gl.cpp @@ -2126,8 +2126,8 @@ bool ClGlEvent::waitForFence() { // create a new GL context on this thread, which is shared with the original context #ifdef _WIN32 - HDC tempDC_ = wglGetCurrentDC(); - HGLRC tempGLRC_ = wglGetCurrentContext(); + HDC tempDC_ = context().glenv()->wglGetCurrentDC_(); + HGLRC tempGLRC_ = context().glenv()->wglGetCurrentContext_(); // Set DC and GLRC if (tempDC_ && tempGLRC_) { ret = context().glenv()->glClientWaitSync_(gs, GL_SYNC_FLUSH_COMMANDS_BIT, diff --git a/projects/clr/opencl/amdocl/cl_gl_amd.hpp b/projects/clr/opencl/amdocl/cl_gl_amd.hpp index 75848836c4..97e97a208a 100644 --- a/projects/clr/opencl/amdocl/cl_gl_amd.hpp +++ b/projects/clr/opencl/amdocl/cl_gl_amd.hpp @@ -273,6 +273,7 @@ private: HDC tempDC_; HGLRC tempGLRC_; +public: PFN_wglCreateContext wglCreateContext_; PFN_wglGetCurrentContext wglGetCurrentContext_; PFN_wglGetCurrentDC wglGetCurrentDC_;