Please sign in to comment.
dri2: Fix can_exchange() to allow page-flipping on more mesa versions.
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. Tested for screen DefaultDepth 24 and also 30 bits (for RGB10 framebuffers) on NV-50. The problem was fixed in the same way in the ati & intel ddx. Signed-off-by: Mario Kleiner <firstname.lastname@example.org> Signed-off-by: Ben Skeggs <email@example.com>
- Loading branch information...