OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

Add flag to track wether glut has been initialized

Open HongleiHuang-amd opened this issue 1 year ago • 1 comments

I found an issue about CTS running gl / CL-GL interop case issue, I found glutInit double called in CTS CLGL test case code, which will lead to an error:

        freeglut (./test_gl): illegal glutInit() reinitialization attempt

root cause is in: test_conformance/gl/main.cpp:343

        if (glEnv->Init(&argc, (char **)argv, CL_TRUE))

the glEnv->Init has already called in same file line:260, the function glutInit in glEnv->Init can not be called twice, then a error will occur although all the gl / CLGL cases are passed. Then in the full quick CTS running it will appear:

        (12-Jul 03:54:01)     BEGIN  OpenCL-GL Sharing                       : 
       PASSED sub-test.
       PASSED 23 of 23 tests.
       (12-Jul 04:01:48)     FAILED OpenCL-GL Sharing                       : (467s, test  34/53)

Although all the gl/CLGL cases are passed, but this group test is judged to failed.

This issue already been found in https://github.com/KhronosGroup/OpenCL-CTS/pull/1885 And fixed partly by: https://github.com/KhronosGroup/OpenCL-CTS/commit/02471c8f56d75ef8e46c20a3dd00503faddf7a4e

But I found in setup_osx.cpp, the glutInit still has double init issue, I add the same fix like previous fix, can you please help to review?

HongleiHuang-amd avatar Jul 24 '24 03:07 HongleiHuang-amd

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 24 '24 03:07 CLAassistant

Hi @svenvh,

My name is Honglei Huang, working for AMD, and I am doing a OpenCL virtualization project. I found this issue in my local test.

I am trying to merge this PR into main-line, but this need write access people to do that. What process I need currently?

HongleiHuang-amd avatar Sep 20 '24 09:09 HongleiHuang-amd

No objections/concerns were raised in the ~2 months that this PR was open; moreover it's applying a fix similar to a previously merged PR. Hence merging.

svenvh avatar Sep 20 '24 12:09 svenvh