[Nouveau] [PATCH 01/10] dri2: Fix can_exchange() to allow page-flipping on more mesa versions.
mario.kleiner at tuebingen.mpg.de
Fri Mar 2 10:14:38 PST 2012
On Mar 1, 2012, at 9:37 PM, Daniel Stone wrote:
> On 1 March 2012 18:11, Mario Kleiner
> <mario.kleiner at tuebingen.mpg.de> wrote:
>> can_exchange() returns false and thereby prevents page
>> flipping on some drawables where page flipping would
>> work fine. This due to non-matching drawable depths values
>> between front buffer pixmap and back buffer pixmap, because
>> front buffer pixmaps inherit the depth of the screen, typically
>> 24 bits, whereas the depth value of back buffer pixmaps for a
>> given RGB8 or RGBA8 visual depends on the mesa version in use,
>> either 24 bits or 32 bits.
>> Use bitsPerPixel instead of depth to decide if drawable
>> is flippable. This will still catch really incompatible
>> formats like 32 bpp vs. 16 bpp buffers.
> In theory, shouldn't this be a format-compatibility check, so you
> don't (unlikely though it is) attempt to flip to a BGR drawable on an
> RGB configuration, or a 4444 drawable on 0565?
Yes, i think that would be the best solution, in theory. But i don't
think the info is easily available to the ddx? However, i didn't
search very hard.
More information about the Nouveau