From: bugzilla-daemon@freedesktop.org Subject: [Bug 79223] extra vsync when reading back pixels in xbmc Date: Mon, 02 Jun 2014 15:48:01 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0674289503==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EA6E6E5B5 for ; Mon, 2 Jun 2014 08:48:01 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0674289503== Content-Type: multipart/alternative; boundary="1401724081.cBC0050.16192"; charset="us-ascii" --1401724081.cBC0050.16192 Date: Mon, 2 Jun 2014 15:48:01 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=79223 --- Comment #14 from Pierre Ossman --- (In reply to comment #13) > (In reply to comment #9) > > No effect I'm afraid. Since this is a full screen application I assume it > > was already using flipping and not blitting anyway? > > Probably. For the sake of testing, have you tried disabling page flipping in > addition to SwapBuffersWait? > Both disabled behaves the same as just SwapBuffersWait=off as far as I can tell. I.e. with glXSwapInterval(1) I still get problems. With glXSwapInterval(0) I get consistent 60 fps, but tearing instead and it's difficult to see if I get some frame jitter. (SwapBuffersWait=on, EnablePageFlip=on and glXSwapInterval(0) also gets rid of the massive fps drops, but has jitter instead) > > (In reply to comment #12) > > Down to dri2_drawable_get_buffers() now. I assume I'll be hitting a point > > where I'll have to switch over to looking in the X server soon... > > Yep, it's waiting for DRI2 buffer information from the X server, which is > delayed until the previous buffer swap actually finishes. > Is that expected behaviour? I.e. am I chasing an already known limitation? The xbmc code seems to assume that those gl command will execute asynchronously as it is using querires to determine when the rendering and glReadPixels() is done. > > FWIW, you might get somewhat less confusing timings if you call glFinish() > before glXSwapBuffers(). I'll play around with it. But that doesn't sound like a good solution upstream as I guess it will remove parallelism for the drivers that can do all of this in the background? -- You are receiving this mail because: You are the assignee for the bug. --1401724081.cBC0050.16192 Date: Mon, 2 Jun 2014 15:48:01 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 14 on bug 79223 from
(In reply to comment #13)
> (In reply to comment #9)
> > No effect I'm afraid. Since this is a full screen application I assume it
> > was already using flipping and not blitting anyway?
> 
> Probably. For the sake of testing, have you tried disabling page flipping in
> addition to SwapBuffersWait?
> 

Both disabled behaves the same as just SwapBuffersWait=off as far as I can
tell. I.e. with glXSwapInterval(1) I still get problems. With
glXSwapInterval(0) I get consistent 60 fps, but tearing instead and it's
difficult to see if I get some frame jitter.

(SwapBuffersWait=on, EnablePageFlip=on and glXSwapInterval(0) also gets rid of
the massive fps drops, but has jitter instead)

> 
> (In reply to comment #12)
> > Down to dri2_drawable_get_buffers() now. I assume I'll be hitting a point
> > where I'll have to switch over to looking in the X server soon...
> 
> Yep, it's waiting for DRI2 buffer information from the X server, which is
> delayed until the previous buffer swap actually finishes.
> 

Is that expected behaviour? I.e. am I chasing an already known limitation? The
xbmc code seems to assume that those gl command will execute asynchronously as
it is using querires to determine when the rendering and glReadPixels() is
done.

> 
> FWIW, you might get somewhat less confusing timings if you call glFinish()
> before glXSwapBuffers().

I'll play around with it. But that doesn't sound like a good solution upstream
as I guess it will remove parallelism for the drivers that can do all of this
in the background?


You are receiving this mail because:
  • You are the assignee for the bug.
--1401724081.cBC0050.16192-- --===============0674289503== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0674289503==--