Factor out drivers' DRI2 buffer counting logic
Alex Deucher
alexdeucher at gmail.com
Wed Dec 8 07:55:25 PST 2010
On Wed, Dec 8, 2010 at 1:56 AM, Christopher James Halse Rogers
<christopher.halse.rogers at canonical.com> wrote:
> The DRI2 SwapBuffers request requires drivers to defer the swap work
> until some point in the future. It's entirely possible for the client
> that requested the swap to go away before that trigger occurs, resulting
> in DRI2 buffers being freed in DRI2DrawableGone and then the swap
> event crashing the server trying to access the freed buffers.
>
> The relevant (fixed) crasher bugs are
> Intel: https://bugs.freedesktop.org/show_bug.cgi?id=28080
> Radeon: http://bugs.freedesktop.org/show_bug.cgi?id=29065
>
> I haven't tested nouveau's new pageflipping support, but it looks like
> it suffers the same problem.
>
> Since the big three drivers all suffer this problem, and all
> need to solve it in the same way, it might as well be done
> in DRI2 itself.
These look good to me.
Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
One other thing that might be worth adding to DRI2 is a way for the
driver to access the swap interval. If we could, then the driver
could dynamically disable things like vline waits for buffer blits or
do non-vsynced pageflipping more easily if the swap interval was 0.
Alex
More information about the xorg-devel
mailing list