summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
...
* egl: android: remove DRM_GRALLOC_TOP hackEmil Velikov2015-07-221-1/+0
| | | | | | | | | | Now that the drm_gralloc module exports the correct includes we can get rid of this hack. Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Varad Gautam <varadgautam@gmail.com>
* egl: remove old makefile.sourcesEmil Velikov2015-07-222-31/+1
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* android: rework the EGL buildEmil Velikov2015-07-222-74/+25
| | | | | | | | | | | | See previous two commits for details. v2: Don't forget git mv, bring back DRM_GRALLOC_TOP. Spotted by Varad. Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com> Tested-by: Varad Gautam <varadgautam@gmail.com>
* scons: rework the EGL buildEmil Velikov2015-07-223-36/+11
| | | | | | | | | The scons equivalent of the previous commit - just fold the almost identical driver + main Sconscripts. Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* automake: rework the EGL buildEmil Velikov2015-07-223-76/+68
| | | | | | | | | | | Simplify things by merging the two makefiles. This way we can combine the duplicated HAVE_PLATFORM_ checks, and build the library without having a separate static library. v2: use $() when referencing variables, use correct define (Matt) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: automake: remove unused HAVE_XCB_DRI2 defineEmil Velikov2015-07-221-1/+0
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove unused _EGL_DRIVER_SEARCH_DIR defineEmil Velikov2015-07-223-8/+2
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl/haiku: remove unused DEFAULT_DRIVER_DIR defineEmil Velikov2015-07-221-4/+0
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
* egl: remove final Windows specific workaroundEmil Velikov2015-07-224-10/+2
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove custom string functionsEmil Velikov2015-07-226-112/+5
| | | | | | | | Support for Windows has been removed for a while now, and virtually every POSIX compliant system provides strcasecmp, strdup and snprintf. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove _EGL_PLATFORM_WINDOWS enumEmil Velikov2015-07-222-2/+0
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove final references of platform_nullEmil Velikov2015-07-223-6/+0
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove flatten HAVE_SHARED_GLAPIEmil Velikov2015-07-223-13/+0
| | | | | | | | | It is simply not possible to use the dri backend without shared glapi, as the alternative provider (libGL) is not always present. We have fixed the build for a while now, so we can rip this out. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: remove the non-haiku scons buildEmil Velikov2015-07-223-65/+8
| | | | | | | | | | | | | | | | It has been broken since 2011 with commit c98ea26e16b(egl: Make egl_dri2 and egl_glx built-in drivers.). When the backends got merged into the main library each entry point was guarded by a _EGL_BUILT_IN_DRIVER_* define. As the define was missing, the linker kindly removed the whole of the dri2 backend, thus we did not notice any errors due to the unresolved link to xcb and friends. Cc: Chia-I Wu <olv@lunarg.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* egl/dri2: load libglapi.0.dylib on osxJulien Isorce2015-07-081-0/+2
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90903 Signed-off-by: Julien Isorce <j.isorce@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl: sort extension lists alphabeticallyMarek Olšák2015-07-033-54/+51
| | | | and add the missing KHR_gl_colorspace case.
* egl: implement EGL_KHR_gl_texture_3D_imageAnatoli Antonovitch2015-07-031-3/+17
| | | | Most of the code has been in place already.
* egl/x11: handle when invalid drawable is passed in create_surfaceEmil Velikov2015-06-301-0/+4
| | | | | | | | | 0 is not used as a valid drawable id, as such there is no point in attempting to query its geometry. Just bail out early and provide the more meaningful EGL_BAD_NATIVE_WINDOW to the user. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl/wayland: cleanup dri2_wl_create_surface error pathEmil Velikov2015-06-301-3/+1
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl/wayland: handle NULL native_window in create_surfaceEmil Velikov2015-06-301-0/+5
| | | | | | | | | Raise EGL_BAD_NATIVE_WINDOW instead of crashing. v2: s/Rise/Raise/ (spotted by Michel) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl/drm: plug memory leakEmil Velikov2015-06-301-2/+5
| | | | | | | | | Free the memory for dri2_surf in the unlikely case that one provides NULL for native_window. Also set the relevant EGL_ERROR to provide feedback to the user. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl/haiku: fix Mesa build under HaikuAlexander von Gluck IV2015-06-291-14/+14
| | | | | Performing a goto crosses the initialization of 'BWindow* win' breaking the build. We also fix a missing semicolon.
* egl_dri2: Remove trailing whitespacesBoyan Ding2015-06-264-13/+13
| | | | | Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visualsBoyan Ding2015-06-231-5/+0
| | | | | | | | | | | | | The call to dri2_x11_add_configs_for_visuals (previously dri2_add_configs_for_visuals) was moved downwards in commit f8c5b8a1, but appeared again in its original position after its rename in d019cd81. Remove it. Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* android: egl: do not link against libglapiEmil Velikov2015-06-231-1/+0
| | | | | | | | | | | The only reason we touch glapi is to dlopen it in order to: - make sure that the unresolved _glapi* symbols in the dri modules are provided. - fetch glFlush() and use it at various stages in the dri2 driver. Cc: Chih-Wei Huang <cwhuang@linux.org.tw> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl: Use the loader_open_device() helper to do open with CLOEXECDerek Foreman2015-06-234-32/+6
| | | | | | | | | | | We've moved the open with CLOEXEC idiom into a helper function, so call it instead of duplicating the code. This also replaces a couple of opens that didn't properly do CLOEXEC. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/drm: Duplicate fd with F_DUPFD_CLOEXEC to prevent leakDerek Foreman2015-06-231-1/+1
| | | | | | | | | | Replacing dup() with fcntl F_DUPFD_CLOEXEC creates the duplicate file descriptor with CLOEXEC so it won't be leaked to child processes if the process fork()s later. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/x11: Set version of swrastLoader to 2Boyan Ding2015-06-181-1/+1
| | | | | | | | | | which it actually implements instead of the newest version defined in dri_interface.h Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/dri2: implement platform_surfacelessHaixia Shi2015-06-167-1/+193
| | | | | | | | | | | | | | | | | | The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: change platform_null to platform_surfaceless v4: make libdrm required for surfaceless v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) v6: use O_CLOEXEC for drm fd Signed-off-by: Haixia Shi <hshi@chromium.org> Signed-off-by: Zach Reizner <zachr@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: Drop check for driver != NULL.Eric Anholt2015-06-151-1/+1
| | | | | | | | | | | | Back in 2013, a patch was added (with 2 reviewers!) at the end of the block to early exit the loop in this case, without noticing that the loop already did. I added another early exit case, again without noticing, but Rob caught me. Just drop the loop condition that apparently surprises most of us, instead of leaving the end of the loop conspicuously not exiting on success. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* egl/dri2: Fix Android Lollipop build on ARM.Eric Anholt2015-06-151-0/+1
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: coding style fixesEmil Velikov2015-06-121-4/+5
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: plug some obvious memory leaksEmil Velikov2015-06-121-7/+25
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: minor surface management cleanupsEmil Velikov2015-06-121-11/+4
| | | | | | | | Drop the stub/unused function haiku_create_surface() and add some basic implementation for destroy_surface() Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: kill off haiku_log()Emil Velikov2015-06-121-24/+0
| | | | | | | | | It's an incomplete copy of the default _eglLog() implementation. Just use the default logger. Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: we don't use src/loader, drop all the references to itEmil Velikov2015-06-122-8/+0
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: remove unused variables in struct haiku_egl_driverEmil Velikov2015-06-121-4/+0
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: handle memory allocation failureEmil Velikov2015-06-121-7/+28
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: use CALL/TRACE/ERROR over _eglLog() for haiku specificsEmil Velikov2015-06-121-25/+39
| | | | | | Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: remove commented out codeEmil Velikov2015-06-121-93/+0
| | | | | | | | | | It serves little to no purpose. As the driver gets updated, one can look at the existing implementation (dri2) for reference rather than letting the commented functions bitrot. Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/haiku: use correct version variableEmil Velikov2015-06-121-2/+1
| | | | | | | | | | | | Earlier commit folded the two separate variables into one, but forgot to update the haiku driver. Fixes: 0e4b564ef28(egl: combine VersionMajor and VersionMinor into one variable) Cc: Marek Olšák <marek.olsak@amd.com>> Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: try to load gallium_dri.so directlyChih-Wei Huang2015-06-091-0/+9
| | | | | | | | | | | This avoids needing hardlinks between all of the DRI driver .so names, since we're the only loader on the system. v2: Add early exit on success (like previous block) and log message on failure. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
* android: Depend on gallium_dri from EGL, instead of linking in gallium.Chih-Wei Huang2015-06-091-80/+3
| | | | | | | | | | | | The Android gallium build used to use gallium_egl, which was removed back in March. Instead, we will now use a normal Mesa libEGL loader with dlopen()ing of a DRI module. v2: add a clean step to rebuild all dri modules properly. v3: Squish the 2 patches doing this together (change by anholt). Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
* android: loader: export the path to be includedChih-Wei Huang2015-06-091-1/+0
| | | | | Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
* egl: expose EGL 1.5 if all requirements are metMarek Olšák2015-06-052-0/+16
| | | | | | | | There's no driver support yet, because EGL_KHR_gl_colorspace isn't implemented. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: return correct invalid-type error from eglCreateSyncMarek Olšák2015-06-051-8/+19
| | | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: add new platform functions (v2)Marek Olšák2015-06-051-0/+54
| | | | | | | | These are just wrappers around the existing extension functions. v2: return BAD_ALLOC if _eglConvertAttribsToInt fails Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: add eglCreateImage (v2)Marek Olšák2015-06-051-0/+42
| | | | | | | v2: - use calloc - return BAD_ALLOC if calloc fails Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: add eglGetSyncAttrib (v2)Marek Olšák2015-06-055-10/+29
| | | | | | | | | v2: - don't modify "value" in eglGetSyncAttribKHR after an error - rename _egl_api::GetSyncAttribKHR -> GetSyncAttrib - rename GetSyncAttribKHR_t -> GetSyncAttrib_t - rename _eglGetSyncAttribKHR to _eglGetSyncAttrib Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: add eglWaitSyncMarek Olšák2015-06-051-0/+12
| | | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>