--===============5377628632612540976== Content-Type: multipart/alternative; boundary="===============1761981218369673752==" --===============1761981218369673752== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > On March 26, 2013, 8:15 a.m., Martin Gräßlin wrote: > > Looking forward to try that change on the pandaboard as that hardware doesn't support buffer preservation. So if it neither does buffer preservation nor eglPostSubBufferNV (haven't checked that one yet, didn't get that far with testing), it'll be interesting ;-) Indeed, an interesting testcase. Note that there is no regression here, the previous code couldn't work at all without buffer preservation, even if eglPostSubBufferNV was present. The only possible solution for such systems is to always re-draw the entire frame ('c' or 'p' swap strategy). - Ralf ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/109452/#review29894 ----------------------------------------------------------- On March 26, 2013, 9:20 p.m., Ralf Jung wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/109452/ > ----------------------------------------------------------- > > (Updated March 26, 2013, 9:20 p.m.) > > > Review request for kwin, Martin Gräßlin and Thomas Lübking. > > > Description > ------- > > This fixes v-sync in the EGL backend. The backend used to always enable EGL_BUFFER_PRESERVED, which means that eglSwapBuffer() will do a copy instead of a page flip - not only is this unnecessarily expensive, it also breaks v-sync. > Instead, defer the decision whether to enable EGL_BUFFER_PRESERVED till we know which EGL extensions are available, and enable it only if we do not have eglPostSubBufferNV - that function is needed to do a partial screen update, since the glCopyPixels path we use in the GLX backend does not work. > > I also refactored the copy pixels code into its own function since I planned for the EGL backend to use it - and even though that's not possible, it still avoids code duplication between SceneOpenGL and the GLX backend. > > I added eglWaitNative in prepareRenderingFrame mostly because the GLX backend does that, too, and it is better tested. Is any of these sync functions (eglWaitGL, eglWaitNative, XFlush) really needed? > > > Diffs > ----- > > kwin/eglonxbackend.cpp a0cba91 > kwin/glxbackend.cpp 407c014 > kwin/scene_opengl.h 44e8d15 > kwin/scene_opengl.cpp 43b326c > > Diff: http://git.reviewboard.kde.org/r/109452/diff/ > > > Testing > ------- > > Tested a few settings for glPreferBuffer Swap (e, p, c), they all seem to behave as expected: No tearing at all for p and c, tearing only for small updates when using e. > > > Thanks, > > Ralf Jung > > --===============1761981218369673752== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/109452/

On March 26th, 2013, 8:15 a.m. CET, Martin Gräßlin wrote:

Looking forward to try that change on the pandaboard as that hardware doesn't support buffer preservation. So if it neither does buffer preservation nor eglPostSubBufferNV (haven't checked that one yet, didn't get that far with testing), it'll be interesting ;-)
Indeed, an interesting testcase. Note that there is no regression here, the previous code couldn't work at all without buffer preservation, even if eglPostSubBufferNV was present. The only possible solution for such systems is to always re-draw the entire frame ('c' or 'p' swap strategy).

- Ralf


On March 26th, 2013, 9:20 p.m. CET, Ralf Jung wrote:

Review request for kwin, Martin Gräßlin and Thomas Lübking.
By Ralf Jung.

Updated March 26, 2013, 9:20 p.m.

Description

This fixes v-sync in the EGL backend. The backend used to always enable EGL_BUFFER_PRESERVED, which means that eglSwapBuffer() will do a copy instead of a page flip - not only is this unnecessarily expensive, it also breaks v-sync.
Instead, defer the decision whether to enable EGL_BUFFER_PRESERVED till we know which EGL extensions are available, and enable it only if we do not have eglPostSubBufferNV - that function is needed to do a partial screen update, since the glCopyPixels path we use in the GLX backend does not work.

I also refactored the copy pixels code into its own function since I planned for the EGL backend to use it - and even though that's not possible, it still avoids code duplication between SceneOpenGL and the GLX backend.

I added eglWaitNative in prepareRenderingFrame mostly because the GLX backend does that, too, and it is better tested. Is any of these sync functions (eglWaitGL, eglWaitNative, XFlush) really needed?

Testing

Tested a few settings for glPreferBuffer Swap (e, p, c), they all seem to behave as expected: No tearing at all for p and c, tearing only for small updates when using e.

Diffs

  • kwin/eglonxbackend.cpp (a0cba91)
  • kwin/glxbackend.cpp (407c014)
  • kwin/scene_opengl.h (44e8d15)
  • kwin/scene_opengl.cpp (43b326c)

View Diff

--===============1761981218369673752==-- --===============5377628632612540976== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --===============5377628632612540976==--