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