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

Checking if glamor_egl_get_driver_name exists #238

Closed
wants to merge 2 commits into from

Conversation

laigor
Copy link

@laigor laigor commented Sep 26, 2022

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 2, 2022

Thanks, We do need a check for this.
This looks like it was added in 1.20.7 so lets use
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 20, 7, 0, 0)
instead so we don't need to use PKG_CHECK_EXISTS(epoxy >= 1.5.4...

@matt335672
Copy link
Member

@laigor - are you able to make the change @jsorg71 mentioned to your PR?

Thanks.

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 12, 2022

I can imagine a system with epoxy 1.5.4 and xorg-server 1.20.6 and this PR will still fail.
Lets check xorg-server version.
I created PR #239 for this.
Thanks for pointing this out.

@laigor
Copy link
Author

laigor commented Oct 15, 2022

Thanks, We do need a check for this. This looks like it was added in 1.20.7 so lets use #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 20, 7, 0, 0) instead so we don't need to use PKG_CHECK_EXISTS(epoxy >= 1.5.4...

This is how the xorg xserver checks for the presence of the glamor_egl_get_driver_name function:

conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
              epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false)

Please see this link

@jsorg71
Copy link
Contributor

jsorg71 commented Oct 16, 2022

> conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
>               epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false)

xorg-server version 1.20.7+ does that to check to see if function eglGetDisplayDriverName() exists, not glamor_egl_get_driver_name().
The function we call glamor_egl_get_driver_name() always exists in xorg-server version 1.20.7+. The check controls whether glamor_egl_get_driver_name() returns NULL or calls eglGetDisplayDriverName().

see
https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/glamor/glamor_egl.c#L707

@jsorg71
Copy link
Contributor

jsorg71 commented Jun 7, 2023

fixed via #239

@jsorg71 jsorg71 closed this Jun 7, 2023
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.

None yet

3 participants