aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Set close on exec flag FD_CLOEXECDavid Fries2012-03-114-4/+38
| | | | | | | | | Set the close on exec flag when opening dri character devices, so they will be closed and free any resouces allocated in exec. Signed-off-by: David Fries <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* wayland: Use new wl_display_disconnectBenjamin Franzke2012-03-052-2/+2
| | | | | | This replaces the previously used wl_display_destroy. wl_display_destroy was povided by wayland-client.so and wayland-server.so, to resolve that conflict its renamed client-side.
* st/egl: Move drm_display_authenticate into HAVE_WAYLAND_BACKEND section.Vinson Lee2012-02-201-9/+9
| | | | | | | | | Fixes this GCC warning. native_drm.c:153:1: warning: ‘drm_display_authenticate’ defined but not used [-Wunused-function] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* Complete ARGB8888 naming convention format renames missedScott Moreau2012-01-171-4/+3
|
* wayland-drm: Drop the non-premul formats, use format codes from drm_fourcc.hKristian Høgsberg2012-01-115-32/+16
|
* egl,glx,wgl: Fixes stapi->createContext usageAlexandre Demers2011-12-241-2/+3
| | | | | | | | Fixed the build failure, fixed a warning where attributs and error arguments had been inverted and fixed another call that was missing an argument. Signed-off-by: José Fonseca <[email protected]>
* st/egl: error check and clamp coordinates in eglPostSubBufferNVChia-I Wu2011-12-201-8/+21
| | | | EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.
* st/egl: Add support for EGL_NV_post_sub_bufferFredrik Höglund2011-12-202-2/+24
| | | | | | Signed-off-by: Fredrik Höglund <[email protected]> [olv: remove #ifdef checks]
* egl: remove #ifdef's for official extensionsChia-I Wu2011-12-204-14/+0
| | | | | | | There is no point in having them when we distribute eglext.h. As for unofficial extensions, there is a chance that we might remove some of them evetually. Keeping the #ifdef's for now should make that easier.
* st/egl: fix compiler warningsChia-I Wu2011-12-152-3/+3
| | | | | One is about casting a pointer to integer and the other is about an unused function when HAVE_WAYLAND_BACKEND is not defined.
* st/egl: Implement EGL_NOK_swap_region for x11Fredrik Höglund2011-12-153-20/+51
| | | | | | | | v2: inline x11_drawable_copy_buffers(). Signed-off-by: Fredrik Höglund <[email protected]> [olv: s/inline/INLINE/]
* st/egl: Add support for EGL_NOK_swap_regionFredrik Höglund2011-12-153-3/+46
| | | | | | | | | | | | Backends indicate that they support this extension by returning EGL_TRUE when native_display::get_param() is called with NATIVE_PARAM_PRESENT_REGION and NATIVE_PARAM_PRESERVE_BUFFER. native_present_control is extended to include the region that should be presented. When native_present_control::num_rects is zero, the whole surface is to be presented. Signed-off-by: Fredrik Höglund <[email protected]>
* android: add support for ICSChia-I Wu2011-11-253-13/+22
| | | | | | | | With ICS (Android 4.0), several headers and structs are renamed. Define ANDROID_VERSION so that we can choose a different path depending on the platform version. I've tested only softpipe and llvmpipe. r600g is also reported to work.
* st/egl: fix a crash in Android backendChia-I Wu2011-11-251-3/+4
| | | | | There is no buffer and android_surface_present should be a no-op when eglSwapBuffers is called twice in a row.
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-111-1/+1
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* egl: restore missing \ in MakefileBrian Paul2011-10-041-1/+1
|
* configure: replace pkg-config calls with $(PKG_CONFIG) in the makefiles.Stéphane Marchesin2011-10-041-3/+3
| | | | | | | Us poor souls who cross compile mesa want to be able to specify which pkg-config to pick, or at least just change one place. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/egl: add support for null platformChia-I Wu2011-09-204-2/+213
| | | | | The backend calls null_sw_create() to create sw_winsys. And that is pretty much it...
* st/egl: Fix GDI build.José Fonseca2011-09-081-1/+1
|
* st/egl: add premultiplied alpha support to waylandBenjamin Franzke2011-09-084-4/+24
| | | | | | | | | | Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with alpha support premultiplied alpha. (Based on Chia-I Wu's patch) [olv: remove the use of param_premultiplied_alpha from the original patch]
* st/egl: correctly return configs under waylandBenjamin Franzke2011-09-084-23/+98
| | | | | | | | | Handle "format" events and return configs for the supported formats. (Based on Chia-I Wu's patch) [olv: update and explain why PIPE_FORMAT_B8G8R8A8_UNORM should not be enabled without HAS_ARGB32]
* Revert "st/egl: correctly return configs under wayland"Chia-I Wu2011-09-084-113/+30
| | | | This reverts commit 95b445699d7f049116ee0927387a958a9933766b.
* Revert "st/egl: add premultiplied alpha support to wayland"Chia-I Wu2011-09-084-32/+3
| | | | This reverts commit 23aa978a9d76a48f4b93e9a8911ec50c0e5d94ab.
* st/egl: add premultiplied alpha support to waylandChia-I Wu2011-09-084-3/+32
| | | | | | Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with alpha support premultiplied alpha. Currently, it means when argb32 and argb32_pre are both supported.
* st/egl: correctly return configs under waylandChia-I Wu2011-09-084-30/+113
| | | | | | When wl_drm is avaiable and enabled, handle "format" events and return configs for the supported formats. Otherwise, assume all formats of wl_shm are supported.