Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix freeglut reinitialization attempt in gl_sharing tests #1885

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

karolherbst
Copy link
Contributor

Fixes the following error:
freeglut (./build/test_conformance/gl/test_gl): illegal glutInit() reinitialization attempt

Fixes the following error:
freeglut (./build/test_conformance/gl/test_gl): illegal glutInit() reinitialization attempt
Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the Windows WGLEnvironment has a flag to track whether glut has been initialized or not. Should we consider porting that solution to Linux instead?

@karolherbst
Copy link
Contributor Author

It looks like the Windows WGLEnvironment has a flag to track whether glut has been initialized or not. Should we consider porting that solution to Linux instead?

not sure if that actually makes sense as freeglut needs to be initialized at this point anyway. Maybe I read the code wrong, but I think it's expected that some tests will be run at that point.

svenvh pushed a commit that referenced this pull request Sep 20, 2024
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
#1885
And fixed partly by:
02471c8

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?

Signed-off-by: Honglei Huang <[email protected]>
Co-authored-by: Honglei Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants