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.

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.

Axel Davy
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to