Skip to content
Snippets Groups Projects
  1. Apr 19, 2018
  2. Dec 27, 2017
  3. Oct 18, 2017
  4. Oct 03, 2017
  5. Sep 27, 2017
    • Tomasz Figa's avatar
      egl/dri2: Implement swapInterval fallback in a conformant way (v2) · 23a09b4f
      Tomasz Figa authored
      
      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: default avatarTomasz Figa <tfiga@chromium.org>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarChad Versace <chadversary@chromium.org>
      Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
      23a09b4f
  6. Sep 19, 2017
  7. Aug 30, 2017
    • Mark Janes's avatar
      Revert "egl: Allow creation of per surface out fence" · 8c9df0da
      Mark Janes authored
      This reverts commit 13c23b19.
      
      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.
      8c9df0da
    • Zhongmin Wu's avatar
      egl: Allow creation of per surface out fence · 13c23b19
      Zhongmin Wu authored
      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: default avatarZhongmin Wu <zhongmin.wu@intel.com>
      Signed-off-by: default avatarYogesh Marathe <yogesh.marathe@intel.com>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
      13c23b19
  8. Jun 22, 2017
  9. Jun 11, 2017
    • Harish Krupo's avatar
      egl/android: support for EGL_KHR_partial_update · 98275473
      Harish Krupo authored
      
      This patch adds support for the EGL_KHR_partial_update extension for
      android platform. It passes 36/37 tests in dEQP for EGL_KHR_partial_update.
      1 test not supported.
      
      v2: add fallback for eglSetDamageRegionKHR (Tapani)
      
      v3: The native_window_set_surface_damage call is available only from
          Android version 6.0. Reintroduce the ANDROID_VERSION guard and
          advertise extension only if version is >= 6.0. (Emil Velikov)
      
      v4: use newly introduced ANDROID_API_LEVEL guard rather than
          ANDROID_VERSION guard to advertise the extension.The extension
          is advertised only if ANDROID_API_LEVEL >= 23 (Android 6.0 or
          greater). Add fallback function for platforms other than Android.
          Fix possible math overflow. (Emil Velikov)
          Return immediately when n_rects is 0. Place function's entrypoint
          in alphabetical order. (Eric Engestrom)
      
      v5: Replace unnecessary calloc with malloc (Eric)
          Check for BAD_ALLOC error (Emil)
          Check for error in native_window_set_damage_region. (Emil, Tapani,
          Eric).
      
      Signed-off-by: default avatarHarish Krupo <harish.krupo.kps@intel.com>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
      98275473
  10. May 29, 2017
  11. Jan 13, 2017
  12. Dec 09, 2016
  13. Oct 18, 2016
  14. Oct 16, 2016
  15. Oct 14, 2016
  16. Aug 15, 2016
  17. Jun 14, 2016
  18. Apr 26, 2016
  19. Jun 23, 2015
  20. Jun 16, 2015
Loading