Hi, Comments below.
On ti, 2014-10-28 at 12:44 +0100, Axel Davy wrote: > On 28/10/2014 10:19, Joonas Lahtinen wrote : > > Hi, > > > > On pe, 2014-10-24 at 17:37 +0000, Emil Velikov wrote: > >> Hi Joonas, > >> > >> On 22/10/14 18:17, Joonas Lahtinen wrote: > >>> Hi, > >>> > >>> 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 > > confusing. > > > > 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 > > > >> Thanks > >> Emil > >> > >> > Hi, > > 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 > is resized. > That seems quite true. I'll have to refer to the original author and ask what's with the DRI3 requirement. Best I know it's been done following the the GLX DRI3 backend. > A complete implementation, that would use several back buffers and use > the Present > 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. > Even with the current patch, invalidate only happens on resizes. So it should be a substantial advantage. I don't see it as a hack, as it only gets rid of the USE_INVALIDATE hack (intel_viewport call). Removing the DRI3 test parts, and changing the naming to refer to present extension, might be next steps. After I get to know why the DRI3 part was there originally. Regards, Joonas > Axel Davy _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev