For BufferAge support, we just have to guarrantee that we were not using the DRI2Buffer->flags field for anything else (i.e. it is always 0) and then to make sure that we exchange the flags field after buffer exchanges. radeon does not support TripleBuffering so we do not have to worry about perserving the flags when injecting the third buffer.
Signed-off-by: Chris Wilson <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Jerome Glisse <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Michel Dänzer <[email protected]> --- src/radeon_dri2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 0fbe96c..091cd06 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -764,6 +764,11 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt front->name = back->name; back->name = tmp; + /* Swap flags so BufferAge works */ + tmp = front->flags; + front->flags = back->flags; + back->flags = tmp; + /* Swap pixmap bos */ front_bo = radeon_get_pixmap_bo(front_priv->pixmap); back_bo = radeon_get_pixmap_bo(back_priv->pixmap); @@ -1647,6 +1652,11 @@ radeon_dri2_screen_init(ScreenPtr pScreen) dri2_info.CopyRegion2 = radeon_dri2_copy_region2; #endif +#if DRI2INFOREC_VERSION >= 10 + dri2_info.version = 10; + dri2_info.bufferAge = 1; +#endif + info->dri2.enabled = DRI2ScreenInit(pScreen, &dri2_info); return info->dri2.enabled; } -- 2.1.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
