summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_wayland.c
Commit message (Collapse)AuthorAgeFilesLines
* egl/wayland: add missing destroy_window callbackStencel, Joanna2016-10-241-2/+13
| | | | | | | | | | | | | The original patch by Joanna added the function pointer and callback yet things got only partially applied - the infra was added, but the implementation was missing. Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Fixes: 690ead4a135 ("egl/wayland-egl: Fix for segfault in dri2_wl_destroy_surface.") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 2e0ab61e29c4b44d349ab433c899b691a9b12f68)
* loader: remove loader_get_driver_for_fd() driver_typeEmil Velikov2016-10-181-1/+1
| | | | | | | | | | | | | | Reminiscent from the pre-loader days, were we had multiple instances of the loader logic in separate places and one could build a "GALLIUM_ONLY" version. Since that is no longer the case and the loaders (glx/egl/gbm) do not (and should not) require to know any classic/gallium specific we can drop the argument and the related code. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* egl/wayland: introduce dri2_wl_add_configs_for_visuals() helperEmil Velikov2016-10-141-32/+51
| | | | | | | | | | | | | | | | | | Analogous to previous commits - with an extra bonus. Current code, apart from not attributing the lack of 'per visual' and overall configs also overwrites the newly added config. Namely if the dpy supports two or more of the supported formats (XRGB8888, ARGB8888 and RGB565) earlier configs will be overwritten and the the final one will be stored, since the we use the same index for all three in our dri2_add_config call. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: set WL_bind_wayland_display in a consistent wayEmil Velikov2016-10-141-1/+1
| | | | | | | | | | | | | | Introduce a helper and use it throughout the platform code. This allows us to reduce the amount of ifdef(s) and (potentially) use kms_swrast_dri.so for !drm platforms (namely wayland and x11). Note: in the future as other platforms (android, surfaceless) support the extension they can reuse the helper. v2: Rebase, check for device_name. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: rework dri2_egl_display::extensions storageEmil Velikov2016-10-141-11/+24
| | | | | | | | | | | Remove the error prone fixed size array. While we're here also rename to loader_extensions like in the GLX code. v2: Rebase. Keep image_loader_extension within the wayland_drm dri2_loader_extensions list. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/wayland: don't populate dri2_dpy->swrast_loader_extensionEmil Velikov2016-10-141-8/+10
| | | | | | | | Similar to the dri2 one - the extension stored in struct dri2_egl_display is unused. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/wayland: don't populate dri2_dpy->dri2_loader_extensionEmil Velikov2016-10-141-7/+9
| | | | | | | Analogous to the earlier android patch. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: move surface refcounting out of the platform codeEmil Velikov2016-10-141-3/+0
| | | | | | | | All the platforms are duplicating what should be a driver/dri2 thing - refcounting. Just fold it accordingly. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl/wayland: Set disp->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+2
| | | | | | | | | | | Avoid use-after-free, fix spec@egl_khr_fence_sync@conformance. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <mesa-stable@lists.freedesktop.org> Reported-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: restrict swap_available dri2_egl_display field to X11Frank Binns2016-07-071-2/+0
| | | | | | | This field is only ever set and read by the X11 platform. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* dri: add backbuffer use flagAxel Davy2016-03-091-3/+5
| | | | | | This will be used by the next commit. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* egl/wayland: Try to use wl_surface.damage_buffer for SwapBuffersWithDamageDerek Foreman2016-02-261-3/+36
| | | | | | | | | | | | | | | | | Since commit d1314de293e9e4a63c35f094c3893aaaed8580b4 we ignore damage passed to SwapBuffersWithDamage. Wayland 1.10 now has functionality that allows us to properly process those damage rectangles, and a way to query if it's available. Now we can use wl_surface.damage_buffer and interpret the incoming damage as being in buffer co-ordinates. Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* egl_dri2: Add a function to let platform code return dri drawable from ↵Boyan Ding2015-11-171-0/+2
| | | | | | | | | | | | | | | | | | _EGLSurface dri3 for EGL will use different struct other than dri2_egl_surface for an EGL surface, the common code only uses __DRIdrawable from that struct, so instead of converting _EGLSurface to dri2_egl_surface, let the platform code return the __DRIdrawable by its own (although the current platforms use the same function). v2: From Martin Peres - convert to the new drawable interface (Kristian) Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
* egl/wayland: Ignore rects from SwapBuffersWithDamageDaniel Stone2015-11-131-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eglSwapBuffersWithDamage accepts damage-region rectangles to hint the compositor that it only needs to redraw certain areas, which was passed through the wl_surface_damage request, as designed. Wayland also offers a buffer transformation interface, e.g. to allow users to render pre-rotated buffers. Unfortunately, there is no way to query buffer transforms, and the damage region was provided in surface, rather than buffer, co-ordinate space. Users could in theory account for this themselves, but EGL also requires co-ordinates to be passed in GL/mathematical co-ordinate space, with an inversion to Wayland's natural/scanout co-ordinate space, so transformations other than a 180-degree rotation will fail as EGL attempts to subtract the region from (its view of the) surface height. Pending creation and acceptance of a wl_surface.buffer_damage request, which will accept co-ordinates in buffer co-ordinate space, pessimise to always sending full-surface damage. bce64c6c provides the explanation for why we send maximum-range damage, rather than the full size of the surface: in the presence of buffer transformations, full-surface damage may not actually cover the entire surface. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* egl/dri2: enable EGL_KHR_gl_colorspace for swrastEmil Velikov2015-10-071-3/+6
| | | | | | | | | | No driver changes needed for softpipe/llvmpipe - things just work. v2: Whitespace fixes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* egl/dri2: don't leak the fd on dri2_terminateEmil Velikov2015-09-151-0/+1
| | | | | | | | | | Currently the check was incorrect as it did not consider the (unlikely) case of fd == 0. In order to fix this we should first correctly initialize it to -1, as the swrast implementations leave it set to zero (props to calloc()). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com>
* egl/wayland: define set_cloexec_or_close only when mkostemp is not presentBoyan Ding2015-08-221-0/+4
| | | | | | | | | | | Fixes a compiler warning of defined but not used function when HAVE_MKOSTEMP is defined. Fixes: eb3e2562a4b(configure.ac: check for mkostemp()) Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
* egl/wayland: use drmGetNodeTypeFromFd helper instead of opencoding itEmil Velikov2015-08-011-18/+2
| | | | | | Cc: Axel Davy <axel.davy@ens.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Boyan Ding <boyan.j.ding@gmail.com>
* egl/wayland: use designated initializersEmil Velikov2015-08-011-13/+13
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
* egl: implement EGL_KHR_gl_colorspace (v2)Marek Olšák2015-07-221-4/+7
| | | | | | v2: add missing "break" Reviewed-by: Emil Velikov <emil.l.velikov@gmail.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_dri2: Remove trailing whitespacesBoyan Ding2015-06-261-4/+4
| | | | | Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* egl: Use the loader_open_device() helper to do open with CLOEXECDerek Foreman2015-06-231-10/+1
| | | | | | | | | | | 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: set the EGL version in common codeMarek Olšák2015-06-051-8/+0
| | | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl/wayland: Implement swrast supportAxel Davy2015-05-111-16/+688
| | | | | | | Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com>. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* 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 <daniels@collabora.com>. Signed-off-by: Axel Davy <axel.davy@ens.fr>
* egl/wayland: Implement DRI_PRIME supportAxel Davy2015-05-111-15/+89
| | | | | | | | | | | | | | | | | | 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 <airlied@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* egl/wayland: Add support for render-nodesAxel Davy2015-05-111-14/+55
| | | | | | | | | | | | | | 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 <airlied@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Axel Davy <axel.davy@ens.fr> 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-111-1/+4
| | | | | | | | | | | the wl_registry and the wl_queue allocated weren't destroyed. CC: 10.5 <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Axel Davy <axel.davy@ens.fr>
* egl/drivers: include stdint.h where neededEmil Velikov2015-03-051-0/+1
| | | | | | | | | Currently these files are including it indirectly via eglcompiler.h The latter of which will be removed with follow up commits. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* egl, wayland: RGB565 format support on Back-bufferVivek Kasireddy2015-02-231-3/+38
| | | | | | | | | | | | | | | | | | | | | | In current code, color format is always hardcoded to __DRI_IMAGE_FORMAT_ARGB8888 when buffer or DRI image is allocated in function calls, get_back_bo and dri2_get_buffers, regardless of current target's color format. This problem may leads to incorrect render pitch calculation, which eventually ends up with wrong offset of pixels in the frame buffer when the image is in different color format from dri surf's, especially with different bpp. (e.g. RGB565-16bpp) Attached code patch simply adds RGB565 and XRGB8888 cases to two functions noted above to resolve the issue. v2: added a case of XRGB8888, format and bpp selection is done via switch-case (not "if-else" anymore) Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Cc: "10.5" <mesa-stable@lists.freedesktop.org>
* egl/wayland: Fix unused variable warningsChad Versace2015-01-131-2/+0
| | | | Remove ctx variables unused as of 70e8ccc459.
* egl: Inform the client API when ancillary buffers may become undefined.Eric Anholt2015-01-061-11/+1
| | | | | | | This is part of the EGL spec, and is useful for a tiled renderer to avoid the memory bandwidth cost of storing the depth/stencil buffers. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* Use calloc instead of malloc/memset-0Matt Turner2014-12-081-2/+1
| | | | | | | See commit 6bda027e for the Coccinelle script. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* egl: Restrict multiplication in calloc arguments to use compile-time constantsCarl Worth2014-09-031-1/+1
| | | | | | | | | | | | | | | As explained in the previous commit, we want to avoid the possibility of integer-multiplication overflow while allocating buffers. In these two cases, the final allocation size is the product of three values: one variable and two that are fixed constants at compile time. In this commit, we move the explicit multiplication to involve only the compile-time constants, preventing any overflow from that multiplication, (and allowing calloc to catch any potential overflow from the remainining implicit multiplication). Reviewed-by: Matt Turner <mattst88@gmail.com>
* egl: Add EGL_CHROMIUM_sync_control extension.Sarah Sharp2014-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Chromium defined a new GL extension (that isn't registered with Khronos). We need to add an EGL extension for it, so we can migrate ChromeOS on Intel systems to use EGL instead of GLX. http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447 The EGL_CHROMIUM_sync_control extension is similar to the GLX extension OML_sync_control, but only defines one function, eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML. http://www.opengl.org/registry/specs/OML/glx_sync_control.txt Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: Jamey Sharp <jamey@minilop.net> Cc: Ian Romanick <idr@freedesktop.org> Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
* wayland: Fix the logic in disabling the prime capabilityNeil Roberts2014-04-251-1/+1
| | | | | | | | | | It looks like this bit of code is trying to disable the prime capability if the driver doesn't support createImageFromFds. However the logic looks a bit broken and what it would actually do is disable all other capabilities apart from prime. This patch fixes it to actually disable prime. Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl/wayland: Emit EGL_BAD_PARAMETER for eglCreatePlatformPixmapSurfaceChad Versace2014-03-171-1/+17
| | | | | | | | | | From the EGL_EXT_wayland_spec, version 3: It is not valid to call eglCreatePlatformPixmapSurfaceEXT with a <dpy> that belongs to Wayland. Any such call fails and generates EGL_BAD_PARAMETER. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/main: Stop using EGLNative types internallyChad Versace2014-03-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, much of the EGL code uses EGLNativeDisplayType, EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type often does not match the variable's actual type. The concept of EGLNative types are a bad match for Linux, as explained below. And the EGL platform extensions don't use EGLNative types at all. Those extensions attempt to solve cross-platform issues by moving the EGL API away from the EGLNative types. The core of the problem is that eglplatform.h can define each EGLNative type once only, but Linux supports multiple EGL platforms. To work around the problem, Mesa's eglplatform.h contains multiple definitions of each EGLNative type, selected by feature macros. Mesa expects EGL clients to set the feature macro approrpiately. But the feature macros don't work when a single codebase must be built with support for multiple EGL platforms, *such as Mesa itself*. When building libEGL, autotools chooses the EGLNative typedefs based on the first element of '--with-egl-platforms'. For example, '--with-egl-platforms=x11,drm,wayland' defines the following: typedef Display* EGLNativeDisplayType; typedef Window EGLNativeWindowType; typedef Pixmap EGLNativePixmapType; Clearly, this doesn't work well for Wayland and GBM. Mesa works around the problem by casting the EGLNative types to different things in different files. For sanity's sake, and to prepare for the EGL platform extensions, this patch removes from egl/main and egl/dri2 all internal use of the EGLNative types. It replaces them with 'void*' and checks each explicit cast with a static assertion. Also, the patch touches egl_gallium the minimal amount to keep it compatible with eglapi.h. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreateImageKHR by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | | | Add dri2_egl_display_vtbl::create_image, set it for each platform, and let egl_dri2 dispatch eglCreateImageKHR to that. To remove ambiguity, rename egl_dri2.c:dri2_create_image() to dri2_create_image_from_dri(). This prepares for the EGL platform extensions. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreateWaylandBufferFromImageWL by display, not driverChad Versace2014-03-171-6/+4
| | | | | | | | | | Add dri2_egl_display_vtbl::create_wayland_buffer_from_image, set it for each platform, and let egl_dri2 dispatch eglCreateWaylandBufferFromImageWL to that. This prepares for the EGL platform extensions. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Consolidate eglTerminateChad Versace2014-03-171-27/+0
| | | | | | | | | | | | | | | | | | | | egl_dri2.c:dri2_terminate() handled terminating X11 and DRM displays. The Wayland platform implemented its own dri2_wl_terminate(), which was nearly a copy of the common one. To implement the EGL platform extensions, we either need to dispatch eglTerminate per display or define a common implementation for all platforms. This patch chooses consolidation. It removes dri2_wl_terminate() by folding it into the common dri2_terminate(). It was necessary to invert the `if (disp->PlatformDisplay == NULL)` and the switch statement because, unlike DRM and X11, Wayland's terminator performed action even when EGL didn't own the native display. In the inversion, I replaced `disp->PlatformDisplay == NULL` with `dri2_dpy->own_device` because the two expressions are synonymous, but the latter's meaning is clearer. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglPostSubBufferNV by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::post_sub_buffer, set it for each platform, and let egl_dri2 dispatch eglPostSubBufferNV to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglSwapBuffersRegionNOK by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::swap_buffers_region, set it for each platform, and let egl_dri2 dispatch eglSwapBuffersRegionNOK to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCopyBuffers by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::copy_buffers, set it for each platform, and let egl_dri2 dispatch eglCopyBuffers to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch API.QueryBufferAge by display, not driverChad Versace2014-03-171-1/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::query_buffer_age, set it for each platform, and let egl_dri2 dispatch API.QueryBufferAge to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglDestroySurface by display, not driverChad Versace2014-03-171-1/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::destroy_surface, set it for each platform, and let egl_dri2 dispatch eglDestroySurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreatePbufferSurface by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePbufferSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* egl/dri2: Dispatch eglCreatePixmapSurface by display, not driverChad Versace2014-03-171-0/+1
| | | | | | | | | | Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePixmapSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>