aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
...
* egl/wayland: set correct format with wl_dmabuf as wl_drm is missingEmil Velikov2017-08-291-1/+1
| | | | | | | | | | For most/all cases today, we have wl_drm available alongside wl_dmabuf. Yet in the long run, we want to make sure the latter can operate without any traces of the former. Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* egl/wayland: update comment to reflect wl_dmabuf presenceEmil Velikov2017-08-291-1/+1
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* egl/wayland: polish object teardown in dri2_wl_destroy_surfaceEmil Velikov2017-08-291-2/+2
| | | | | | | | | | The wl_drm wrapper is created before the wl display/surface ones. Thus make sure we destroy it after them. In reality it should not make any difference either way. Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* egl/wayland: plug leaks in dri2_wl_create_window_surface() error pathEmil Velikov2017-08-291-2/+6
| | | | | | | | We forgot to teardown the wl display/surface wrappers. Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* egl: simplify refcounting after screen creationEmil Velikov2017-08-291-9/+5
| | | | | | | | | | If the specific initialize was successfull, dri2_egl_display() will return a non NULL pointer. Thus we can drop the check and flatten the codeflow. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Daniel Stone <daniels@collabora.com>
* egl: don't NULL deref the .get_capabilities function pointerEmil Velikov2017-08-261-1/+2
| | | | | | | | | | | | | One could easily introduce version 3 of the DRI2fenceExtension, extending the struct, while not implementing the above function. Thus we'll end up with NULL pointer, and dereferencing it won't fare too well. Fixes: 0201f01dc4e ("egl: add EGL_ANDROID_native_fence_sync") Cc: Rob Clark <robclark@freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl/drm: Don't "fall back" to /dev/dri/card0 if the first open failsAdam Jackson2017-08-251-2/+0
| | | | | | | | The snprintf stuff here already constructs the right name for the device node, and if it doesn't, you configured Mesa wrong, don't do that. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* Revert "egl/android: add missing include"Eric Engestrom2017-08-251-1/+0
| | | | | | | | | | | | | | This reverts commit 688d866eca8943f09cd846ffb045e18f6ec0677c. The include I added in 688d866eca isn't actually useful, as it only declares the opaque struct ANativeWindow. However, this caused build issues for android-x86 [1] due to the header being moved in Android O. [1] https://lists.freedesktop.org/archives/mesa-dev/2017-August/167626.html Fixes: 688d866eca8943f09cd8 "egl/android: add missing include" Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl/wayland: Use roundtrips when awaiting buffer releaseKai Chen2017-08-251-2/+7
| | | | | | | | | | | | | | | | | | In get_back_bo, we use wl_display_dispatch_queue() to block and wait for a buffer release event. However, not all Wayland compositors flush the client socket on posting a buffer-release event, so by only blocking client-side, we may block indefinitely, or at least need to wait for an input event / frame completion to arrive for the compositor to flush. We now use dispatch_queue as a first pass, but if our entire buffer pool is exhausted, use a roundtrip (an immediately-triggered wl_callback) to ensure that the compositor flushes out our release event immediately. [daniels: Modified comment and commit message.] Signed-off-by: Kai Chen <kai.chen@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> CC: <mesa-stable@lists.freedesktop.org>
* egl/android: add missing includeEric Engestrom2017-08-241-0/+1
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Rob Herring <robh@kernel.org>
* egl: deduplicate allocations of local buffer over each platform backend (v2)Gwan-gyeong Mun2017-08-225-115/+71
| | | | | | | | | | | | | | | | | | | | | | | | | platform_drm, platform_wayland and platform_android have similiar local buffer allocation routines. For deduplicating, it unifies dri2_egl_surface's local buffer allocation routines. And it polishes inconsistent indentations. Note that as dri2_wl_get_buffers_with_format() have not make a __DRI_BUFFER_BACK_LEFT attachment buffer for local_buffers, new helper function, dri2_egl_surface_free_local_buffers(), will drop the __DRI_BUFFER_BACK_LEFT check. So if other platforms use new helper functions, we have to ensure not to make __DRI_BUFFER_BACK_LEFT attachment buffer for local_buffers. v2: Fixes from Emil's review: a) Make local_buffers variable, dri2_egl_surface_alloc_local_buffer() and dri2_egl_surface_free_local_buffers() unconditionally. b) Preserve the original codeflow for error_path and normal_path. c) Add note on commit messages for dropping of __DRI_BUFFER_BACK_LEFT check. c) Rollback the unrelated whitespace changes. d) Add a missing blank line. Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
* egl: Fix inclusion of egl.h+mesa_glinterop.hMatt Turner2017-08-212-2/+2
| | | | | | | | Previously clang would warn about redefinition of typedef EGLDisplay. Avoid this by adding preprocessor guards to mesa_glinterop.h and including it after EGL.h is indirectly included. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* egl: Add dma_buf_import_modifiers for glvndDaniel Stone2017-08-211-0/+4
| | | | | | | | | | Make sure we advertise the new entrypoints to libglvnd's EGL dispatch. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reported-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101982 Fixes: 4c412293d0e ("egl: advertise EGL_EXT_image_dma_buf_import_modifiers")
* loader_dri3/glx/egl: Optionally use a blit context for blitting operationsThomas Hellstrom2017-08-173-1/+15
| | | | | | | | | | | | | The code was relying on us always having a current context for client local image blit operations. Otherwise the blit would be skipped. However, glxSwapBuffers, for example, doesn't require a current context and that was a common problem in the dri1 era. It seems the problem has resurfaced with dri3. If we don't have a current context when we want to blit, try creating a private dri context and maintain a context cache of a single context. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callbackThomas Hellstrom2017-08-171-12/+0
| | | | | | | | | | | It's not very usable since in the rare, but definitely existing case that we don't have a current context, it will return NULL. Presumably it will always be safe to use the dri screen the drawable was created with for operations on that drawable. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* egl: Update headers from KhronosDaniel Stone2017-08-111-29/+597
| | | | | | Taken from egl-registry 7d68647c4dab. Signed-off-by: Daniel Stone <daniels@collabora.com>
* egl/dri2: Allow modifiers to add FDs to importsDaniel Stone2017-08-111-19/+19
| | | | | | | | | When using dmabuf import, make sure that the modifier is actually allowed to add planes to the base format, as implied by the comment. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
* egl: avoid eglCreatePlatform*Surface{EXT,} crash with invalid dpyEmil Velikov2017-08-101-2/+2
| | | | | | | | | | | | | | | | | | If we have an invalid display fed into the functions, the display lookup will return NULL. Thus as we attempt to get the platform type, we'll deref. it leading to a crash. Keep in mind that this will not happen if Mesa is built without X11 or when the legacy eglCreate*Surface codepaths are used. A similar check was added with earlier commit 5e97b8f5ce9 ("egl: Fix crashes in eglCreate*Surface), although it was only applicable when the surfaceless platform is built. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl/drm: rename dri2_drm_create_surface()Emil Velikov2017-08-101-13/+4
| | | | | | | | | | | | The function can handle only window surfaces, so let's rename it accordingly, killing the wrapper around it. v2: Use native_window in the function args. list. Suggested-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl/drm: remove unreachable code in dri2_drm_create_surface()Emil Velikov2017-08-101-13/+7
| | | | | | | | | | | The function can be called only when the type is EGL_WINDOW_BIT. Remove the unneeded switch statement. v2: Rename the local variable window to surface (Eric) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v1)
* egl/x11: pass NULL instead of XCB_WINDOW_NONE as native_surfaceEmil Velikov2017-08-102-2/+2
| | | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl: Clean up native_type vs drawable messMatt Turner2017-08-102-8/+5
| | | | | | | | | | | | | The next patch is going to stop passing XCB_WINDOW_NONE (of type xcb_window_enum_t) as an argument where these functions expect a void *, which clang does not appreciate. This patch cleans things up to better convince me and reviewers that it's safe to do that. v2: Emil Velikov: rebase/integrate with series Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl: handle BAD_NATIVE_PIXMAP further up the stackEmil Velikov2017-08-102-5/+3
| | | | | | | | | | | | The basic (null) check is identical across all backends. Just move it to the top. v2: - Split the WINDOW vs PIXMAP into separate patches - Move check after the dpy and config - dEQP expects so Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl: drop unreachable BAD_NATIVE_WINDOW conditionsEmil Velikov2017-08-104-15/+3
| | | | | | | | | | | | | The code in _eglCreateWindowSurfaceCommon() already has a NULL check which handles the condition. There's no point in checking again further down the stack. v2: Split the WINDOW vs PIXMAP into separate patches v3: Resolve typos, s/EGL_PIXMAP_BIT_BIT/EGL_PIXMAP_BIT/ Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl: add dri2_setup_swap_interval helperEmil Velikov2017-08-104-63/+49
| | | | | | | | | | | | | | | | The current two implementations - X11 and Wayland were identical, barrind the upper limit. Instead of having same code twice - introduce a helper and pass the limit as an argument. Thus as Android/DRM/others get support - they only need to call the function ;-) v2: Rebase on top of keeping ::swap_available Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
* egl: whitespace cleanup in eglapi.cEric Engestrom2017-08-091-25/+25
| | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: refactor dri2_query_surface, swrastGetDrawableInfoTapani Pälli2017-08-091-7/+18
| | | | | | | | | | | | | | Currently swrastGetDrawableInfo always initializes w and h, patch refactors function as x11_get_drawable_info that returns success and sets the values only if no error happened. Add swrastGetDrawableInfo wrapper function as expected by DRI extension. v2: init w,y,w,h in swrastGetDrawableInfo (Eric) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reported-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl/dri2: add image extension such it's usable by swrast driverGurchetan Singh2017-08-073-2/+5
| | | | | | | | | | | | | | | | | | Otherwise, this extension is not visible to the EGL users who use the swrast driver. This will allow the swrast driver to use eglCreateImageKHR, provided the target is EGL_GL_TEXTURE_2D_KHR or EGL_GL_RENDERBUFFER_KHR. Note we still have to implement the create from render buffer path. v2: add it to optional_core_extensions instead of swrast_core_extensions, so it's not a requirement (Emil) v3: Merge egl/dri2 changes together, also add support for platform_wayland (Emil) Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
* loader: drop the [gs]et_swap_interval callbacksEmil Velikov2017-08-041-18/+1
| | | | | | | | | | Having two callbacks to manage a single int seems like an overkill. Use a cached copy and update that when needed. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> --- Might want to look if the dimensions dance in .query_surface ... speaking of which close to nobody implements that ...
* egl/x11: don't leak xfixes_query in the error pathEmil Velikov2017-08-041-0/+1
| | | | | | | | | If we get a xfixes v1.x we'll error out, without freeing the xfixes_query reply. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* loader: rework xmlconfig dependencyEmil Velikov2017-08-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | Currently xmlconfig is conditionally used, only when --enable-dri is available. As the library has moved to src/util and has wider wisebase, this guard is no longer correct. Strictly speaking - it wasn't since the introduction of xmlconfig into st/nine a while ago. Unconditionally enable xmlconfig and drop the linking. As said before there's other users of the library, so depending on the configure options we will get multiple definitions of said symbols. NOTE: To avoid breaking other combinations, this commit adds the xmlconfig link to the required places - throughout gallium and the DRI loaders. Cc: Aaron Watry <awatry@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
* egl: check the correct function pointerEric Engestrom2017-08-022-1/+3
| | | | | | | | | | `.swap_interval` != `.SwapInterval`... Fixes: 991ec1b81a76de24fd01 "egl: make platform's SwapInterval() optional" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102015 Cc: Cedric Sodhi <manday@openmail.cc> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Cedric Sodhi <manday@openmail.cc>
* egl/drm: Fix misused x and y offsets in swrast_get_image()Gwan-gyeong Mun2017-08-011-4/+19
| | | | | | | | | | | | | It fixes misused x and y variables on the calculation of the memory copy regions. Cc: Giovanni Campagna <gcampagna@src.gnome.org> Fixes: 8430af5ebe1ee8119e14 "Add support for swrast to the DRM EGL platform" Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> [Eric: use gbm_bo_get_bpp() instead of local function, split clamp patch] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl/drm: Fix misused x and y offsets in swrast_put_image2()Gwan-gyeong Mun2017-08-011-2/+17
| | | | | | | | | | | | | It fixes misused x and y variables on the calculation of the memory copy regions. Cc: Giovanni Campagna <gcampagna@src.gnome.org> Fixes: 8430af5ebe1ee8119e14 "Add support for swrast to the DRM EGL platform" Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> [Eric: use gbm_bo_get_bpp() instead of local function, split clamp patch] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
* egl: remove unnecessary empty array elementEric Engestrom2017-08-011-3/+2
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: split enums to make use of -WswitchEric Engestrom2017-08-011-10/+8
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: use designated initaliser for _eglGlobalEric Engestrom2017-08-011-9/+9
| | | | | | | | Turn comments into actual code, that the compiler can check for us :) (Speaking of, one of the comments had a typo. Challenge: find it) Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: make platform's SwapInterval() optionalEric Engestrom2017-08-012-12/+1
| | | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* loader: remove clamp_swap_interval()Eric Engestrom2017-08-011-14/+0
| | | | | | | | | | As of last commit, no invalid swap interval can be stored, so there's no need to sanitize the values when reading them anymore. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* egl: deduplicate swap interval clamping logicEric Engestrom2017-08-014-40/+14
| | | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* Android: fix compile error for DRI2 loader getCapabilityRob Herring2017-07-311-1/+1
| | | | | | | | | | Fix compile failure from commit 1bf703e4ea5c ("dri_interface,egl,gallium: only expose RGBA visuals on Android"). Fixes: 1bf703e4ea5c ("dri_interface,egl,gallium: only expose RGBA visuals on Android") Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Rob Herring <robh@kernel.org>
* dri_interface,egl,gallium: only expose RGBA visuals on AndroidMarek Olšák2017-07-311-2/+16
| | | | | | | | | | | | | | X/GLX can't handle them. This removes almost 500 GLX visuals that were incorrectly exposed. Add an optional getCapability callback for querying what the loader can do. I'm not splitting this patch, because it's already too small. v2: also add the callback to __DRIimageLoaderExtension Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Cc: 17.2 <mesa-stable@lists.freedesktop.org>
* egl: move KHR_no_error vs debug/robustness check further downGrigori Goronzy2017-07-261-11/+10
| | | | | | | | | | | | We'll fail to flag an error if the context flags appear after the no-error attribute in the context attribute list. Delay the check to after attribute parsing to fix this. Fixes: 4909519a665 ("egl: Add EGL_KHR_create_context_no_error support") Cc: mesa-stable@lists.freedesktop.org [Emil Velikov: add fixes/stable tags, commit message polish] Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: fix whitespace issues from eglimage codeTapani Pälli2017-07-251-10/+10
| | | | | Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl/wayland: Ignore invalid modifiersDaniel Stone2017-07-241-0/+4
| | | | | | | | | | | If the underlying driver does not support modifiers, dmabuf will still advertise formats through the 'modifier' event, but send them with an invalid modifier. Ignore them if this is the case, rather than passing them through to the driver. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
* egl: guard wayland header dep. tracking behind HAVE_PLATFORM_WAYLAND17.2-branchpointEmil Velikov2017-07-241-1/+1
| | | | | | | | | Otherwise we'll attemt to generate the header even we don't need to. In that case the dependencies may not be met, leading to build failure. Fixes: 166852e "configure.ac: rework wayland-protocols handling" Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* wayland-egl: update the SHA1 of the commit introducing v3Emil Velikov2017-07-241-1/+1
| | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* wayland-egl: Update ABI checkerMiguel A. Vico2017-07-241-15/+75
| | | | | | | | | | This change updates wayland-egl-abi-check.c with the latest changes to wl_egl_window. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* wayland-egl: Make wl_egl_window a versioned structMiguel A. Vico2017-07-243-2/+24
| | | | | | | | | | | | | | | | | | | | | | We need wl_egl_window to be a versioned struct in order to keep track of ABI changes. This change makes the first member of wl_egl_window the version number. An heuristic in the wayland driver is added so that we don't break backwards compatibility: - If the first field (version) is an actual pointer, it is an old implementation of wl_egl_window, and version points to the wl_surface proxy. - Else, the first field is the version number, and we have wl_egl_window::surface pointing to the wl_surface proxy. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: Fix _eglPointerIsDereferencable() to ignore page residencyMiguel A. Vico2017-07-241-1/+12
| | | | | | | | | | | | | | | | | mincore() returns 0 on success, and -1 on failure. The last parameter is a vector of bytes with one entry for each page queried. mincore returns page residency information in the first bit of each byte in the vector. Residency doesn't actually matter when determining whether a pointer is dereferenceable, so the output vector can be ignored. What matters is whether mincore succeeds. See: http://man7.org/linux/man-pages/man2/mincore.2.html Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>