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

List:       kwin
Subject:    Re: Review Request 109688: Optimize the vertex buffer code
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2013-03-28 15:43:22
Message-ID: 20130328154322.23780.79788 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 28, 2013, 8:38 a.m., Martin Gräßlin wrote:
> > I just wanted to give it a try, but the kwin-gles3 branch just failed for me with \
> > an compile error in scene_opengl.cpp:260
> 
> Fredrik Höglund wrote:
> Sorry about that, I resolved a merge conflict yesterday and pushed the result \
> without doing a compile test. 
> It should be fixed now.
> 
> 
> Martin Gräßlin wrote:
> thanks for the fast fix. I gave it a try on my Sandybridge with both Mesa 8 and 9.1 \
> and it looks fine. Want to test it also on the NVIDIA system, but that system just \
> doesn't like me and I don't want to investigate today ;-)

=)
I'll push the pending commits in ~3-4h and then try this patch on the blob.


- Thomas


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


On March 24, 2013, 3:20 p.m., Fredrik Höglund wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109688/
> -----------------------------------------------------------
> 
> (Updated March 24, 2013, 3:20 p.m.)
> 
> 
> Review request for kwin.
> 
> 
> Description
> -------
> 
> This is the first part of an optimization branch I was originally hoping to
> merge before the 4.10 freeze.
> 
> I've decided to break it up into several review requests to make it easier
> to review.
> 
> The branch is layered on top of my kwin-opengl3 branch because it depends on
> some GLShader changes in that branch.
> 
> 
> commit 5ae24841de91aab296ad3b307211efc5b87730bd
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Fri Sep 21 19:04:26 2012 +0200
> 
> kwin: Bind attributes to the same indices in all shaders
> 
> This saves us from having to look up the attribute locations each
> time we update the vertex array state.
> 
> commit e7ccabf293b3092dc158266b6683cda7fbad4d00
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Wed Sep 12 22:16:22 2012 +0200
> 
> kwin: Update the GL1 code in GLVertexBuffer to match the VBO code
> 
> This saves two memory allocations in the GL1 path in setData().
> 
> commit 5b3c3fc95dd388846049b9f83ee201b000ec1d46
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Tue Sep 11 17:49:33 2012 +0200
> 
> kwin: Don't reallocate the vertex buffer on every setData() call
> 
> Allocate enough space to hold the geometry for multiple draw calls,
> and use glMapBufferRange() to gradually fill the buffer.  Once the
> data store is full, it's orphaned and a new one is allocated.
> 
> commit 4fb88dbb9c1a955487a2cd7eafff8bfec65555ff
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Tue Sep 11 17:30:21 2012 +0200
> 
> kwin: Use one buffer object in GLVertexBuffer
> 
> Store the vertex positions and texture coordinates in the same buffer
> object. This saves one buffer allocation in every setData() call.
> 
> The attributes are also interleaved as they are uploaded into the buffer
> to maximize locality of reference.
> 
> commit 80591f629a94a41a4cbad2d14335715630bae9c6
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Wed Sep 26 23:29:11 2012 +0200
> 
> kwin/es: Resolve functions for GL_EXT_map_buffer_range
> 
> commit 9085c4ad3f3bfa5e398941a7b36b7640706aac56
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Wed Sep 26 23:27:18 2012 +0200
> 
> kwin/es: Resolve functions for GL_OES_mapbuffer
> 
> commit ae7d57086ea5cbbcf81ac737ddce972f3bb6b5f2
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Sun Jul 22 15:03:53 2012 +0200
> 
> kwin: Resolve functions for GL_ARB_map_buffer_range
> 
> commit 5566aa97d070a7ccd109bdaa217300bf4a7bb62a
> Author: Fredrik Höglund <fredrik@kde.org>
> Date:   Sun Jul 22 14:59:43 2012 +0200
> 
> kwin: Resolve more functions from ARB_vertex_buffer_object
> 
> This patch resolves:
> glMapBuffer()
> glUnmapBuffer()
> glBufferSubData()
> glGetBufferSubData()
> 
> 
> Diffs
> -----
> 
> kwin/libkwineffects/kwinglutils.h fb03745 
> kwin/libkwineffects/kwinglutils.cpp 53d1fb5 
> kwin/libkwineffects/kwinglutils_funcs.h 16e7a35 
> kwin/libkwineffects/kwinglutils_funcs.cpp 800bfb0 
> 
> Diff: http://git.reviewboard.kde.org/r/109688/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Fredrik Höglund
> 
> 


