We still call flush method of DRI2_Flush extension in other functions of egl_dri2 driver. for example, dri2_copy_buffers(), because we expect all the rendering to this drawable have been flushed before copying the buffers.<div>

<br></div><div>The code I added eventually invokes st-&gt;pipe-&gt;flush(), so I think it handles correctly, any concern?<div><br></div><div>Cooper</div><div><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 4:32 PM, Chia-I Wu <span dir="ltr">&lt;<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2011/8/16 Cooper Yuan &lt;<a href="mailto:cooperyuan@gmail.com">cooperyuan@gmail.com</a>&gt;:<br>
<div class="im">&gt; this DRI2_Flush extension is used by egl driver, but DRI2_Flush extension<br>
&gt; doesn&#39;t implement dri2_flush_drawable() function.<br>
</div>I do not recall what DRI2_Flush is for.   It makes sense to simply<br>
call glFinish when eglWaitClient is called, if DRI2_Flush has<br>
different semantics than glFinish.<br>
<div><div></div><div class="h5">&gt; 2011/8/16 Michel Dänzer &lt;<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, 2011-08-15 at 19:32 +0800, Cooper Yuan wrote:<br>
&gt;&gt; &gt; Hi All, please review this changelist that&#39;s going to enable<br>
&gt;&gt; &gt; eglWaitClient() which has the same effect with glFinish according to<br>
&gt;&gt; &gt; specification.<br>
&gt;&gt; &gt; before, egl applications using pixmap or pbuffer flicker always<br>
&gt;&gt; &gt; because of no flush.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cooper<br>
&gt;&gt; &gt; ---<br>
&gt;&gt; &gt;  src/gallium/state_trackers/dri/drm/dri2.c |    4 ++++<br>
&gt;&gt; &gt;  1 files changed, 4 insertions(+), 0 deletions(-)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; diff --git a/src/gallium/state_trackers/dri/drm/dri2.c<br>
&gt;&gt; &gt; b/src/gallium/state_trackers/dri/drm/dri2.c<br>
&gt;&gt; &gt; index d491e46..908a735 100644<br>
&gt;&gt; &gt; --- a/src/gallium/state_trackers/dri/drm/dri2.c<br>
&gt;&gt; &gt; +++ b/src/gallium/state_trackers/dri/drm/dri2.c<br>
&gt;&gt; &gt; @@ -46,6 +46,10 @@<br>
&gt;&gt; &gt;  static void<br>
&gt;&gt; &gt;  dri2_flush_drawable(__DRIdrawable *draw)<br>
&gt;&gt; &gt;  {<br>
&gt;&gt; &gt; +   struct dri_drawable *drawable = dri_drawable(draw);<br>
&gt;&gt; &gt; +   struct dri_context *ctx = dri_get_current(draw-&gt;driScreenPriv);<br>
&gt;&gt; &gt; +<br>
&gt;&gt; &gt; +   ctx-&gt;st-&gt;flush(ctx-&gt;st, 0, NULL);<br>
&gt;&gt; &gt;  }<br>
&gt;&gt;<br>
&gt;&gt; Shouldn&#39;t this rather be dealt with in EGL code?<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Earthling Michel Dänzer           |                   <a href="http://www.amd.com" target="_blank">http://www.amd.com</a><br>
&gt;&gt; Libre software enthusiast         |          Debian, X and DRI developer<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; mesa-dev mailing list<br>
&gt; <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
olv@LunarG.com<br>
</font></blockquote></div><br></div></div>