P4 to Git Change 1142991 by skudchad@skudchad_test_win_opencl2 on 2015/04/21 18:31:11

EPR #403782 - IOMMU2/SVM on CZ Win10, GL Interop changes for SVM.
	- Pass flag to GL to indicate SVM mode for OpenCL

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/7394/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#22 edit
Šī revīzija ir iekļauta:
foreman
2015-04-21 18:43:08 -04:00
vecāks a52449cc34
revīzija 753f82f868
@@ -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;