From 8e522954ad210273ea97724a86016571ea8dd2b0 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 22 Apr 2015 13:12:25 -0400 Subject: [PATCH] P4 to Git Change 1143340 by skudchad@skudchad_test_win_opencl2 on 2015/04/22 13:03:52 EPR #403782 - IOMMU2/SVM on CZ Win10, GL Interop changes for SVM. - Pass flag to GL to disable forceRemoteAllocation during GLDissociate Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#23 edit [ROCm/clr commit: 6b46087492f14dfeca8c220f1f97ec6945a09302] --- .../runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp index b1b0afe1dd..bf78c1f09c 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp @@ -635,12 +635,19 @@ CALGSLDevice::glAssociate(CALvoid* GLplatformContext, CALvoid* GLdeviceContext) bool CALGSLDevice::glDissociate(CALvoid* GLplatformContext, CALvoid* GLdeviceContext) { + int flags = 0; + + if (m_adp->pAsicInfo->svmFineGrainSystem) + { + flags = GL_INTEROP_SVM; + } + #ifdef ATI_OS_LINUX GLXContext ctx = (GLXContext)GLplatformContext; return (glXEndCLInteropAMD(ctx, 0)) ? true : false; #else HGLRC hRC = (HGLRC)GLplatformContext; - return (wglEndCLInteropAMD(hRC, 0)) ? true : false; + return (wglEndCLInteropAMD(hRC, flags)) ? true : false; #endif }