summaryrefslogtreecommitdiff
path: root/src/egl
AgeCommit message (Collapse)AuthorFilesLines
2015-07-08egl/dri2: load libglapi.0.dylib on osxJulien Isorce1-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>
2015-07-03egl: sort extension lists alphabeticallyMarek Olšák3-54/+51
and add the missing KHR_gl_colorspace case.
2015-07-03egl: implement EGL_KHR_gl_texture_3D_imageAnatoli Antonovitch1-3/+17
Most of the code has been in place already.
2015-06-30egl/x11: handle when invalid drawable is passed in create_surfaceEmil Velikov1-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>
2015-06-30egl/wayland: cleanup dri2_wl_create_surface error pathEmil Velikov1-3/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-06-30egl/wayland: handle NULL native_window in create_surfaceEmil Velikov1-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>
2015-06-30egl/drm: plug memory leakEmil Velikov1-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>
2015-06-29egl/haiku: fix Mesa build under HaikuAlexander von Gluck IV1-14/+14
Performing a goto crosses the initialization of 'BWindow* win' breaking the build. We also fix a missing semicolon.
2015-06-26egl_dri2: Remove trailing whitespacesBoyan Ding4-13/+13
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-06-23egl/x11: Remove duplicate call to dri2_x11_add_configs_for_visualsBoyan Ding1-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>
2015-06-23android: egl: do not link against libglapiEmil Velikov1-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>
2015-06-23egl: Use the loader_open_device() helper to do open with CLOEXECDerek Foreman4-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>
2015-06-23egl/drm: Duplicate fd with F_DUPFD_CLOEXEC to prevent leakDerek Foreman1-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>
2015-06-18egl/x11: Set version of swrastLoader to 2Boyan Ding1-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>
2015-06-16egl/dri2: implement platform_surfacelessHaixia Shi7-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>
2015-06-15egl: Drop check for driver != NULL.Eric Anholt1-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>
2015-06-15egl/dri2: Fix Android Lollipop build on ARM.Eric Anholt1-0/+1
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-12egl/haiku: coding style fixesEmil Velikov1-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>
2015-06-12egl/haiku: plug some obvious memory leaksEmil Velikov1-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>
2015-06-12egl/haiku: minor surface management cleanupsEmil Velikov1-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>
2015-06-12egl/haiku: kill off haiku_log()Emil Velikov1-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>
2015-06-12egl/haiku: we don't use src/loader, drop all the references to itEmil Velikov2-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>
2015-06-12egl/haiku: remove unused variables in struct haiku_egl_driverEmil Velikov1-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>
2015-06-12egl/haiku: handle memory allocation failureEmil Velikov1-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>
2015-06-12egl/haiku: use CALL/TRACE/ERROR over _eglLog() for haiku specificsEmil Velikov1-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>
2015-06-12egl/haiku: remove commented out codeEmil Velikov1-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>
2015-06-12egl/haiku: use correct version variableEmil Velikov1-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>
2015-06-09android: try to load gallium_dri.so directlyChih-Wei Huang1-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>
2015-06-09android: Depend on gallium_dri from EGL, instead of linking in gallium.Chih-Wei Huang1-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>
2015-06-09android: loader: export the path to be includedChih-Wei Huang1-1/+0
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-06-05egl: expose EGL 1.5 if all requirements are metMarek Olšák2-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>
2015-06-05egl: return correct invalid-type error from eglCreateSyncMarek Olšák1-8/+19
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: add new platform functions (v2)Marek Olšák1-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>
2015-06-05egl: add eglCreateImage (v2)Marek Olšák1-0/+42
v2: - use calloc - return BAD_ALLOC if calloc fails Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: add eglGetSyncAttrib (v2)Marek Olšák5-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>
2015-06-05egl: add eglWaitSyncMarek Olšák1-0/+12
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: add EGL 1.5 functions that don't need any changes from extensionsMarek Olšák1-12/+16
Declare the functions without the suffix, so that the core names are exported. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: use EGL 1.5 types without suffixesMarek Olšák6-38/+38
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: add context attribs from EGL 1.5Marek Olšák1-0/+30
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: fix setting context flagsMarek Olšák1-2/+3
Cc: 10.6 10.5 10.4 <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: combine VersionMajor and VersionMinor into one variableMarek Olšák2-7/+5
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: set the EGL version in common codeMarek Olšák5-24/+7
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05egl: remove unused _egl_global::ClientExtensionsMarek Olšák2-19/+0
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-01egl/dri2: silence uninitialized variable warningsBrian Paul1-2/+4
And update assertions to be more informative. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-05-14egl: remove remaining EGL_MESA_copy_context skeletonEmil Velikov2-2/+0
With earlier commit (7a58262e58d egl: Remove skeleton implementation of EGL_MESA_screen_surface) we've removed the skeleton implementation of eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension was never implemented in mesa. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-05-14egl/main: fix EGL_KHR_get_all_proc_addressesEmil Velikov1-3/+3
The extension requires that the address of the core functions should be available via eglGetProcAddress. Currently the list is guarded by _EGL_GET_CORE_ADDRESSES, which was only set for the scons (windows) build. Unconditionally enable it for all the builds (automake, android and haiku) considering that the extension is not platform specific and is always enabled. v2: Drop the _EGL_GET_CORE_ADDRESSES macro altogether. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-05-14egl: more define fixes for EGL_MESA_image_dma_buf_exportMarc-André Lureau2-2/+2
s/EGL_MESA_dma_buf_image_export/EGL_MESA_image_dma_buf_export as defined by the spec Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14egl/main: expose only core EGL functions staticallyEmil Velikov2-135/+132
The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that providing static symbols for functions provided by EGL extensions is not portable. Considering that relatively recently we've seen a non-mesa desktop EGL implementation, the fact that we opt for such behaviour has gone unnoticed. From the EGL 1.5 specification: For functions that are queryable with eglGetProcAddress, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable clients cannot rely on this behavior. To encourage devs against writing such non-portable code, let's hide the symbols similar to the official binary driver from NVIDIA. v2: Quote the EGL 1.5 spec, as suggested by Chad. Cc: Brian Paul <brianp@vmware.com> Cc: Chad Versace <chad.versace@intel.com> Cc: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14egl/main: Update README.txtEmil Velikov1-7/+6
The driver search/load is not done at eglGetDisplay (or eglOpenDisplay as the readme called it) time, but during eglInitialize(). Drop _eglMain (available only for external drivers) reference. Mention we use function(s), specific to the built-in driver(s). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14egl/main: cleanup function prototypesEmil Velikov2-14/+2
Cleanup the function propotypes which were part of the previous EGL drivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Chad Versace <chad.versace@intel.com>