Skip to content

WIP: EGL_KHR_partial_update support

Daniel Stone requested to merge daniels/mesa:partial-update into master

This is a resurrection of Harish's EGL_KHR_partial_update series, with substantial interface rewrites and support for Gallium.

It removes the old DRI extension interface, which was only used to implement something similar to eglSwapBuffersWithDamage, and replaces it with a new interface which tags a partial-update region on to the drawable. The old series targeted a DRI context rather than a drawable, which made tracking more difficult: the partial-update region only applies to the winsys buffer, not to any user-supplied FBOs. It is also additional to the scissor region, rather than replacing it.

The series is marked WIP for several reasons:

  • I couldn't sleep last night, so wrote this after waking up at 3am; it's probably very wrong in several places
  • I don't have a working Raspberry Pi setup due to office move, so it's completely and utterly untested
  • it was not immediately obvious to me where to track the region within Gallium; I went for pipe_resource as that seemed to be the most natural correlation to the DRIdrawable the region logically belongs to
  • the Gallium implementation collapses the region into single-rect extents; it's not obvious to me how multiple rects would work with hardware, unless we dispatched one draw per rect ... ?

I have also written Weston support for EGL_KHR_partial_update, though the same caveats apply, i.e. completely untested.

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

/cc @anholt @eric @yuq825

Edited by Daniel Stone

Merge request reports