-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Use libepoxy #1189
Use libepoxy #1189
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #1189 +/- ##
==========================================
- Coverage 36.60% 36.21% -0.39%
==========================================
Files 50 50
Lines 11558 11469 -89
==========================================
- Hits 4231 4154 -77
+ Misses 7327 7315 -12
|
46a5432
to
39af414
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, builds and works for me. a few things may need to be addressed before merging.
src/backend/gl/egl.c
Outdated
#define check_ext(name) eglext.has_##name = egl_has_extension(dpy, #name) | ||
#define check_ext(name) \ | ||
eglext.has_##name = epoxy_has_egl_extension(dpy, #name); \ | ||
log_info("Extension %s - %s", #name, eglext.has_##name ? "present" : "absent"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly, i don't like the format of this message but i can't think of anything really better right now.
#define check_ext(name) glxext.has_##name = glx_has_extension(dpy, screen, #name) | ||
#define check_ext(name) \ | ||
glxext.has_##name = epoxy_has_glx_extension(dpy, screen, #name); \ | ||
log_info("Extension " #name " - %s", glxext.has_##name ? "present" : "absent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, this line is a bit different compared to the one above. let's make them the same at least (don't miss the semicolon at the end!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no i need to remove the semicolon on the other line.
9329112
to
d8e3130
Compare
@yshui @absolutelynothelix I'm going to try the changes in OpenBSD, there shouldn't be any problems with using libepoxy, but it's better to clear up any doubts |
Add libepoxy dependency to CI manifest and Nix. For Nix, we need to set shellHook to workaround a NixOS limitation, see: NixOS/nixpkgs#287763 Signed-off-by: Yuxuan Shui <[email protected]>
There is actually no specification what symbols are exported from a libGL implementation. The (extremely outdated) OpenGL ABI specification says only GL 1.2 functions are guaranteed. Don't know how relevant that is now, but different libGL implementations do export different set of symbols. On Linux we are most likely to be linked with libglvnd, which has everything we need. But on other platforms this is not necessarily the case, for example on OpenBSD we are missing glGetQueryObjectui64v. Use libepoxy so we can outsource this problem and never worry about it ever again. Plus it also saves us from calling GetProcAddress ourselves. Changes other than trivial build fixes I have to make: 1. Can't use eglCreatePlatformWindowSurface/eglGetPlatformDisplay. libepoxy checks for EGL 1.5 when resolving these functions. But without a current context, libepoxy assumes we only have EGL 1.4. This creates a chicken and egg problem - we need a display to call eglGetPlatformDisplay. We have to use the *EXT version instead. Signed-off-by: Yuxuan Shui <[email protected]>
So we don't need maintain our own version. Signed-off-by: Yuxuan Shui <[email protected]>
Signed-off-by: Yuxuan Shui <[email protected]>
@yukiteruamano, we now have an openbsd ci so picom should at least always build there. sorry for the inconvenience! |
Yeah, I see that and I test the last changes, compile without issues |
No description provided.