Summary: | KWin uses incorrect function prototype for glXSwapInterval | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Ralf Jung <post> |
Component: | compositing | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-workspace/a0ee40355011cc73655af0232e35053665a6115f | Version Fixed In: | |
Sentry Crash Report: |
Description
Ralf Jung
2012-11-06 12:38:40 UTC
Nice catch. I think the best way is to properly resolve each of the function pointers and then decide when it is actually used which one to call. Probably in the way: 1. Mesa 2. EXT 3. SGI That sounds good. The simple wrapper which is called in the end will also need a display and a drawable, but only use it for the EXT version. Is it okay to use the function prototypes provided by the system headers? If yes, would you accept a patch that also converts (most of) the other functions to use these prototypes (to keep compatibility, something like "typedef PFNGLXSOMEFUNC glXSomeFunc_type"), so that similar accidents are prevented? > That sounds good. The simple wrapper which is called in the end will also
> need a display and a drawable, but only use it for the EXT version.
> Is it okay to use the function prototypes provided by the system headers? If
> yes, would you accept a patch that also converts (most of) the other
> functions to use these prototypes (to keep compatibility, something like
> "typedef PFNGLXSOMEFUNC glXSomeFunc_type"), so that similar accidents are
> prevented?
I would just resolve all three function pointers and don't use an abstraction
at all or just have this abstraction inside the glxbackend. IIRC it's only
used from one function inside glxbackend, so that belongs there.
The function resolving should follow the common (and correct) pattern as for
the other resolved functions. Best look at the OpenGL and/or egl function
resolving, the glx ones were a little bit buggy :-)
Git commit a0ee40355011cc73655af0232e35053665a6115f by Ralf Jung. Committed on 13/11/2012 at 22:19. Pushed by ralfjung into branch 'master'. Fix buffer swap prototypes REVIEW: 107302 M +19 -7 kwin/glxbackend.cpp M +2 -0 kwin/glxbackend.h M +15 -12 kwin/libkwineffects/kwinglutils_funcs.cpp M +6 -2 kwin/libkwineffects/kwinglutils_funcs.h http://commits.kde.org/kde-workspace/a0ee40355011cc73655af0232e35053665a6115f |