aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl: remove the non-haiku scons buildEmil Velikov2015-07-222-42/+0
| | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* 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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl/wayland: cleanup dri2_wl_create_surface error pathEmil Velikov2015-06-301-3/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* 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" <[email protected]> Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* 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 <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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" <[email protected]> Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: implement platform_surfacelessHaixia Shi2015-06-164-0/+186
| | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Zach Reizner <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* 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 <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* egl/dri2: Fix Android Lollipop build on ARM.Eric Anholt2015-06-151-0/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* egl/haiku: coding style fixesEmil Velikov2015-06-121-4/+5
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/haiku: plug some obvious memory leaksEmil Velikov2015-06-121-7/+25
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/haiku: we don't use src/loader, drop all the references to itEmil Velikov2015-06-122-8/+0
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/haiku: remove unused variables in struct haiku_egl_driverEmil Velikov2015-06-121-4/+0
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/haiku: handle memory allocation failureEmil Velikov2015-06-121-7/+28
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl/haiku: use CALL/TRACE/ERROR over _eglLog() for haiku specificsEmil Velikov2015-06-121-25/+39
| | | | | | Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]>> Cc: Alexander von Gluck IV <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* android: loader: export the path to be includedChih-Wei Huang2015-06-091-1/+0
| | | | | Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* egl: use EGL 1.5 types without suffixesMarek Olšák2015-06-051-2/+2
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: set the EGL version in common codeMarek Olšák2015-06-054-24/+0
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/dri2: silence uninitialized variable warningsBrian Paul2015-06-011-2/+4
| | | | | | And update assertions to be more informative. Reviewed-by: Jose Fonseca <[email protected]>
* egl/haiku: Drop extern "C". No longer neededAlexander von Gluck IV2015-05-141-2/+0
| | | | Reviewed-⁠by: Brian Paul <[email protected]>
* egl/swrast: Enable config extension for swrastAxel Davy2015-05-111-14/+13
| | | | | | | | Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Implement swrast supportAxel Davy2015-05-113-17/+696
| | | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]>. Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Simplify dri2_wl_create_surfaceAxel Davy2015-05-111-25/+13
| | | | | | | | | This function is always used with EGL_WINDOW_BIT. Pixmaps are forbidden for Wayland, and PBuffers are unimplemented. Reviewed-by: Daniel Stone <[email protected]>. Signed-off-by: Axel Davy <[email protected]>
* egl/x11: move dri2_x11_swrast_create_image_khr to egl_dri2_fallback.hAxel Davy2015-05-112-10/+10
| | | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Implement DRI_PRIME supportAxel Davy2015-05-112-15/+92
| | | | | | | | | | | | | | | | | | When the server gpu and requested gpu are different: . They likely don't support the same tiling modes . They likely do not have fast access to the same locations Thus we do: . render to a tiled buffer we do not share with the server . Copy the content at every swap to a buffer with no tiling that we share with the server. This is similar to the glx dri3 DRI_PRIME implementation. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/wayland: Add support for render-nodesAxel Davy2015-05-112-14/+56
| | | | | | | | | | | | | | It is possible the server advertises a render-node. In that case no authentication is needed, and Gem names are forbidden. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]> v2: do not check for __DRI_IMAGE_DRIVER, but instead do not advertise __DRI_DRI2_LOADER when on a render-node.
* egl/wayland: properly destroy wayland objectsAxel Davy2015-05-112-1/+6
| | | | | | | | | | | the wl_registry and the wl_queue allocated weren't destroyed. CC: 10.5 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/dri2: Fix codestyle in a commentChad Versace2015-05-071-1/+2
| | | | Pointed out by Kenneth Graunke. Trivial fix.
* egl/dri2: Check return value of __DRI2fence::create_fence()Chad Versace2015-05-061-0/+7
| | | | | | If it returns NULL, then return early with an error. Reviewed-by: Marek Olšák <[email protected]>
* egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie2015-05-051-1/+1
| | | | | | | | After talking to Jon Leech he suggested this should be fine. update spec to the version in the registry. Signed-off-by: Dave Airlie <[email protected]>
* egl/dri2: implement EGL_KHR_cl_event2 (v2)Marek Olšák2015-04-301-2/+23
| | | | v2: fix the SYNC_CONDITION query
* egl/dri2: implement EGL_KHR_wait_syncMarek Olšák2015-04-301-0/+15
|
* egl/dri2: implement EGL_KHR_fence_syncMarek Olšák2015-04-302-0/+104
|
* egl/dri: don't expose configs with an accumulation bufferMarek Olšák2015-04-301-0/+9
|
* android: fix the building rules for Android 5.0Chih-Wei Huang2015-04-221-1/+7
| | | | | | | | | | | | | | | | | Android 5.0 allows modules to generate source into $OUT/gen, which will then be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as necessary. Modules will need to change calls to local-intermediates-dir into local-generated-sources-dir. The patch changes local-intermediates-dir into local-generated-sources-dir. If the Android version is less than 5.0, fallback to local-intermediates-dir. The patch also fixes the 64-bit building issue of Android 5.0. v2 [Emil Velikov] - Keep the LOCAL_UNSTRIPPED_PATH variable. Signed-off-by: Chih-Wei Huang <[email protected]>
* android: egl: add libsync_cflags to the buildEmil Velikov2015-04-221-0/+6
| | | | | | | | | | | | | ... via local_shared_libraries. Otherwise the sync/sync.h header won't be found. Note: 10.5 and earlier will need similar change in st/egl. v2: Append the library to the local_shared_libraries list. (Chih-Wei) Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]>
* android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov2015-04-221-1/+1
| | | | | | | | | ... to manage the LIBDRM*_CFLAGS. The former is the recommended approach by the Android build system developers while the latter has been depreciated for quite some time. Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>