aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
...
* egl: drop memset(0) of calloc'ed memoryEric Engestrom2017-10-121-2/+0
| | | | | | | | `_EGLDriver *drv` is a freshly calloc()'ed object, memset(0)'ing some of it is a no-op. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: replace _egl_driver->Unload() callback with a simple free()Eric Engestrom2017-10-124-28/+1
| | | | | | | Bonus: fixes a memleak on haiku when unloading the driver Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri: remove old left-oversNicolai Hähnle2017-10-101-2/+0
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* egl/dri: use createImageFromRenderbuffer2 when availableNicolai Hähnle2017-10-101-3/+20
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* egl/dri: factor out egl_error_from_dri_image_errorNicolai Hähnle2017-10-101-28/+26
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* egl: Simplify the "driver" interfaceAdam Jackson2017-10-054-252/+22
| | | | | | | | | | | | | | | | | | "Driver" isn't a great word for what this layer is, it's effectively a build-time choice about what OS you're targeting. Despite that both of the extant backends totally ignore the display argument, the old code would only set up the backend relative to a display. That causes problems! One problem is it means eglGetProcAddress can generate X or Wayland protocol when it tries to connect to a default display so it can call into the backend, which is, you know, completely bonkers. Any other EGL API that doesn't reference a display, like EGL_EXT_device_query, would have the same issue. Fortunately this is a problem that can be solved with the delete key. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl/wayland: Don't use dmabuf with no modifiersDaniel Stone2017-10-041-7/+11
| | | | | | | | | | | | | | | | | The dmabuf interface requires a valid modifier to be sent. If we don't explicitly get a modifier from the driver, we can't know what to send; it must be inferred from legacy side-channels (or assumed to linear, if none exists). If we have no modifier, then we can only have a single-plane format anyway, so fall back to the old wl_drm buffer import path. Fixes: a65db0ad1c ("st/dri: don't expose modifiers in EGL if the driver doesn't implement them") Fixes: 02cc359372 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reported-by: Andy Furniss <[email protected]> Cc: Marek Olšák <[email protected]>
* egl/wayland: Check queryImage return for wl_bufferDaniel Stone2017-10-041-15/+41
| | | | | | | | | | | | | | | When creating a wl_buffer from a DRIImage, we extract all the DRIImage information via queryImage. Check whether or not it actually succeeds, either bailing out if the query was critical, or providing sensible fallbacks for information which was not available in older DRIImage versions. Fixes: a65db0ad1c ("st/dri: don't expose modifiers in EGL if the driver doesn't implement them") Fixes: 02cc359372 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reported-by: Andy Furniss <[email protected]> Cc: Marek Olšák <[email protected]>
* wayland-egl: adds CFLAGS for wayland.egl.h includeTobias Klausmann2017-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with commit ab0589c6ed ("wayland-egl: remove no longer needed wayland-client dependency") the wayland-egl.h include was missing leading to a build failure: CC wayland-egl.lo wayland-egl.c:33:10: fatal error: wayland-egl.h: No such file or directory #include "wayland-egl.h" ^~~~~~~~~~~~~~~ Strictly speaking we should be checking for wayland-egl in configure and propagating its CFLAGS here. Yet again, the current wayland-egl split is bonkers as the Wayland repo provides single header, no pkg-config file or library. That will be resolved at a later stage, but in the meanwhile fix the build. Fixes: ab0589c6ed ("wayland-egl: remove no longer needed wayland-client dependency") Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: add some text about CFLAGS and current wayland-egl situation] Signed-off-by: Emil Velikov <[email protected]>
* egl/surfaceless: Use KMS swrast fallbackGurchetan Singh2017-10-031-4/+16
| | | | | | | | | | | | The kms_swrast extension is an actively developed software fallback, and platform_surfaceless can use it if there are no available hardware drivers. v2: Split into 2 patches, use booleans, check LIBGL_ALWAYS_SOFTWARE, and modify the eglLog level (Emil, Eric, Tomasz). Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/surfaceless: add probe device helper functionGurchetan Singh2017-10-031-28/+39
| | | | | | | | This will help us initialize a software driver, if it's needed or requested. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* wayland-egl: rework and simplify wl_egl_window initializationEmil Velikov2017-10-021-10/+16
| | | | | | | | | | | | | | | Use calloc instead of malloc + explicitly zeroing the different fields. We need special handling for the version field which is of type const intptr_t. As we're here document why keeping the constness is a good idea. The wl_egl_window_resize() call is replaced with an explicit set of the width/height. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: move WL_EGL_EXPORT declaration to where it's usedEmil Velikov2017-10-022-7/+7
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: use C99 commentsEmil Velikov2017-10-021-3/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: remove no longer needed wayland-client dependencyEmil Velikov2017-10-023-4/+1
| | | | | | | | | Was required for wl_surface, which is opaque and forward declared with earlier patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: add stdint.h include for intptr_tEmil Velikov2017-10-021-0/+1
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: forward declare struct wl_surfaceEmil Velikov2017-10-021-0/+2
| | | | | | | | | It makes the header self-contained and with later commit we'll remove the unnecessary wayland-client.h include. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: rename wayland-egl-{priv,backend}.hEmil Velikov2017-10-025-5/+5
| | | | | | | | In preparation to lifting the whole thing out as a separate library. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* egl/dri: link directly to libglapi.soEmil Velikov2017-10-024-40/+7
| | | | | | | | | | | | | | | | | | | | | | | Shared glapi (libglapi.so) has been a requirement for years, in order to build EGL. Remove the no longer necessary dlopen/dlsym dance and link to the library directly. This allows us to remove a handful of platform specific workarounds, due to the different name of the library. v2: - Android: export the include dir (RobH) - Drop unused local variable (Eric) Cc: Jonathan Gray <[email protected]> Cc: Jon Turney <[email protected]> Cc: Julien Isorce <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v1) Tested-by: Tomasz Figa <[email protected]> (v1) Tested-by: Rob Herring <[email protected]>
* egl/wayland: simplify LIBGL_ALWAYS_SOFTWARE logicEric Engestrom2017-10-021-8/+4
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: don't use the template keywordMarek Olšák2017-09-301-3/+3
| | | | | | for C++ editors Reviewed-by: Brian Paul <[email protected]>
* meson: Add build Intel "anv" vulkan driverDylan Baker2017-09-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows building and installing the Intel "anv" Vulkan driver using meson and ninja, the driver has been tested against the CTS and has seems to pass the same series of tests (they both segfault when the CTS tries to run wayland wsi tests). There are still a mess of TODO, XXX, and FIXME comments in here. Those are mostly for meson bugs I'm trying to fix, or for additional things to implement for other drivers/features. I have configured all intermediate libraries and optional tools to not build by default, meaning they will only be built if they're pulled in as a dependency of a target that will actually be installed) this allows us to avoid massive if chains, while ensuring that only the bits that need to be built are. v2: - enable anv, x11, and wayland by default - add configure option to disable valgrind v3: - fix typo in meson_options (Nicholas) v4: - Remove dead code (Eric) - Remove change to generator that was from v0 (Eric) - replace if chain with loop (Eric) - Fix typos (Eric) - define HAVE_DLOPEN for both libdl and builtin dl cases (Eric) v5: - rebase on util string buffer implementation Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v4)
* egl/dri2: Implement swapInterval fallback in a conformant way (v2)Tomasz Figa2017-09-276-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dri2_fallback_swap_interval() currently used to stub out swap interval support in Android backend does nothing besides returning EGL_FALSE. This causes at least one known application (Android Snapchat) to fail due to an unexpected error and my loose interpretation of the EGL 1.5 specification justifies it. Relevant quote below: The function EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); specifies the minimum number of video frame periods per buffer swap for the draw surface of the current context, for the current rendering API. [...] The parameter interval specifies the minimum number of video frames that are displayed before a buffer swap will occur. The interval specified by the function applies to the draw surface bound to the context that is current on the calling thread. [...] interval is silently clamped to minimum and maximum implementation dependent values before being stored; these values are defined by EGLConfig attributes EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL respectively. The default swap interval is 1. Even though it does not specify the exact behavior if the platform does not support changing the swap interval, the default assumed state is the swap interval of 1, which I interpret as a value that eglSwapInterval() should succeed if called with, even if there is no ability to change the interval (but there is no change requested). Moreover, since the behavior is defined to clamp the requested value to minimum and maximum and at least the default value of 1 must be present in the range, the implementation might be expected to have a valid range, which in case of the feature being unsupported, would correspond to {1} and any request might be expected to be clamped to this value. Fix this by defaulting dri2_dpy's min_swap_interval, max_swap_interval and default_swap_interval to 1 in dri2_setup_screen() and let platforms, which support this functionality set their own values after this function returns. Thanks to patches merged earlier, we can also remove the dri2_fallback_swap_interval() completely, as with a singular range it would not be called anyway. v2: Remove dri2_fallback_swap_interval() completely thanks to higher layer already clamping the requested interval and not calling the driver layer if the clamped value is the same as current. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* Revert "wayland-drm: constify the callbacks struct"Daniel Stone2017-09-263-8/+12
| | | | | | | | | | | | | | | The wayland-drm callback struct is referenced, rather than duplicated, inside wayland-drm. Constifying this struct involved moving it on to the stack; as a result, starting any EGL client on Wayland called into random stack memory, and killed the compositor. This reverts commit 1d0be5b3fe548ee33d4520092f583c76d42510a6 and 39d539e321c6c97433a15660c9d9a20ad8657ff0. Signed-off-by: Daniel Stone <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Krzysztof Sobiecki <[email protected]> Fixes: 1d0be5b3fe54 ("wayland-drm: constify the callbacks struct")
* egl: fix build fallouts from 1d0be5b3fe5Krzysztof Sobiecki2017-09-192-2/+2
| | | | | Fixes: 1d0be5b3fe5 ("wayland-drm: constify the callbacks struct") Reviewed-by: Emil Velikov <[email protected]>
* egl: use switch statements over if/else chainEmil Velikov2017-09-191-31/+28
| | | | | | | Shorter, explicit and consistent with the rest of the co debase. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: remove unneeded braces around since line if statementsEmil Velikov2017-09-191-9/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: simplify _eglDebugReport* APIEmil Velikov2017-09-193-49/+14
| | | | | | | | | | | | | | Instead of having three, almost identical but not quite, _eglDebugReport* functions, simply fold them into one. While doing so drop the unnecessary arguments 'command' and 'objectLabel'. Former is identical to funcName, while the latter is already stored (yet unused) in _EGLThreadInfo::CurrentObjectLabel. Cc: Kyle Brenneman <[email protected]> Cc: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (IRC)
* egl: use _eglError's 'msg' as an actual message in EGL_KHR_debugEmil Velikov2017-09-191-1/+1
| | | | | | | | | | | | | | | | Seemingly, the original intent behind _eglError's 'msg' was aimed to provide a function name. At some point, people started using it the way EGL_KHR_debug's callback() message is meant to be used. Aka providing meaningful information to the developer/user. Swap the funcName/msg argument order in the _eglDebugReport() call. The 'funcName' variable is implicitly set, props to the _eglSetFuncName() call at the start of each public entrypoint. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* configure.ac: split the wayland client/server confusionEmil Velikov2017-09-193-4/+6
| | | | | | | | | | | | | | | | | | | | At the moment wayland-clients, such as the Vulkan drivers were over-linking against libwayland-server.so. That went unnoticed, since both client and server code uses the wl*interface symbols, which are present in both libwayland-client.so and libwayland-server.so. I've looked at correcting that, although that's orthogonal to this fix. Note: wayland-egl does _not_ depend on wayland-client, although it does need wayland-egl.h. There's no distinct package that provides it (I have a WIP on the topic) so current solution will do for now. v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: constify the callbacks structEmil Velikov2017-09-192-11/+7
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: add wl_display/wl_resource forward declarationsEmil Velikov2017-09-191-0/+2
| | | | | | | ... making the header self-contained. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* configure.ac: define WL_HIDE_DEPRECATED at global scaleEmil Velikov2017-09-191-2/+0
| | | | | | | | | | | | | | | Due to GCC feature described in previous commit, the expected deprecation warnings may be missing. Set the WL_HIDE_DEPRECATED macro which will omit the deprecated functionality, resulting in more distinct build issues. That is safe since the symbols guarded within the macro is static. Signed-off-by: Emil Velikov <[email protected]> Suggested-by: Pekka Paalanen <[email protected]> Acked-by: Pekka Paalanen <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: avoid deprecated use of struct wl_resourceMicah Fedke2017-09-191-3/+3
| | | | | | | | | | | | | | | | | | | Wayland v1.2 with commit 1488c96a5db ("Add accessor functions for wl_resource and deprecate wl_client_add_resource") paves the way towards making wl_resource opaque. Namely, new helpers were introduced and the struct was annotated as deprecated. Since wayland headers are normally installed in /usr/include, which is in -isystem, GCC did not generate warnings as documented in the manual. "Warnings from system headers are normally suppressed..." Signed-off-by: Micah Fedke <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]> [Emil Velikov: add commit message] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: remove unused wayland_drm_buffer_get_{format,buffer}Emil Velikov2017-09-192-18/+0
| | | | | | | | | | | Unused anywhere throughout the codebase. We could start using it, although that contradicts to an evil plan* of mine. * Only wayland servers will make use of the static library, providing actual distinction between server vs client. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: remove hardcoded enum wl_drm_formatEmil Velikov2017-09-191-64/+0
| | | | | | | The exact same copy is generated in the client/server protocol header. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/android: Use per surface out fenceZhongmin Wu2017-09-191-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | Use the plumbing introduced with previous patch to interact with the Android framework. Namely: currently we use an invalid fd of -1 for our calls to ANativeWindow::{queue,cancel}Buffer. At the same time applications (like flatland) may rely on it being a valid one. Thus as they attempt to query the timestamp of the fence, they get unexpected results/behaviour. In the case of flatland - the benchmark hang inside getSignalTime(). Make use of the out fence and pass the correct fd to Android. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655 Signed-off-by: Zhongmin Wu <[email protected]> Signed-off-by: Yogesh Marathe <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> [Emil Velikov: split from larger patch] Signed-off-by: Emil Velikov <[email protected]>
* egl: Allow creation of per surface out fenceZhongmin Wu2017-09-198-6/+93
| | | | | | | | | | | | | | Add plumbing to allow creation of per display surface out fence. This can be used to implement explicit sync. One user of which is Android - which will be addressed with next commit. Signed-off-by: Zhongmin Wu <[email protected]> Signed-off-by: Yogesh Marathe <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> [Emil Velikov: reorder so there's no intermetent regressions, split] Signed-off-by: Emil Velikov <[email protected]>
* egl: Wrap dri3 surface primitive around dri2 egl surfaceYogesh Marathe2017-09-192-11/+11
| | | | | | | | | | | | | | | | Originally dri3 egl surface was wrapped around _EGLSurface. With next commit we'll add additional attributes, which will be checked from generic code. Thus in order to access that we need to use dri2_egl_surface. The name of the latter is a misnomer - it should really be dri or dri_common... Signed-off-by: Yogesh Marathe <[email protected]> [Emil Velikov: commit message, squash the patches appropriately, add relevant _eglInitSurface hunk to prevent build breakage] Signed-off-by: Emil Velikov <[email protected]>
* egl+glx: turn LIBGL_DRI3_DISABLE into a booleanEric Engestrom2017-09-121-1/+1
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `DISABLE=true` instead of `DISABLE=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl+glx: turn LIBGL_ALWAYS_SOFTWARE into a booleanEric Engestrom2017-09-125-3/+8
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/x11: advertise __DRI_USE_INVALIDATE for DRI2Emil Velikov2017-09-061-0/+1
| | | | | | | | | | | | | | | | | | | Back in 2012 (commit 1e7776ca2bc - egl: Remove bogus invalidate code.) the loader use of invalidate() was purged as "bogus". One of the factors defining that statement was the lack of the loader-side invalidate extension - __DRI_USE_INVALIDATE. Since then the commit was reverted (commit eed0a80137d - egl: Restore "bogus" DRI2 invalidate event code.), always performing the driver invalidate call, although the loader was never updated to expose the extension. Do so allowing the driver to do fine grained tuning. Cc: Eric Anholt <[email protected]> Cc: Kenneth Graunke <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]
* egl/x11/dri3: adding missing __DRI_BACKGROUND_CALLABLE extensionEmil Velikov2017-09-061-0/+1
| | | | | | | Fixes: 3b7b6adf3ac ("egl: Implement __DRI_BACKGROUND_CALLABLE") Cc: Timothy Arceri <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: remove unused 'Screens' array from _egl_displayTapani Pälli2017-09-061-1/+0
| | | | | | | | | This was used by EGL_MESA_screen_surface that has been removed in commit 7a58262e58d8edac3308777def0950032628edee. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Revert "egl: Allow creation of per surface out fence"Mark Janes2017-08-308-106/+18
| | | | | | | | | This reverts commit 13c23b19d0b3b965d666498eb759e63fc4a625d9. Mesa CI was brought down by this commit, with: mesa/drivers/dri/i965/brw_sync.c:491: brw_dri_create_fence_fd: Assertion `brw->screen->has_exec_fence' failed.
* egl/dri2: only destroy created objectsMichael Olbrich2017-08-301-3/+6
| | | | | | | | | | dri2_display_destroy may be called by dri2_initialize_wayland_drm() if initialization fails. In this case, these objects may not be initialized. Cc: [email protected] Signed-off-by: Michael Olbrich <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Allow creation of per surface out fenceZhongmin Wu2017-08-308-18/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add plumbing to allow creation of per display surface out fence. Currently enabled only on android, since the system expects a valid fd in ANativeWindow::{queue,cancel}Buffer. We pass a fd of -1 with which native applications such as flatland fail. The patch enables explicit sync on android and fixes one of the functional issue for apps or buffer consumers which depend upon fence and its timestamp. v2: a) Also implement the fence in cancelBuffer. b) The last sync fence is stored in drawable object rather than brw context. c) format clear. v3: a) Save the last fence fd in DRI Context object. b) Return the last fence if the batch buffer is empty and nothing to be flushed when _intel_batchbuffer_flush_fence c) Add the new interface in vbtl to set the retrieve fence v3.1 a) close fd in the new vbtl interface on none Android platform v4: a) The last fence is saved in brw context. b) The retrieve fd is for all the platform but not just Android c) Add a uniform dri2 interface to initialize the surface. v4.1: a) make some changes of variable name. b) the patch is broken into two patches. v4.2: a) Add a deinit interface for surface to clear the out fence v5: a) Add enable_out_fence to init, platform sets it true or false b) Change get fd to update fd and check for fence c) Commit description updated v6: a) Heading and commit description updated b) enable_out_fence is set only if fence is supported c) Review comments on function names d) Test with standalone patch, resolves the bug v6.1: Check for old display fence reverted v6.2: enable_out_fence initialized to false by default, dri2_surf_update_fence_fd updated, deinit changed to fini Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655 Signed-off-by: Zhongmin Wu <[email protected]> Signed-off-by: Yogesh Marathe <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* egl/wayland: make sure HAS_$FORMAT is set for wl_dmabufEmil Velikov2017-08-291-0/+3
| | | | | | | | | Otherwise eglCreateWaylandBufferFromImageWL will fail, since we have no "supported" format. Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: group wl_win specific code togetherEmil Velikov2017-08-291-4/+3
| | | | | | | | | Make the code a bit easier to follow. There should be no functional change since none of the bits set are accessible until the eglCreateWindowSurface call is complete. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: remove dri2_surf width/height double init.Emil Velikov2017-08-291-3/+0
| | | | | | | | | | | The dimensions are already set [to 0 or the value provided by the attributes list] by the _eglInitSurface() call further up. The values are updated, as the DRI driver calls the DRI2/IMAGE_LOADER' get_buffers, shortly before making use of the values. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Daniel Stone <[email protected]>