[Mesa-dev] [RFC] egl: Add DRI3 support to the EGL backend.
axel.davy at ens.fr
Tue Oct 28 04:44:24 PDT 2014
On 28/10/2014 10:19, Joonas Lahtinen wrote :
> On pe, 2014-10-24 at 17:37 +0000, Emil Velikov wrote:
>> Hi Joonas,
>> On 22/10/14 18:17, Joonas Lahtinen wrote:
>>> This patch introduced DRI3 support to the EGL backend.
>>> Patch is on top of current master. With the patch you can observe
>>> reduced CPU stress when many glViewport calls are made.
>>> Notice that the DRI3 extension is only exposed if the DRI3 interface is
>>> found working too instead of just existing. So you need to enable DRI3
>>> from all three; Mesa, X driver and X server, to get the benefit.
>> It seems that you introduce yet another dri extension
>> (DRIdri3Extension) which afaict should not be needed ?
>> Am I missing something here or did you get carried away by looking at
>> __DRIcoreExtension, __DRIdri2Extension and __DRIswrastExtension :P
> The DRI3 (just like the USE_INVALIDATE extension) extension is needed
> for the drivers to know that they do not need to invalidate buffers on
> each glViewport call.
> One could use USE_INVALIDATE extension for same functionality, but I see
> it would not be very good idea as the naming vs. context would be
> DRI3 is exposed dynamically depending on if DRI3 is usable or not. The
> USE_INVALIDATE is exposed as long as GLX is used. So that also makes
> them bit different (in logic too, not just naming).
> Regards, Joonas
Looking at the patch it seems you are not really using DRI3,
and you are just using the Present extension to listen when the window
A complete implementation, that would use several back buffers and use
extension for swapbuffers instead of copying on the front buffer,
would be preferable. (vsync/tear-free support + the advantages Present
will bring to
compositors when they can handle Present events and avoid useless copies)
Since you use Present over the DRI2 backend, that explains why you have
to use hacks to use
invalidate differently. With complete DRI3/Present implementation, you
wouldn't need these hacks.
Like for the egl Wayland backend you would use several back buffers and
invalidate only for a resize
and after swapbuffers.
More information about the mesa-dev