[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/109688/">http://git.reviewboard.kde.org/r/109688/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 28th, 2013, 8:38 a.m. UTC, <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;">I just wanted to give it a try, but the kwin-gles3 branch just failed \
for me with an compile error in scene_opengl.cpp:260</pre>  </blockquote>




 <p>On March 28th, 2013, 11:44 a.m. UTC, <b>Fredrik Höglund</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;">Sorry about that, I \
resolved a merge conflict yesterday and pushed the result without doing a compile \
test.

It should be fixed now.
</pre>
 </blockquote>





 <p>On March 28th, 2013, 3:30 p.m. UTC, <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;">thanks for the fast fix. \
I gave it a try on my Sandybridge with both Mesa 8 and 9.1 and it looks fine. Want to \
test it also on the NVIDIA system, but that system just doesn&#39;t like me and I \
don&#39;t want to investigate today ;-)</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;">=) I&#39;ll push the \
pending commits in ~3-4h and then try this patch on the blob.</pre> <br />










<p>- Thomas</p>


<br />
<p>On March 24th, 2013, 3:20 p.m. UTC, Fredrik Höglund wrote:</p>








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

<div>Review request for kwin.</div>
<div>By Fredrik Höglund.</div>


<p style="color: grey;"><i>Updated March 24, 2013, 3:20 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;">This is the first part of an optimization branch I was originally hoping \
to merge before the 4.10 freeze.

I&#39;ve decided to break it up into several review requests to make it easier
to review.

The branch is layered on top of my kwin-opengl3 branch because it depends on
some GLShader changes in that branch.


commit 5ae24841de91aab296ad3b307211efc5b87730bd
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Fri Sep 21 19:04:26 2012 +0200

    kwin: Bind attributes to the same indices in all shaders

    This saves us from having to look up the attribute locations each
    time we update the vertex array state.

commit e7ccabf293b3092dc158266b6683cda7fbad4d00
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Wed Sep 12 22:16:22 2012 +0200

    kwin: Update the GL1 code in GLVertexBuffer to match the VBO code

    This saves two memory allocations in the GL1 path in setData().

commit 5b3c3fc95dd388846049b9f83ee201b000ec1d46
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Tue Sep 11 17:49:33 2012 +0200

    kwin: Don&#39;t reallocate the vertex buffer on every setData() call

    Allocate enough space to hold the geometry for multiple draw calls,
    and use glMapBufferRange() to gradually fill the buffer.  Once the
    data store is full, it&#39;s orphaned and a new one is allocated.

commit 4fb88dbb9c1a955487a2cd7eafff8bfec65555ff
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Tue Sep 11 17:30:21 2012 +0200

    kwin: Use one buffer object in GLVertexBuffer

    Store the vertex positions and texture coordinates in the same buffer
    object. This saves one buffer allocation in every setData() call.

    The attributes are also interleaved as they are uploaded into the buffer
    to maximize locality of reference.

commit 80591f629a94a41a4cbad2d14335715630bae9c6
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Wed Sep 26 23:29:11 2012 +0200

    kwin/es: Resolve functions for GL_EXT_map_buffer_range

commit 9085c4ad3f3bfa5e398941a7b36b7640706aac56
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Wed Sep 26 23:27:18 2012 +0200

    kwin/es: Resolve functions for GL_OES_mapbuffer

commit ae7d57086ea5cbbcf81ac737ddce972f3bb6b5f2
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Sun Jul 22 15:03:53 2012 +0200

    kwin: Resolve functions for GL_ARB_map_buffer_range

commit 5566aa97d070a7ccd109bdaa217300bf4a7bb62a
Author: Fredrik Höglund &lt;fredrik@kde.org&gt;
Date:   Sun Jul 22 14:59:43 2012 +0200

    kwin: Resolve more functions from ARB_vertex_buffer_object

    This patch resolves:
        glMapBuffer()
        glUnmapBuffer()
        glBufferSubData()
        glGetBufferSubData()
</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.h <span style="color: \
grey">(fb03745)</span></li>

 <li>kwin/libkwineffects/kwinglutils.cpp <span style="color: \
grey">(53d1fb5)</span></li>

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

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

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109688/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