diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp index 7757baf49a..b1b0afe1dd 100644 --- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp +++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp @@ -616,12 +616,19 @@ CALGSLDevice::glAssociate(CALvoid* GLplatformContext, CALvoid* GLdeviceContext) return false; } + int flags = 0; + + if (m_adp->pAsicInfo->svmFineGrainSystem) + { + flags = GL_INTEROP_SVM; + } + #ifdef ATI_OS_LINUX GLXContext ctx = (GLXContext)GLplatformContext; return (glXBeginCLInteropAMD(ctx, 0)) ? true : false; #else HGLRC hRC = (HGLRC)GLplatformContext; - return (wglBeginCLInteropAMD(hRC, 0)) ? true : false; + return (wglBeginCLInteropAMD(hRC, flags)) ? true : false; #endif } @@ -662,6 +669,11 @@ CALGSLDevice::resGLAssociate(GLResAssociate & resData) const GSL_ALLOCATION_INSTANCED // alloc_type ); + if (m_adp->pAsicInfo->svmFineGrainSystem) + { + attribs.isAllocSVM = true; + } + hRes.type = resData.type; GLResourceData* hData = new GLResourceData;