summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl
Commit message (Collapse)AuthorAgeFilesLines
* wayland: Don't rely on static variable for identifying wl_drm buffersKristian Høgsberg2013-10-111-2/+9
| | | | | | | | | | | | Now that libEGL has been fixed to not leak all kinds of symbols, gbm links to its own copy of the libwayland-drm.a helper library. That means we can't rely on comparing the addresses of a static vtable symbol in that library to determine if a wl_buffer is a wl_drm_buffer. Instead, we move the vtable into the wl_drm struct and use that for comparing. https://bugs.freedesktop.org/show_bug.cgi?id=69437 Cc: 9.2 <[email protected]>
* gallium/state_trackers/egl: use X11_INCLUDES rather than X11_CFLAGSGaetan Nadon2013-10-091-1/+1
| | | | | | | | | | | | | The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. It is used for building the code in the x11 subdir. The build does not fail on this one as LIBDRM_CFLAGS happens to have the inludedir value as the one for X11. It will not always be the case. The option --enable-gallium-egl is required durimg configuration. Acked-by: Brian Paul <[email protected]> Signed-off-by: Gaetan Nadon <[email protected]>
* gallium-egl: use standard variable types over EGLBoolean/EGLintEmil Velikov2013-10-031-9/+9
| | | | | | | | | The inferface/prototype in native_wayland_bufmgr.h uses boolean/int, as well as the rest of the file. Convert to improve consistency and to prevent gcc compiler warnings due to type miss-match. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/egl: flush resources before presentationGrigori Goronzy2013-10-011-0/+11
| | | | | | | Fixes regression on r600g due to fast clear introduced by commit edbbfac6. Signed-off-by: Marek Olšák <[email protected]>
* st/egl: consolidate C sources lists into Makefile.sourcesEmil Velikov2013-10-014-53/+53
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* st/egl: include u_format.h for util_format_get_blocksize()Brian Paul2013-09-301-0/+1
|
* st/dri: do not create a new context for msaa copyMaarten Lankhorst2013-09-112-3/+5
| | | | | | | | | | | | | | | | Commit b77316ad7594f st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers introduced creating a pipe_context for every call to validate, which is not required because the callers have a context anyway. Only exception is egl_g3d_create_pbuffer_from_client_buffer, can someone test if it still works with NULL passed as context for validate? From examining the code I believe it does, but I didn't thoroughly test it. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: 9.2 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium-egl: Commit the rest of the native_wayland_drm_bufmgr_helper v2 patchKristian Høgsberg2013-08-073-7/+4
| | | | | | | | I missed Anders v2 on the list which fixed non-wayland compilation: http://lists.freedesktop.org/archives/mesa-dev/2013-July/042062.html Signed-off-by: Kristian Høgsberg <[email protected]>
* egl: Update to Wayland 1.2 server APIAnder Conselvan de Oliveira2013-08-074-15/+22
| | | | | | | | | | Since Wayland 1.2, struct wl_buffer and a few functions are deprecated. References to wl_buffer are replaced with wl_resource and some getter functions and calls to deprecated functions are replaced with the proper new API. The latter changes are related to resource versioning. Signed-off-by: Ander Conselvan de Oliveira <[email protected]>
* gallium-egl: Don't add a listener for wl_drm twice in wayland platformAnder Conselvan de Oliveira2013-08-071-1/+0
| | | | | | | A listener is added just after the interface is bound, in registry_handle_global(). Signed-off-by: Ander Conselvan de Oliveira <[email protected]>
* gallium-egl: Simplify native_wayland_drm_bufmgr_helper interfaceAnder Conselvan de Oliveira2013-08-079-308/+276
| | | | | | | | | | | | | | | | | | | | | The helper provides a series of functions to easy the implementation of the WL_bind_wayland_display extension on different platforms. But even with the helpers there was still a bit of duplicated code between platforms, with the drm authentication being the only part that differs. This patch changes the bufmgr interface to provide a self contained object with a create function that takes a drm authentication callback as an argument. That way all the helper functions are made static and the "_helper" suffix was removed from the sources file name. This change also removes the mix of Wayland client and server code in the wayland drm platform source file. All the uses of libwayland-server are now contained in native_wayland_drm_bufmgr.c. Changes to the drm platform are only compile tested. Signed-off-by: Ander Conselvan de Oliveira <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-0535-35/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* st/egl: fix bulid errors on Android 4.2Chia-I Wu2013-05-031-23/+62
| | | | | | | | | | The differences from the previous releases that affect st/egl are - logging macros are prefixed with an 'A' - dequeueBuffer() and enqueueBuffer() require an additoinal argument for fence fd, acquired from libsync Additionally, include gralloc_drm.h with extern "C".
* gallium-egl: Fix compile errors introduced in de315f76aKristian Høgsberg2013-03-195-5/+5
| | | | | | | | The commit changed API in a helper library shared by both egl_dri2 and the gallium egl state tracker, but only egl_dri2 was updated to use the new interface. Tested-by: Giulio Camuffo <[email protected]>
* gallium/egl: fix out-of-tree buildAndreas Boll2013-03-191-1/+1
| | | | | | | | | | Taken from downstream: http://anonscm.debian.org/gitweb/?p=pkg-xorg/lib/mesa.git;a=blob;f=debian/patches/15-fix-oot-build.diff;h=7040999a22d3937d0578cfd85ee2c71d7dc614bb;hb=refs/heads/ubuntu%2B1 NOTE: This is a candidate for the 9.1 branch. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* wayland: fix segfault when using software renderingPhilipp Brüschweiler2013-03-151-1/+1
| | | | | | | | | | wayland_roundtrip() was given an incorrect parameter. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=62362 Note: This is a candidate for the stable branches. Signed-off-by: Brian Paul <[email protected]>
* egl-wayland: Fix left-over wl_display_roundtrip() usageKristian Høgsberg2013-02-141-1/+1
| | | | | We have to use the EGL wayland event queue for roundtrip, so use the wayland_roundtrip() helper, which does just that.
* gallium/egl: Fix include dirs for VPATH buildQuentin Glidic2013-02-041-0/+1
| | | | | | NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Quentin Glidic <[email protected]>
* android: use gralloc_drm_get_gem_handle apiTapani Pälli2013-01-281-8/+2
| | | | | | | | Currently a gralloc internal structure is exposed to Mesa, Use a query function instead to maintain ABI compatibility. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* Remove hacks for static MakefilesMatt Turner2013-01-131-6/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* state_trackers/egl: Convert to automakeMatt Turner2013-01-104-127/+111
|
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-042-3/+3
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* wayland: Don't cancel a roundtrip when any event is receivedJonas Ådahl2013-01-031-1/+4
| | | | | | | | | | | Since wl_display_dispatch_queue() returns the number of processed events or -1 on error, only cancel the roundtrip if an -1 is returned. This also fixes a potential memory corruption bug happening when the roundtrip does an early return and the callback later writes to the then out of scope stack allocated `done' parameter. Reviewed-by: Kristian Høgsberg <[email protected]>
* st/egl/drm: only unref the udev device if neededTobias Droste2012-12-111-4/+5
| | | | | | | | | | | Fixes compiler warning: drm/native_drm.c: In function ‘native_create_display’: drm/native_drm.c:180:21: warning: ‘device’ may be used uninitialized in this function [-Wmaybe-uninitialized] drm/native_drm.c:157:24: note: ‘device’ was declared here Signed-off-by: Tobias Droste <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium: pass the current context to the flush_front state tracker functionMarek Olšák2012-12-071-2/+4
| | | | | | I will later use the context to resolve an MSAA front buffer. Reviewed-by: Brian Paul <[email protected]>
* scons: Require drm to build gallium/state_trackers/egl/x11/x11_screen.c.Vinson Lee2012-12-041-2/+4
| | | | | | | | | | | | x11_screen.c includes xf86drm.h, which comes from libdrm-dev. This patch fixes this build error. Compiling src/gallium/state_trackers/egl/x11/x11_screen.c ... src/gallium/state_trackers/egl/x11/x11_screen.c:30:21: fatal error: xf86drm.h: No such file or directory Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* wayland: Destroy frame callback when destroying surfaceJonas Ådahl2012-11-071-0/+3
| | | | | | | | | | | | | | If a frame callback is not destroyed when destroying a surface, its handler function will be invoked if the surface was destroyed after the callback was requested but before it was invoked, causing a write on free:ed memory. This can happen if eglDestroySurface() is called shortly after eglSwapBuffers(). Note: This is a candidate for stable branches. Reviewed-by: Kristian Høgsberg <[email protected]>
* wayland: Drop support for ill-defined, unused wl_egl_pixmapKristian Høgsberg2012-10-172-107/+0
| | | | | | It doesn't provide the cross-process buffer sharing that a window system pixmap could otherwise support and we don't have anything left that uses this type of surface.
* egl/wayland: Update to Wayland 0.99 APIKristian Høgsberg2012-10-174-40/+94
| | | | | | | | | The 0.99.0 Wayland release changes the event API to provide a thread-safe mechanism for receiving events specific to a subsystem (such as EGL) and we need to use it in the EGL platform. The Wayland protocol now also requires a commit request to make changes take effect, issue that from eglSwapBuffers.
* Remove useless checks for NULL before freeingMatt Turner2012-09-058-30/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" 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 <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-052-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* Remove Xcalloc/Xmalloc/Xfree callsMatt Turner2012-09-052-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* wayland-drm: close fd after the display is uninitializedPhilipp Brüschweiler2012-08-161-2/+3
| | | | | | | This fixes a "kernel rejected pushbuf: Bad file descriptor" error on wl_drm display destruction. Reviewed-by: Kristian Høgsberg <[email protected]>
* st/egl: Fix up for ClientVersion -> ClientMajorVersion rename.Michel Dänzer2012-08-151-3/+3
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53513 Signed-off-by: Michel Dänzer <[email protected]>
* egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_contextIan Romanick2012-08-061-3/+1
| | | | | | | | | | | | KHR extension name is reserved for Khronos ratified extensions, and there is no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these three extensions with EGL_KHR_surfaceless_context since that extension actually exists. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* gallium-egl: Move wayland query_buffer implementationKristian Høgsberg2012-07-197-32/+54
| | | | | | | Move it to native_wayland_drm_bufmgr_helper.c which only gets compiled when wayland is enabled and which already includes the right headers. Signed-off-by: Kristian Høgsberg <[email protected]>
* wayland: Support EGL_WIDTH and EGL_HEIGHT queries for wl_bufferKristian Høgsberg2012-07-191-3/+10
| | | | | | We're going to make the public wl_buffer struct as small as possible. Signed-off-by: Kristian Høgsberg <[email protected]>
* wayland: Use existing EGL_TEXTURE_FORMAT for querying wl_buffer texture formatKristian Høgsberg2012-07-191-3/+3
| | | | | | | | We also reuse EGL_TEXTURE_RGBA and EGL_TEXTURE_RGB, adding only the new planar YUV texture formats: EGL_TEXTURE_Y_U_V_WL, EGL_TEXTURE_Y_UV_WL and EGL_TEXTURE_Y_XUXV_WL. Signed-off-by: Kristian Høgsberg <[email protected]>
* gallium-egl: Implement eglQueryWaylandBufferWLKristian Høgsberg2012-07-191-1/+31
| | | | | | Support this query for gallium EGL too. Signed-off-by: Kristian Høgsberg <[email protected]>
* st/egl: Fix build for wayland includesElvis Lee2012-07-171-3/+4
| | | | | | common/native_wayland_drm_bufmgr_helper.c fails to find wayland-server.h Signed-off-by: Elvis Lee <[email protected]>
* st/egl: fix uninitialized pointer bugBrian Paul2012-07-161-1/+1
| | | | | | If no format is matched in the loop the value of xconf was undefined. NOTE: This is a candidate for the 8.0 branch.
* wayland-drm: Add protocol to create planar buffersKristian Høgsberg2012-07-111-1/+1
|
* wayland-drm: Pass struct wl_drm_buffer to the driverKristian Høgsberg2012-07-112-15/+16
| | | | | We're going to extend this to support multi-plane buffers, so pass this to the driver so it can access the details.
* scons: Fix missing gbm symbols in st/egl.José Fonseca2012-05-121-3/+5
|
* egl-fbdev: Fix compile-error by including errno.hDavid Herrmann2012-04-301-0/+1
| | | | | | | | | | | | | We use errno and EINVAL so include errno.h. This patch introduced this bug: http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/state_trackers/egl/fbdev/native_fbdev.c?id=b60120608f6ddf4098bc324363197c979ee04cb7 Signed-off-by: David Herrmann <[email protected]> Cc: Chia-I Wu <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Adam Jackson <[email protected]> Cc: Jesse Barnes <[email protected]>
* st/egl: Update to the new wl_shm_pool interfaceBenjamin Franzke2012-04-031-3/+8
|
* st/egl: Also remove wl_buffer_damage in wayland backendBenjamin Franzke2012-03-271-1/+0
| | | | As commit 03eca9d92d407c71a59ff8a43067759769da0ae4 does for egl_dri2.
* egl/drm: Include errno.hJosé Fonseca2012-03-111-0/+1
| | | | Fixes scons build.