[PATCH] glamor: Fix build against xserver < 1.13

Michel Dänzer michel at daenzer.net
Thu Apr 25 08:17:21 PDT 2013


From: Michel Dänzer <michel.daenzer at amd.com>

Those didn't define CREATE_PIXMAP_USAGE_SHARED.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_glamor.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 488593e..d527900 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -159,6 +159,12 @@ Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap)
 	return priv && priv->bo;
 }
 
+#ifdef CREATE_PIXMAP_USAGE_SHARED
+#define RADEON_CREATE_PIXMAP_SHARED (CREATE_PIXMAP_USAGE_SHARED | RADEON_CREATE_PIXMAP_DRI2)
+#else
+#define RADEON_CREATE_PIXMAP_SHARED RADEON_CREATE_PIXMAP_DRI2
+#endif
+
 static PixmapPtr
 radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 			unsigned usage)
@@ -167,7 +173,7 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 	struct radeon_pixmap *priv;
 	PixmapPtr pixmap, new_pixmap = NULL;
 
-	if (!(usage & (CREATE_PIXMAP_USAGE_SHARED | RADEON_CREATE_PIXMAP_DRI2))) {
+	if (!(usage & RADEON_CREATE_PIXMAP_SHARED)) {
 		pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
 		if (pixmap)
 			return pixmap;
@@ -210,7 +216,7 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 	return pixmap;
 
 fallback_glamor:
-	if (usage & (CREATE_PIXMAP_USAGE_SHARED | RADEON_CREATE_PIXMAP_DRI2)) {
+	if (usage & RADEON_CREATE_PIXMAP_SHARED) {
 	/* XXX need further work to handle the DRI2 failure case.
 	 * Glamor don't know how to handle a BO only pixmap. Put
 	 * a warning indicator here.
-- 
1.7.10.4




More information about the xorg-driver-ati mailing list