[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: invoke glXSwapInterval to actually inform the buffer that we want to align to vb
From:       Fredrik_Höglund <fredrik () kde ! org>
Date:       2012-02-29 15:26:36
Message-ID: 20120229152636.11847.63892 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Feb. 29, 2012, 2:26 p.m., Martin Gräßlin wrote:
> > Do I understand correctly that it is about this extension: \
> > http://www.opengl.org/registry/specs/SGI/swap_control.txt 
> > If yes I must admit that my brain is today in no condition to \
> > understand what it talks about ;-)
> 
> Thomas Lübking wrote:
> Yupp, i controls the buffer flush interval - like eglSwapInterval is at \
> least supposed to do. "1" one means "once every frame" while "0"  means \
> "whenever you feel like" (values bigger than one would theoretically be \
> possible, so 4 would flush in a 4 frame interval) 
> Got a flu?
> 
> Martin Gräßlin wrote:
> ok with 0 meaning whenever the driver things it makes sense. And yes I \
> got a flu.

SwapInterval() is unrelated to WaitVideoSync().

It only controls whether SwapBuffers() waits for vblank or not. The default \
is 1 in all KMS drivers that support syncing to vblank, but the swap \
behavior can be overridden in a number of places including xorg.conf, \
~/.drirc and by the vblank_mode env var.

SwapInterval() also has no affect on CopySubBuffer()/PostSubBuffer(), but \
those functions usually schedule the copy to occur the next time the \
scanout position is below the rect that's about to be copied, even though \
they return immediately.


- Fredrik


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104111/#review11018
-----------------------------------------------------------


On Feb. 28, 2012, 10:08 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104111/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2012, 10:08 p.m.)
> 
> 
> Review request for kwin and Martin Gräßlin.
> 
> 
> Description
> -------
> 
> Believe it or not, but there's actually a glXSwapInterval function and as \
> far as i could figure one should use it since i found contradicting \
> claims about the default (some mesa guy in a mailing list entry from 2006 \
> says it's 0, while \
> http://www.opengl.org/registry/specs/SGI/swap_control.txt suggests it's \
> one) 
> However it can't harm -hopefully- and works here on nvidia and GMA/mesa \
> (nvidia has SGI & ext, mesa has MESA and OML - d'ooohh) and *might* be \
> the cause of wonky swapping because if it's not set the color buffer \
> flushes whenever it feels like what can cause waitSync to block for even \
> a random amount of frames or not at all (causing tearing) - at least says \
> the guy from 2006 and is supported by the reply of the guy who originally \
> asked =D 
> 
> Diffs
> -----
> 
> kwin/libkwineffects/kwinglutils_funcs.h 97a7a6c 
> kwin/libkwineffects/kwinglutils_funcs.cpp 6d79507 
> kwin/scene_opengl_glx.cpp ddebcd0 
> 
> Diff: http://git.reviewboard.kde.org/r/104111/diff/
> 
> 
> Testing
> -------
> 
> It's detected and applied, not 100% sure about the resulting impact.
> 
> 
> Thanks,
> 
> Thomas Lübking
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px \
#c9c399 solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/104111/">http://git.reviewboard.kde.org/r/104111/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <p style="margin-top: 0;">On February 29th, 2012, \
2:26 p.m., <b>Martin Gräßlin</b> wrote:</p>  <blockquote \
style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Do I understand correctly that it is about this extension: \
http://www.opengl.org/registry/specs/SGI/swap_control.txt

If yes I must admit that my brain is today in no condition to understand \
what it talks about ;-)</pre>  </blockquote>




 <p>On February 29th, 2012, 2:42 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Yupp, i controls the buffer flush interval - like \
eglSwapInterval is at least supposed to do. &quot;1&quot; one means \
&quot;once every frame&quot; while &quot;0&quot;  means &quot;whenever you \
feel like&quot; (values bigger than one would theoretically be possible, so \
4 would flush in a 4 frame interval)

Got a flu?</pre>
 </blockquote>





 <p>On February 29th, 2012, 2:49 p.m., <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">ok with 0 meaning whenever the driver things it makes sense. \
And yes I got a flu.</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">SwapInterval() \
is unrelated to WaitVideoSync().

It only controls whether SwapBuffers() waits for vblank or not. The default \
is 1 in all KMS drivers that support syncing to vblank, but the swap \
behavior can be overridden in a number of places including xorg.conf, \
~/.drirc and by the vblank_mode env var.

SwapInterval() also has no affect on CopySubBuffer()/PostSubBuffer(), but \
those functions usually schedule the copy to occur the next time the \
scanout position is below the rect that&#39;s about to be copied, even \
though they return immediately.</pre> <br />








<p>- Fredrik</p>


<br />
<p>On February 28th, 2012, 10:08 p.m., Thomas Lübking wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px \
black solid;">  <tr>
  <td>

<div>Review request for kwin and Martin Gräßlin.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated Feb. 28, 2012, 10:08 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1>  <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Believe it or not, but there&#39;s actually a glXSwapInterval \
function and as far as i could figure one should use it since i found \
contradicting claims about the default (some mesa guy in a mailing list \
entry from 2006 says it&#39;s 0, while \
http://www.opengl.org/registry/specs/SGI/swap_control.txt suggests it&#39;s \
one)

However it can&#39;t harm -hopefully- and works here on nvidia and GMA/mesa \
(nvidia has SGI &amp; ext, mesa has MESA and OML - d&#39;ooohh) and *might* \
be the cause of wonky swapping because if it&#39;s not set the color buffer \
flushes whenever it feels like what can cause waitSync to block for even a \
random amount of frames or not at all (causing tearing) - at least says the \
guy from 2006 and is supported by the reply of the guy who originally asked \
=D</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">It&#39;s detected and applied, not 100% sure about the \
resulting impact.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/libkwineffects/kwinglutils_funcs.h <span style="color: \
grey">(97a7a6c)</span></li>

 <li>kwin/libkwineffects/kwinglutils_funcs.cpp <span style="color: \
grey">(6d79507)</span></li>

 <li>kwin/scene_opengl_glx.cpp <span style="color: \
grey">(ddebcd0)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/104111/diff/" \
style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic