EGL_KHR_partial_update support

Submitted by Boris Brezillon on June 25, 2019, 4:37 p.m.

Details

Reviewer None
Submitted June 25, 2019, 4:37 p.m.
Last Updated Aug. 12, 2019, 10:07 a.m.
Revision 4

Cover Letter(s)

Revision 1
      This is an attempt at resurrecting Daniel's MR [1] which was already
resurrecting Harish's EGL_KHR_partial_update series [2]. This version
implements Marek's suggestion to pass the set_damage_region() directly
to the gallium driver and let it decide how to handle the request. Some
drivers might just calculate the damage extent (as done in Daniel's
initial proposal and in the panfrost implementation), others might do
extra optimizations like trying to reduce the area we're supposed to
reload (only valid for tile-based rendering) even further.

This patch series has been tested with weston (see Daniel's MR[3]) on
panfrost. Note that the panfrost implementation is rather simple (just
limits the rendering area to the damage extent and picks the biggest
damage rect as the only damage region) but we can improve it if we feel
the need.

Any feedback and suggestions on how to do it better are welcome.

Regards,

Boris

[1]https://gitlab.freedesktop.org/mesa/mesa/merge_requests/227
[2]https://patchwork.freedesktop.org/series/45915/#rev2
[3]https://gitlab.freedesktop.org/wayland/weston/merge_requests/106

Boris Brezillon (1):
  panfrost: Add support for KHR_partial_update()

Daniel Stone (2):
  dri_interface: add DRI2_BufferDamage interface
  st/dri2: Implement DRI2bufferDamageExtension

Harish Krupo (2):
  egl/android: Delete set_damage_region from egl dri vtbl
  egl/dri: Use __DRI2_DAMAGE extension for KHR_partial_update

 include/GL/internal/dri_interface.h         | 43 +++++++++++++++
 src/egl/drivers/dri2/egl_dri2.c             | 54 +++++++++++++++++--
 src/egl/drivers/dri2/egl_dri2.h             |  5 +-
 src/egl/drivers/dri2/egl_dri2_fallbacks.h   |  9 ----
 src/egl/drivers/dri2/platform_android.c     | 45 ----------------
 src/egl/drivers/dri2/platform_device.c      |  1 -
 src/egl/drivers/dri2/platform_drm.c         |  1 -
 src/egl/drivers/dri2/platform_surfaceless.c |  1 -
 src/egl/drivers/dri2/platform_wayland.c     |  1 -
 src/egl/drivers/dri2/platform_x11.c         |  2 -
 src/egl/drivers/dri2/platform_x11_dri3.c    |  1 -
 src/gallium/drivers/panfrost/pan_blit.c     | 14 ++---
 src/gallium/drivers/panfrost/pan_context.c  | 49 ++++++++++++++++-
 src/gallium/drivers/panfrost/pan_job.c      | 11 ++++
 src/gallium/drivers/panfrost/pan_job.h      |  5 ++
 src/gallium/drivers/panfrost/pan_resource.c | 58 +++++++++++++++++++++
 src/gallium/drivers/panfrost/pan_resource.h | 12 ++++-
 src/gallium/drivers/panfrost/pan_screen.c   |  1 +
 src/gallium/include/pipe/p_screen.h         |  7 +++
 src/gallium/state_trackers/dri/dri2.c       | 22 ++++++++
 20 files changed, 263 insertions(+), 79 deletions(-)
    
Revision 2
      This is an attempt at resurrecting Daniel's MR [1] which was already
resurrecting Harish's EGL_KHR_partial_update series [2]. This version
implements Marek's suggestion to pass the set_damage_region() directly
to the gallium driver and let it decide how to handle the request. Some
drivers might just calculate the damage extent (as done in Daniel's
initial proposal and in the panfrost implementation), others might do
extra optimizations like trying to reduce the area we're supposed to
reload (only valid for tile-based rendering) even further.

This patch series has been tested with weston (see Daniel's MR[3]) on
panfrost. Note that the panfrost implementation is rather simple (just
limits the rendering area to the damage extent and picks the biggest
damage rect as the only damage region) but we can improve it if we feel
the need.

Only minor changes in this v5 (collecting the R-b/A-b tags + addressing
Alyssa's comments on patch 5).

Regards,

Boris

[1]https://gitlab.freedesktop.org/mesa/mesa/merge_requests/227
[2]https://patchwork.freedesktop.org/series/45915/#rev2
[3]https://gitlab.freedesktop.org/wayland/weston/merge_requests/106

Boris Brezillon (1):
  panfrost: Add support for KHR_partial_update()

Daniel Stone (2):
  dri_interface: add DRI2_BufferDamage interface
  st/dri2: Implement DRI2bufferDamageExtension

Harish Krupo (2):
  egl/android: Delete set_damage_region from egl dri vtbl
  egl/dri: Use __DRI2_BUFFER_DAMAGE extension for KHR_partial_update

 include/GL/internal/dri_interface.h         | 43 ++++++++++
 src/egl/drivers/dri2/egl_dri2.c             | 54 ++++++++++--
 src/egl/drivers/dri2/egl_dri2.h             |  5 +-
 src/egl/drivers/dri2/egl_dri2_fallbacks.h   |  9 --
 src/egl/drivers/dri2/platform_android.c     | 45 ----------
 src/egl/drivers/dri2/platform_device.c      |  1 -
 src/egl/drivers/dri2/platform_drm.c         |  1 -
 src/egl/drivers/dri2/platform_surfaceless.c |  1 -
 src/egl/drivers/dri2/platform_wayland.c     |  1 -
 src/egl/drivers/dri2/platform_x11.c         |  2 -
 src/egl/drivers/dri2/platform_x11_dri3.c    |  1 -
 src/gallium/drivers/panfrost/pan_blit.c     | 10 +--
 src/gallium/drivers/panfrost/pan_context.c  | 63 +++++++++++++-
 src/gallium/drivers/panfrost/pan_job.c      | 11 +++
 src/gallium/drivers/panfrost/pan_job.h      |  5 ++
 src/gallium/drivers/panfrost/pan_resource.c | 91 +++++++++++++++++++++
 src/gallium/drivers/panfrost/pan_resource.h | 12 ++-
 src/gallium/drivers/panfrost/pan_screen.c   |  1 +
 src/gallium/include/pipe/p_screen.h         |  7 ++
 src/gallium/state_trackers/dri/dri2.c       | 22 +++++
 20 files changed, 308 insertions(+), 77 deletions(-)
    
Revision 3
      This is an attempt at resurrecting Daniel's MR [1] which was already
resurrecting Harish's EGL_KHR_partial_update series [2]. This version
implements Marek's suggestion to pass the set_damage_region() directly
to the gallium driver and let it decide how to handle the request. Some
drivers might just calculate the damage extent (as done in Daniel's
initial proposal and in the panfrost implementation), others might do
extra optimizations like trying to reduce the area we're supposed to
reload (only valid for tile-based rendering) even further.

This patch series has been tested with weston on panfrost. Note that
the panfrost implementation is rather simple (just limits the rendering
area to the damage extent and picks the biggest damage rect as the only
damage region) but we can improve it if we feel the need.

No big changes in this v6, just addressed Erik and Marek concerns
regarding the doc and the prototype of the gallium ->set_damage_region()
hook.

Regards,

Boris

[1]https://gitlab.freedesktop.org/mesa/mesa/merge_requests/227
[2]https://patchwork.freedesktop.org/series/45915/#rev2

Boris Brezillon (1):
  panfrost: Add support for KHR_partial_update()

Daniel Stone (2):
  dri_interface: add DRI2_BufferDamage interface
  st/dri2: Implement DRI2bufferDamageExtension

Harish Krupo (2):
  egl/android: Delete set_damage_region from egl dri vtbl
  egl/dri: Use __DRI2_BUFFER_DAMAGE extension for KHR_partial_update

 include/GL/internal/dri_interface.h         | 43 ++++++++++
 src/egl/drivers/dri2/egl_dri2.c             | 54 ++++++++++--
 src/egl/drivers/dri2/egl_dri2.h             |  5 +-
 src/egl/drivers/dri2/egl_dri2_fallbacks.h   |  9 --
 src/egl/drivers/dri2/platform_android.c     | 45 ----------
 src/egl/drivers/dri2/platform_device.c      |  1 -
 src/egl/drivers/dri2/platform_drm.c         |  1 -
 src/egl/drivers/dri2/platform_surfaceless.c |  1 -
 src/egl/drivers/dri2/platform_wayland.c     |  1 -
 src/egl/drivers/dri2/platform_x11.c         |  2 -
 src/egl/drivers/dri2/platform_x11_dri3.c    |  1 -
 src/gallium/drivers/panfrost/pan_blit.c     | 10 +--
 src/gallium/drivers/panfrost/pan_context.c  | 63 +++++++++++++-
 src/gallium/drivers/panfrost/pan_job.c      | 11 +++
 src/gallium/drivers/panfrost/pan_job.h      |  5 ++
 src/gallium/drivers/panfrost/pan_resource.c | 91 +++++++++++++++++++++
 src/gallium/drivers/panfrost/pan_resource.h | 13 ++-
 src/gallium/drivers/panfrost/pan_screen.c   |  1 +
 src/gallium/include/pipe/p_screen.h         | 17 ++++
 src/gallium/state_trackers/dri/dri2.c       | 34 ++++++++
 20 files changed, 331 insertions(+), 77 deletions(-)
    
Revision 4
      This is an attempt at resurrecting Daniel's MR [1] which was already
resurrecting Harish's EGL_KHR_partial_update series [2]. This version
implements Marek's suggestion to pass the set_damage_region() directly
to the gallium driver and let it decide how to handle the request. Some
drivers might just calculate the damage extent (as done in Daniel's
initial proposal and in the panfrost implementation), others might do
extra optimizations like trying to reduce the area we're supposed to
reload (only valid for tile-based rendering) even further.

This patch series has been tested with weston on panfrost. Note that
the panfrost implementation is rather simple (just limits the rendering
area to the damage extent and picks the biggest damage rect as the only
damage region) but we can improve it if we feel the need.

No major changes in this v7, just added the missing FREE(boxes) call
in dri2_set_damage_region() and fixed an alignment issue in the
panfrost driver.

Regards,

Boris

[1]https://gitlab.freedesktop.org/mesa/mesa/merge_requests/227
[2]https://patchwork.freedesktop.org/series/45915/#rev2

*** BLURB HERE ***

Boris Brezillon (1):
  panfrost: Add support for KHR_partial_update()

Daniel Stone (2):
  dri_interface: add DRI2_BufferDamage interface
  st/dri2: Implement DRI2bufferDamageExtension

Harish Krupo (2):
  egl/android: Delete set_damage_region from egl dri vtbl
  egl/dri: Use __DRI2_BUFFER_DAMAGE extension for KHR_partial_update

 include/GL/internal/dri_interface.h         | 43 +++++++++++
 src/egl/drivers/dri2/egl_dri2.c             | 54 ++++++++++++--
 src/egl/drivers/dri2/egl_dri2.h             |  5 +-
 src/egl/drivers/dri2/egl_dri2_fallbacks.h   |  9 ---
 src/egl/drivers/dri2/platform_android.c     | 45 ------------
 src/egl/drivers/dri2/platform_device.c      |  1 -
 src/egl/drivers/dri2/platform_drm.c         |  1 -
 src/egl/drivers/dri2/platform_surfaceless.c |  1 -
 src/egl/drivers/dri2/platform_wayland.c     |  1 -
 src/egl/drivers/dri2/platform_x11.c         |  2 -
 src/egl/drivers/dri2/platform_x11_dri3.c    |  1 -
 src/gallium/drivers/panfrost/pan_blit.c     | 10 +--
 src/gallium/drivers/panfrost/pan_context.c  | 75 ++++++++++++++++++-
 src/gallium/drivers/panfrost/pan_job.c      | 11 +++
 src/gallium/drivers/panfrost/pan_job.h      |  5 ++
 src/gallium/drivers/panfrost/pan_resource.c | 80 +++++++++++++++++++++
 src/gallium/drivers/panfrost/pan_resource.h | 13 +++-
 src/gallium/drivers/panfrost/pan_screen.c   |  1 +
 src/gallium/include/pipe/p_screen.h         | 17 +++++
 src/gallium/state_trackers/dri/dri2.c       | 35 +++++++++
 20 files changed, 333 insertions(+), 77 deletions(-)
    

Revisions