dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Cc: xorg-devel@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [RFC] swap event handling fixes
Date: Mon, 2 May 2011 13:09:03 -0700	[thread overview]
Message-ID: <20110502130903.0ad290ef@jbarnes-desktop> (raw)
In-Reply-To: <A10512C6-35A3-42CA-8FD3-D219A2246656@tuebingen.mpg.de>

On Sat, 30 Apr 2011 01:10:27 +0200
Mario Kleiner <mario.kleiner@tuebingen.mpg.de> wrote:

> 
> On Apr 29, 2011, at 11:37 PM, Jesse Barnes wrote:
> 
> > On Thu, 28 Apr 2011 13:27:18 -0700
> > Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> >
> >> I obviously failed to count the swap event structure size after  
> >> adding
> >> and removing fields a few times, and didn't even account for  
> >> padding.  The
> >> end result is that clients today won't receive the sbc_lo field at  
> >> all,
> >> and so will likely stuff junk into that field on the client side (or
> >> zero at best).
> >>
> >> This patchset fixes up the structure definitions, bumps the proto
> >> levels, and adds server and client handling code for it all.  It  
> >> should
> >> be forward and backward compatible, but as always review and testing
> >> appreciated.
> >>
> >> I think the event_type checking on the client side still needs work;
> >> the field is split now so I need to check the right one on old  
> >> servers.
> >> I'll also add swap support for the new requests in case people  
> >> ever want
> >> to run this stuff between big and little endian machines.
> >
> > Btw, I've been trying to test these fixes but I can't make the  
> > existing
> > code break; I'm getting a nicely incrementing sbc count using the
> > piglit event test (after adding some code to dump the swap event
> > fields), so somehow the bits are getting through.  I just don't know
> > how yet...
> >
> 
> One thing you could try as another quick test is to use xtrace on a  
> opengl app. I remember seeing weird results for the msc or ust fields  
> (i believe) of decoded and printed DRI2SwapComplete events. I always  
> thought part of my toolchain was just out of sync, but maybe it was  
> just the result of the wrong size/padding.

What I'm seeing is a result of whatever xlib sticks in that space I
think.  Now I'm seeing bogus values and am testing the fix.

However, for the GLX event, I will have to use a new generic event,
since the GLX event types are larger than 8 bits due to the way GLX
enumerates things.  For DRI2 I can re-pack the existing structure.
Will post updated patches soon.

-- 
Jesse Barnes, Intel Open Source Technology Center

      reply	other threads:[~2011-05-02 20:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 20:27 [RFC] swap event handling fixes Jesse Barnes
2011-04-28 20:27 ` [PATCH] Pack swap complete bits into an XEvent Jesse Barnes
2011-04-28 21:33   ` Eric Anholt
     [not found]     ` <87y62uhxh5.fsf-NuZ+OHacjZctnJUoGz2Qal6hYfS7NtTn@public.gmane.org>
2011-04-28 21:34       ` Jesse Barnes
2011-04-28 22:01   ` Keith Packard
2011-04-28 20:27 ` [PATCH] GLX/DRI2: fix swap complete handling Jesse Barnes
2011-04-28 20:27 ` [PATCH] DRI2/GLX: fix swap event handling Jesse Barnes
     [not found]   ` <1304022442-8070-5-git-send-email-jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
2011-04-28 21:37     ` Eric Anholt
2011-04-29  6:52   ` Michel Dänzer
2011-04-29  7:20   ` Julien Cristau
2011-04-29 15:24     ` Jesse Barnes
     [not found] ` <1304022442-8070-1-git-send-email-jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
2011-04-28 20:27   ` [PATCH] Fix swap complete event size Jesse Barnes
2011-04-29 21:37   ` [RFC] swap event handling fixes Jesse Barnes
2011-04-29 23:10     ` Mario Kleiner
2011-05-02 20:09       ` Jesse Barnes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110502130903.0ad290ef@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mario.kleiner@tuebingen.mpg.de \
    --cc=xorg-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox