[Mesa-dev] Question about EGL_KHR_partial_update implementation
yuq825 at gmail.com
Tue Jul 3 03:16:03 UTC 2018
> > To my understand this extension should only depend on the driver support instead
> > of platform support while the EGL_KHR_swap_buffers_with_damage is the opposite:
> > https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
> I always wondered why android didn't implement this in its EGL-Layer if
> all it had to do was to send the rectangles to the compositor.
> Now that I think about it, I too feel that it should be implemented by the driver.
> Looking at the deqp test case for partial_udpate, it also looks like the
> intension was for the rendering to be restricted to only those rectangles.
> Side question: We could also send the damage to the compositor?
As the extension spec describe no compositor side effect, I think we should not
do this. This should be left to EGL_KHR_swap_buffers_with_damage.
> > For lima implementation, I want to use the damage region (buffer
> > damage) provided
> > by EGL_KHR_partial_update to skip rendering of un-damaged region when
> > eglSwapBuffersXXX. And tell damage region (surface damage) to compositor should
> > be left to eglSwapBuffersWithDamageKHR provided by
> > EGL_KHR_swap_buffers_with_damage.
> How do you plan to implement it?
You mean the mesa framework part or the gpu driver part? For mesa
framework part I'd like
to add a driver callback to set damage region, and when flush, driver
use the damage region
to skip un-damage region's render. But I don't have a detail plan.
Mali GPU split FBO into 16x16 tiles, it renders each tile into a tile
buffer mem inside GPU, then
GPU write this tile buffer into RAM FBO. If mali want to draw
something based on the original
content of the FBO tile or draw part of the FBO tile, we have to load
the FBO tile into GPU tile
buffer first. If we don't know the damage region before render like
GPU has to load the whole FBO into tile buffer, which makes partial
draw a whole FBO read/write.
But with EGL_KHR_partial_update, we can skip load of un-damaged FBO
tile which is really
partial draw. I think this is the intention of this extension (which
is also proposed by ARM guys)
to benifit tile GPU rendering.
More information about the mesa-dev