summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2013-04-25 17:10:12 +0200
committerMichel Dänzer <michel@daenzer.net>2013-04-26 09:18:19 +0200
commit8a9e9b21cbb44c23d37bf18c983e2c3f0fe33e87 (patch)
tree71be2296f290d8ec8f31984d991bddadadad1126 /src
parent6216b5aa3793abe71b864170bc9d4d745f027328 (diff)
glamor: Fix build against xserver < 1.13
Those didn't define CREATE_PIXMAP_USAGE_SHARED.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_glamor.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 488593ee..d5279001 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.