summaryrefslogtreecommitdiff
path: root/src/egl/drivers/glx
AgeCommit message (Collapse)AuthorFilesLines
2013-09-19glx: fix compile error in egl_glx.c.Gaetan Nadon1-1/+1
egl_glx.c:40:22: fatal error: X11/Xlib.h: No such file or directory The compiler cannot find the Xlib.h in the installed system headers. All supplied include directives point to inside the mesa module. The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. The Xlib.h file is not installed on my workstation. It is supplied in the libx11-dev package. This allows an X developer control over which version of this file is used for X development. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-08-08egl: Do not export private symbolsChad Versace1-0/+1
libEGL was incorrectly exporting *all* symbols, public and private. This patch adds -fvisibility=hidden to libEGL's linker flags to ensure that only symbols annotated with __attribute__((visibility("default"))) get exported. Sanity-checked with libEGL's builtin DRI2 driver and the i965 DRI driver by running Piglit on X/EGL and by running weston-gears on Weston as an X client. Sanity-checked with libEGL's Gallium driver (which is not built-in) and the swrast Gallium driver by running es2gears_x11. Kristian reviewed the symbol diff in `nm libEGL.so`. CC: "9.2" <mesa-stable@lists.freedesktop.org> CC: Ian Romanick <idr@freedesktop.org> Acked-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-05Remove useless checks for NULL before freeingMatt Turner1-4/+2
This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05Remove Xcalloc/Xmalloc/Xfree callsMatt Turner1-3/+3
These calls allowed Xlib to use a custom memory allocator, but Xlib has used the standard C library functions since at least its initial import into git in 2003. It seems unlikely that it will grow a custom memory allocator. The functions now just add extra overhead. Replacing them will make future Coccinelle patches simpler. This patch has been generated by the following Coccinelle semantic patch: // Remove Xcalloc/Xmalloc/Xfree calls @@ expression E1, E2; @@ - Xcalloc (E1, E2) + calloc (E1, E2) @@ expression E; @@ - Xmalloc (E) + malloc (E) @@ expression E; @@ - Xfree (E) + free (E) @@ expression E; @@ - XFree (E) + free (E) Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-29egl/drivers: Convert to automake.Eric Anholt2-18/+33
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29egl: Drop _EGL_MAIN entrypoint obfuscation.Eric Anholt2-2/+1
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-03egl_glx: fix eglDestroyContextChia-I Wu1-1/+2
Wrong pointers are passed to glXDestroyContext. Spotted by Brian Paul.
2011-11-27egl_glx: Try first a default lookup for glXGetProcAddress before loading ↵Beren Minor1-9/+14
dynamic lib. GLX functions are sometimes directly available in the current binary. In such cases, we do not need any alternate library loaded using dlopen. Otherwise, dlopen may find the wrong libGL library and get functions that conflicts with the current loaded ones. For example, on Debian Sid with nvidia binary drivers, using mesa's libEGL with GLX driver leads to wrong glXGetFBConfigs symbol loaded (or loaded twice?), which leads to "GLX: failed to create any config" error message as the glXGetFBConfigs symbol seems to return garbage. If the binary is linked with nvidia's libGL, the GLX symbols are already available. Without this patch, convert_fbconfig (src/egl/drivers/glx/egl_glx.c:233) fails for every config found, after glXGetFBConfigAttrib(... GLX_RENDER_TYPE, ...) call, as the value returned has GLX_COLOR_INDEX_BIT and not GLX_RGBA_BIT. [olv: initialize handle, prepend egl_glx to the commit log]
2011-09-19egl_glx.c: use unsigned instead of uintMatt Turner1-3/+3
We've had a hack to fix this in Gentoo on Solaris for a while. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-14Destroy context in dri2/glx driver when apps call eglDestroyContextCooper Yuan1-0/+19
2011-07-02egl: add copyright noticesChia-I Wu1-12/+14
The list of copyright holders could be incomplete. Please update directly or notify me if your name is missing.
2011-01-13egl: Improve driver selection.Chia-I Wu1-0/+4
The idea is to be able to match a driver using the following order try egl_gallium with hw renderer try egl_dri2 try egl_gallium with sw renderer try egl_glx given the module list egl_gallium egl_dri2 egl_glx For that, UseFallback initialization option is added. The module list is matched twice: with the option unset and with the option set. In the first pass, egl_gallium skips its sw renderer and egl_glx rejects to initialize since UseFallback is not set. In the second pass, egl_gallium skips its hw renderer and egl_dri2 rejects to initialize since UseFallback is set. The process stops at the first driver that initializes the display.
2011-01-13egl: Simplify driver matching.Chia-I Wu1-0/+3
Add initialization options that drv->API.Initialize should support. Replace drv->Probe by TestOnly initialization option and simplify _eglMatchDriver.
2011-01-13egl: Cleanup _EGLDisplay initialization.Chia-I Wu1-5/+4
Reorder/rename and document the fields that should be set by the driver during initialization. Drop the major/minor arguments from drv->API.Initialize.
2011-01-10egl: Make egl_dri2 and egl_glx built-in drivers.Chia-I Wu2-2/+5
These two drivers are small in size. Making them built-in should simplify packaging.
2011-01-10egl_glx: Load libGL dynamically.Chia-I Wu2-107/+238
This is a step forward for compatibility with really old GLX. But the real reason for making this change now is so that we can make egl_glx a built-in driver without having to link to libGL.
2010-10-23egl: Use reference counting to replace IsLinked or IsBound.Chia-I Wu1-8/+24
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update _eglBindContext and drivers to do reference counting.
2010-10-23egl: Minor changes to the _EGLConfig interface.Chia-I Wu1-1/+1
Mainly to rename _eglAddConfig to _eglLinkConfig, along with a few clean ups.
2010-10-22egl_glx: Fix borken driver.Chia-I Wu1-107/+185
The driver was broken since 6eda3f311bc24999835003e404d5eda5599bc5de. All configs fail to pass _eglValidateConfig.
2010-10-22egl_glx: Drop the use of [SG]ET_CONFIG_ATTRIB.Chia-I Wu1-21/+14
_EGLConfig can be directly dereferenced now. Since egl_glx is the last user of the macros, drop the macros too.
2010-09-24egl: Fix several 'comparison between signed and unsigned integer' warningsIan Romanick1-2/+4
I hate GCC for requiring the (int) cast on sizeof.
2010-09-24egl_glx: Silence piles of 'unused variable' warningsIan Romanick1-0/+27
2010-09-09eglglx: Convert glx visuals/fbconfigs straight to EGL configsKristian Høgsberg1-142/+101
In other words, skip the __GLcontextModes middle man.
2010-06-30egl: Store configs in a dynamic array.Chia-I Wu1-1/+1
2010-06-23egl: Introduce platform displays internally.Chia-I Wu1-5/+9
This commit introduces type-safe platform displays internally. A platform display consists of a generic pointer and an enum that specifies the platform. An EGLDisplay is created from a platform display. Native displays become platform displays whose platform is determined by _eglGetNativePlatform(). Platform windows and pixmaps may also be introduced if needed.
2010-05-14egl: remove duplicate ARRAY_SIZE() macro declarationBrian Paul1-1/+1
2010-04-19egl: Pass flags to locate Xlib headers and librariesDan Nicholson1-2/+2
eglplatform.h pulls in Xlib.h on X11 platforms. Likewise, the egl glx driver and egl programs needs to link to libX11. Make sure we use the locations the user told us about. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-04egl: Convert drivers to use typecast macros.Chia-I Wu1-25/+4
Use macros to define the standard typecasts. This saves lots of typings.
2010-01-31egl: Initialize display configs with the display.Chia-I Wu1-1/+1
This changes _eglInitConfig to take the display as its argument.
2010-01-31egl: Initialize display resources with their display.Chia-I Wu1-4/+4
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an _EGLDisplay instead of an _EGLDriver. This is a more natural form, and plus, the display encodes information such as the extensions supported that might be required for attribute list parsing.
2010-01-30egl: Clean up header inclusions.Chia-I Wu1-1/+1
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-28egl: Migrate drivers to use _eglBindContext.Chia-I Wu1-4/+16
_eglMakeCurrent is a big hammer that is not easy to use. Migrate drivers to use _eglBindContext and un-export _eglMakeCurrent.
2010-01-28egl: eglMakeCurrent should accept an uninitialized display.Chia-I Wu1-35/+29
When no context or surface are given, the display is allowed to be uninitialized. Most drivers cannot handle an uninitialized display. But they are updated to at least throw a fatal message.
2010-01-25egl: Native types are renamed in EGL 1.3.Chia-I Wu1-4/+6
Rename Native*Type to EGLNative*Type.
2010-01-22egl_glx: Report only OpenGL support.Chia-I Wu1-10/+3
It reported OpenGL ES support because some demos did not set EGL_RENDERABLE_TYPE correctly. The demos are fixed.
2010-01-22egl: Update driver Makefiles.Chia-I Wu1-68/+7
Update to use the new Makefile.template.
2010-01-12egl: Add _EGLDriver as the first argument to GetProcAddress.Chia-I Wu1-1/+1
The rest of the driver API has it as the first argument. It should be there so that a driver has access to itself.
2009-10-22egl_glx: Add support for eglWaitClient and eglWaitNative.Chia-I Wu1-0/+17
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22egl_glx: Clean up eglGetProcAddress.Chia-I Wu1-16/+1
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22egl_glx: Clean up context functions.Chia-I Wu1-19/+5
This lifts the requirement that a context must be direct. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22egl_glx: Clean up surface functions.Chia-I Wu1-99/+106
Separete Drawable and GLXDrawable. Add support for pbuffer and pixmap surfaces on GLX <= 1.3. Remove surface binding code that will never work. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22egl_glx: Clean up the initialization code.Chia-I Wu1-287/+371
Proper detection of GLX extensions. Convert fbconfigs or visuals in a more unified way and validate the resulting configs. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-26egl_glx: Make fbconfigs and visuals per display.Chia-I Wu1-114/+135
This is to allow a driver to drive multiple displays. Remove the use of _EGL_PLATFORM_X and obsolete code along the way. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Remove eglhash.c and eglhash.h.Chia-I Wu1-1/+0
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Some per-driver data should be per-display.Chia-I Wu1-4/+14
Move some fields of _EGLDriver to _EGLDisplay. It also becomes unnecessary to pass _EGLDisplay to drivers when _eglMain is called. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Overhaul driver API.Chia-I Wu1-104/+78
The motivation is so that drivers do not need to look up and check for bad display, context, and etc. It also becomes unnecessary for drivers to call the link functions. This commit makes eglapi.[ch] do the lookup and check. As a result, the driver API is overhauled, and almost all sources and drivers need update. The updates are mainly find and replace with human brains. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03egl: Replace IsBound by a pointer to the binding.Chia-I Wu1-1/+1
IsBound tells if a context or surface is current. What it does not tell is, to which thread a context is current, or to which context a surface is current. This commit replaces IsBound by a pointer to the binding thread or context. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17egl: Remove redundant DeletePending flag.Chia-I Wu1-5/+1
A context or surface that is neither linked to a display nor current to a thread should be destroyed. Therefore, an unlinked context or surface implies a pending delete automatically. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17egl: Use the link functions to manage resources.Chia-I Wu1-15/+27
This commit uses the newly introduced link functions to manage EGL contexts and surfaces. As a result of this, the API for drivers are changed. All drivers are updated for the change. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-06-01Use separate $(MINSTALL) for installing librariesDan Nicholson1-1/+1
The special feature of bin/minstall to copy symlinks is only ever needed when installing libraries which may have .so symlinks. All the headers and directories can use a normal install program. These two modes are separated as $(INSTALL) and $(MINSTALL) to allow the user (or autoconf) to override installing normal files as they please. An autoconf check for the install program has been added and will be used in preference to minstall when available. Fixes bug 16053.