summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* egl/dri2/x11: Set dri2_dpy->own_deviceChad Versace2014-03-171-0/+3
| | | | | | | | When the user calls eglGetDisplay(EGL_DEFAULT_DISPLAY), the Wayland and DRM platforms set dri2_dpy->own_device=true. This patch makes the X11 platform do the same for consistency. Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglPostSubBufferNV by display, not driverChad Versace2014-03-177-1/+27
| | | | | | | | | | Add dri2_egl_display_vtbl::post_sub_buffer, set it for each platform, and let egl_dri2 dispatch eglPostSubBufferNV to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglSwapBuffersRegionNOK by display, not driverChad Versace2014-03-177-2/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers_region, set it for each platform, and let egl_dri2 dispatch eglSwapBuffersRegionNOK to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglCopyBuffers by display, not driverChad Versace2014-03-177-3/+25
| | | | | | | | | | Add dri2_egl_display_vtbl::copy_buffers, set it for each platform, and let egl_dri2 dispatch eglCopyBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch API.QueryBufferAge by display, not driverChad Versace2014-03-177-5/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::query_buffer_age, set it for each platform, and let egl_dri2 dispatch API.QueryBufferAge to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglDestroySurface by display, not driverChad Versace2014-03-176-6/+16
| | | | | | | | | | Add dri2_egl_display_vtbl::destroy_surface, set it for each platform, and let egl_dri2 dispatch eglDestroySurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglCreatePbufferSurface by display, not driverChad Versace2014-03-177-3/+26
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePbufferSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglCreatePixmapSurface by display, not driverChad Versace2014-03-177-11/+30
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePixmapSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglCreateWindowSurface by display, not driverChad Versace2014-03-176-5/+21
| | | | | | | | | | Add dri2_egl_display_vtbl::create_window_surface, set it for each platform, and let egl_dri2 dispatch eglCreateWindowSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglSwapBuffersWithDamage by display, not driverChad Versace2014-03-177-1/+27
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers_with_damage, set it for each platform, and let egl_dri2 dispatch eglSwapBuffersWithDamageEXT to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglSwapBuffers by display, not driverChad Versace2014-03-176-5/+16
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers, set it for each platform, and let egl_dri2 dispatch eglSwapBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Dispatch eglSwapInterval by display, not driverChad Versace2014-03-177-2/+55
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_interval, set it for each platform, and let egl_dri2 dispatch eglSwapInterval to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/wl,x11: Call dri2_swap_interval() staticallyChad Versace2014-03-172-2/+10
| | | | | | | | | | Don't call it through the driver dispatch table. Just call it statically. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Put platform func names into proper namespacesChad Versace2014-03-173-170/+177
| | | | | | | | | | | | | | | | | | | | Each of the egl_dri2 platforms (except Android) prefix their function names with "dri2", not "dri2_${platform}". This means many function names have three separate definitions in the egl_dri2 directory: one in each of platform_drm.c, platform_wayland.c, and platform_x11.c. For example, each of the three files defines dri2_create_window_surface(). The name collisions make it difficult to review patches for correctness ("Is this patch hunk calling a platform_x11 function or a global egl_dri2 function?"), complicate debugging, and confuse code navigation tools. For each function in platform_x11.c prefixed with 'dri2', this patch changes its prefix to 'dri2_x11'. Likewise for platform_drm.c and 'dri2_drm'; and platform_wayland.c and 'dri2_wl'. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl/dri2: Move dri2_egl_display virtual funcs to vtblChad Versace2014-03-176-7/+52
| | | | | | | | | | | dri2_egl_display has only one virtual function, 'authenticate'. Define dri2_egl_display::vtbl and move 'authenticate' there. This prepares for the EGL platform extensions, which will add many more virtual functions to dri2_egl_display. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* Add the EGL_MESA_configless_context extensionNeil Roberts2014-03-125-5/+20
| | | | | | | | | | | | | | | | | | | | This extension provides a way for an application to render to multiple surfaces with different buffer formats without having to use multiple contexts. An EGLContext can be created without an EGLConfig by passing EGL_NO_CONFIG_MESA. In that case there are no restrictions on the surfaces that can be used with the context apart from that they must be using the same EGLDisplay. _mesa_initialze_context can now take a NULL gl_config which will mark the context as ‘configless’. It will memset the visual to zero in that case. Previously the i965 and i915 drivers were explicitly creating a zeroed visual whenever 0 is passed for the EGLConfig. Mesa needs to be aware that the context is configless because it affects the initial value to use for glDrawBuffer. The first time the context is bound it will set the initial value for configless contexts depending on whether the framebuffer used is double-buffered. Reviewed-by: Kristian Høgsberg <[email protected]>
* eglCreateContext: Remove the check for whether config == 0Neil Roberts2014-03-121-5/+2
| | | | | | | | | | | | | | | | In eglCreateContext there is a check for whether the config parameter is zero and in this case it will avoid reporting an error if the EGL_KHR_surfacless_context extension is supported. However there is nothing in that extension which says you can create a context without a config and Mesa breaks if you try this so it is probably better to leave it reporting an error. The original check was added in b90a3e7d8b1bc based on the API-specific extensions EGL_KHR_surfaceless_opengl/gles1/gles2. This was later changed to refer to EGL_KHR_surfacless_context in b50703aea5. Perhaps the original extensions specified a configless context but the new one does not. Reviewed-by: Kristian Høgsberg <[email protected]>
* automake: use install-lib-links.mk across all classic mesaEmil Velikov2014-03-111-0/+2
| | | | | | | Use the handy script and minimise the boilerplate in the makefiles. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* egl/wayland: explicitly set __DRIimageLoaderExtension membersEmil Velikov2014-02-231-3/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>y
* egl: clarify what _eglInitResource doesChia-I Wu2014-02-191-1/+5
| | | | It is a helper called from the initializers of its subclasses.
* Revert "egl: Unhide functionality in _eglInitContext()"Chia-I Wu2014-02-191-2/+1
| | | | | | | This reverts commit 1456ed85f0ed8b9c9f0abd6bd389a089fa3824b2. _eglInitResource can and is supposed to be called on subclass objects. Acked-by: Juha-Pekka Heikkila <[email protected]>
* Revert "egl: Unhide functionality in _eglInitSurface()"Chia-I Wu2014-02-191-3/+1
| | | | | | | This reverts commit 498d10e230663f8604d00608cae6324f779c9cdd. _eglInitResource can and is supposed to be called on subclass objects. Acked-by: Juha-Pekka Heikkila <[email protected]>
* Prevent zero sized wl_egl_windowSinclair Yeh2014-02-181-0/+6
| | | | | It is illegal to create or resize a window to zero (or negative) width and/or height. This patch prevents such a request from happening.
* automake: remove leftover XORG and LIBKMS variablesEmil Velikov2014-02-181-1/+0
| | | | | | | No longer set or used since the removal of st/xorg. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* wayland-egl: automake: add symbol testEmil Velikov2014-02-112-0/+18
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl/dri2/android: free driver_name in dri2_initialize_android error pathEmil Velikov2014-02-111-1/+3
| | | | | | | v2: Cleanup driver name if dri2_load_driver() fails. Spotted by Chad Signed-off-by: Emil Velikov <[email protected]>
* egl_dri2: remove LIBUDEV_CFLAGS from Makefile.amEmil Velikov2014-02-111-1/+0
| | | | | | None of the code within builds or (explicitly) requires udev. Signed-off-by: Emil Velikov <[email protected]>
* egl: Unhide functionality in _eglInitSurface()Juha-Pekka Heikkila2014-02-071-1/+3
| | | | | | | | | | _eglInitResource() was used to memset entire _EGLSurface by writing more than size of pointed target. This does work as long as Resource is the first element in _EGLSurface, this patch fixes such dependency. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl: Unhide functionality in _eglInitContext()Juha-Pekka Heikkila2014-02-071-1/+2
| | | | | | | | | | _eglInitResource() was used to memset entire _EGLContext by writing more than size of pointed target. This does work as long as Resource is the first element in _EGLContext, this patch fixes such dependency. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/glx: Remove egl_glx driverChad Versace2014-02-055-1229/+0
| | | | | | | | | | | | | | | Mesa now has a real, feature-rich EGL implementation on X11 via xcb. Therefore I believe there is no longer a practical need for the egl_glx driver. Furthermore, egl_glx appears to be unmaintained. The most recent nontrivial commit to egl_glx was 6baa5f1 on 2011-11-25. Tested by running weston-smoke in windowed Weston on X with i965. Signed-off-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Acked-by: Kristian Høgsberg <[email protected]>
* build: Share the all-local rule for linking libraries into the build dirKristian Høgsberg2014-01-291-6/+1
| | | | | | | | | | This consolidates how we link the libraries into the build directory. It works for lib_LTLIBRARIES but not custom shared libraries like DRI drivers or gallium state trackers which needs special casing (cf dri mega drivers, for example) Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* loader: Use dlsym to get our udev symbols instead of explicit linking.Eric Anholt2014-01-271-1/+1
| | | | | | | | | | | | | | | | Steam links against libudev.so.0, while we're linking against libudev.so.1. The result is that the symbol names (which are the same in the two libraries) end up conflicting, and some of the usage of .so.1 calls the .so.0 bits, which have different internal structures, and segfaults happen. By using a dlopen() with RTLD_LOCAL, we can explicitly look for the symbols we want, while they get the symbols they want. Reviewed-by: Keith Packard <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Alexandre Demers <[email protected]> Tested-by: Mike Lothian <[email protected]>
* egl: Use C11 thread abstractions.José Fonseca2014-01-231-19/+7
| | | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl_dri2: use loader util libEmil Velikov2014-01-187-259/+15
| | | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* egl-static: use loader util libEmil Velikov2014-01-181-0/+1
| | | | | | | | | | v2 * Drop the no longer used _EGL_NO_DRM from Android.mk. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* loader: introduce the loader util libEmil Velikov2014-01-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | All the various window system integration layers duplicate roughly the same code for figuring out device and driver name, pci-id's, etc. Which is sad. So extract it out into a loader util lib. v2 (Emil) * Separate the introduction of libloader from the code de-duplication. * Strip out non-pci devices support. * Add scons + Android build system support. * Add VISIBILITY_CFLAGS to avoid exporting the loader funcs. v3 (Emil) * PIPE_OS_ANDROID is undefined at this scope, use ANDROID * Make sure we define _EGL_NO_DRM when building only swrast Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-1727-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* egl_dri2: call dri2_add_configs_for_visuals after extensions setTapani Pälli2014-01-131-5/+6
| | | | | | | | dri2_add_config makes decisions based on NOK_texture_from_pixmap so it needs to be enabled before calling dri2_add_configs_for_visuals. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: break instead of looping after driver is foundQuanxian Wang2013-12-191-0/+3
| | | | | | | | Stop searching for a driver after success. Signed-off-by: Quanxian Wang <[email protected]> Reviewed-By: Gong, Zhigang <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/wayland: Return -1 from get_back_bo to indicate errorKristian Høgsberg2013-12-091-1/+1
| | | | | A return value of -1 indicate failure to allocate the back buffer and means we don't segfault on the way out.
* egl_dri2: Remove the unused swap_interval member of dri2_egl_surfaceNeil Roberts2013-12-091-1/+0
| | | | | | The _EGLSurface struct which is embedded into dri2_egl_surface also contains a swap interval member so the other member is redundant. Nothing was using it as far as I can tell.
* wayland: Add support for eglSwapIntervalNeil Roberts2013-12-073-40/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Wayland EGL platform now respects the eglSwapInterval value. The value is clamped to either 0 or 1 because it is difficult (and probably not useful) to sync to more than 1 redraw. The main change is that if the swap interval is 0 then Mesa won't install a frame callback so that eglSwapBuffers can be executed as often as necessary. Instead it will do a sync request after the swap buffers. It will block for sync complete event in get_back_bo instead of the frame callback. The compositor is likely to send a release event while processing the new buffer attach and this makes sure we will receive that before deciding whether to allocate a new buffer. If there are no buffers available then instead of returning with an error, get_back_bo will now poll the compositor by repeatedly sending sync requests every 10ms. This is a last resort and in theory this shouldn't happen because there should be no reason for the compositor to hold on to more than three buffers. That means whenever we attach the fourth buffer we should always get an immediate release event which should come in with the notification for the first sync request that we are throttled to. When the compositor is directly scanning out from the application's buffer it may end up holding on to three buffers. These are the one that is is currently scanning out from, one that has been given to DRM as the next buffer to flip to, and one that has been attached and will be given to DRM as soon as the previous flip completes. When we attach a fourth buffer to the compositor it should replace that third buffer so we should get a release event immediately after that. This patch therefore also changes the number of buffer slots to 4 so that we can accomodate that situation. If DRM eventually gets a way to cancel a pending page flip then the compositors can be changed to only need to hold on to two buffers and this value can be put back to 3. This also moves the vblank configuration defines from platform_x11.c to the common egl_dri2.h header so they can be shared by both platforms.
* wayland: Block for the frame callback in get_back_bo not dri2_swap_buffersNeil Roberts2013-12-071-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a typical game-style main loop which might be like this: while (1) { draw_something(); eglSwapBuffers(); } In this case the game is relying on eglSwapBuffers to throttle to a sensible frame rate. Previously this game would end up using three buffers even though it should only need two. This is because Mesa decides whether to allocate a new buffer in get_back_bo which would be before it has tried to read any events from the compositor so it wouldn't have seen any buffer release events yet. This patch just moves the block for the frame callback to get_back_bo. Typically the compositor will send a release event immediately after one of the attaches so if we block for the frame callback here then we can be sure to have completed at least one roundtrip and received that release event after attaching the previous buffer before deciding whether to allocate a new one. dri2_swap_buffers always calls get_back_bo so even if the client doesn't render anything we will still be sure to block to the frame callback. The code to create the new frame callback has been moved to after this call so that we can be sure to have cleared the previous frame callback before requesting a new one.
* wayland: Add an extension to create wl_buffers from EGLImagesNeil Roberts2013-12-045-0/+113
| | | | | | | | | | | | | | | | | | This adds an extension called EGL_WL_create_wayland_buffer_from_image which adds the following single function: struct wl_buffer * eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); The function creates a wl_buffer which shares its contents with the given EGLImage. The expected use case for this is in a nested Wayland compositor which is using subsurfaces to present buffers from its clients. Using this extension it can attach the client buffers directly to the subsurface without having to blit the contents into an intermediate buffer. The compositing can then be done in the parent compositor. The extension is only implemented in the Wayland EGL platform because of course it wouldn't make sense anywhere else.
* egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffersKristian Høgsberg2013-12-041-2/+2
| | | | | | | | | | | | | | | | If we're not using EGL_EXT_swap_buffers_with_damage, we have to damage the full extent. EGL operates on buffer coordinates, but wl_surface.damage takes surface coordinates. EGL doesn't know the buffer transformation (rotated or scaled) and can't post accurate damage in surface coordinates. The damage event however is clipped to the surface extents so we can just damage the maximum rectangle. In case of EGL_EXT_swap_buffers_with_damage, the application knows the buffer transform and is expected to pass in rectangles in surface space. https://bugs.freedesktop.org/show_bug.cgi?id=70250 Cc: "10.0" [email protected]
* Enable throttling in SwapBuffersAxel Davy2013-12-041-1/+13
| | | | | | | | | flush_with_flags, when available, allows the driver to throttle. Using this suppress input lag issues that can be observed in heavy rendering situations on non-intel cards. Signed-off-by: Axel Davy <[email protected]> Cc: "10.0" [email protected]
* egl/wayland: Send commit after flushing the driver contextKristian Høgsberg2013-12-041-2/+1
| | | | | | | | | | This typically won't make a difference, since we only send the requests at wl_display_flush() time. There might be a small race with another thread calling wl_display_flush() after our commit request, but before we flush the DRI driver. Moving the commit below the DRI driver flush call looks more natural and eliminates the small race. Cc: "10.0" [email protected]
* egl/wayland: Flush the wl_display at the end of SwapBuffersAxel Davy2013-12-041-0/+2
| | | | | | | | | | We would like the compositor to receive the commited buffer as soon as possible, so it has the time to treat it, and release old ones. We shouldn't rely on the client to flush the queue for us. Signed-off-by: Axel Davy <[email protected]> Cc: "10.0" [email protected]
* egl: add HAVE_LIBDRM define, fix EGL X11 platformTapani Pälli2013-12-031-6/+3
| | | | | | | | | | | | | | | | | | | | Commit a594cec broke EGL X11 backend by adding dependency between X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11. This patch fixes the issue by adding additional define for libdrm detection independent of which backend is being compiled. Tested by compiling Mesa with '--with-egl-platforms=x11' and running es2gears_x11 + glbenchmark2.7 successfully. v2: return true for dri2_auth if running without libdrm (Samuel) v3: check libdrm when building EGL drm platform + AM_CFLAGS fix (Emil) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72062 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: Samuel Thibault <[email protected]> Cc: [email protected]
* egl: Kill macro _EGL_DECLARE_MUTEXChad Versace2013-11-265-8/+5
| | | | | | | | | | | | | | | Replace all occurences of the macro with its expansion. It seems that the macro intended to provide cross-platform static mutex intialization. However, it had the same definition in all pre-processor paths: #define _EGL_DECLARE_MUTEX(m) _EGLMutex m = _EGL_MUTEX_INITIALIZER Therefore this abstraction obscured rather than helped. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>