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: In Linux CL/GL sharing, handle failed symbols lookup #808

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smunaut
Copy link
Contributor

@smunaut smunaut commented Feb 7, 2025

In some cases we endup with GL being found but neither GLX or EGL found and this currently leads to crash.

So to better handle this case (and others), we keep track if we found symbols or not.

If we're asked if CL/GL sharing is supported we check the load worked.

If it's during an actual context creation we check what we were given match what we could load and fail context property finalization if not.

If it's during an "info" request where we don't have any properties yet, we return yes if either GLX or EGL was found.

Copy link
Contributor

@JablonskiMateusz JablonskiMateusz left a comment

Choose a reason for hiding this comment

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

please update years in copyright headers

@smunaut smunaut force-pushed the pr-fix-fail-sym-lookup branch from 960e818 to 6b61230 Compare February 10, 2025 13:42
In some cases we endup with GL being found but neither GLX or EGL
found and this currently leads to crash.

So to better handle this case (and others), we keep track if we
found symbols or not.

If we're asked if CL/GL sharing is supported we check the load worked.

If it's during an actual context creation we check what we were given
match what we could load and fail context property finalization if not.

If it's during an "info" request where we don't have any properties
yet, we return yes if either GLX or EGL was found.

Signed-off-by: Sylvain Munaut <[email protected]>
@smunaut
Copy link
Contributor Author

smunaut commented Feb 10, 2025

Done

@JablonskiMateusz
Copy link
Contributor

please correct tests as well, as currently there is unit test failure:

../neo/opencl/test/unit_test/sharings/gl/linux/gl_sharing_enable_tests.cpp:172: Failure
Value of: res
  Actual: false
Expected: true


../neo/opencl/test/unit_test/sharings/gl/linux/gl_sharing_enable_tests.cpp:173: Failure
Expected equality of these values:
  0
  errcodeRet
    Which is: -64


../neo/opencl/test/unit_test/sharings/gl/linux/gl_sharing_enable_tests.cpp:176: Failure
Expected: (nullptr) != (sharing), actual: (nullptr) vs NULL

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