mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
glamor: Fix build against xserver < 1.13
Those didn't define CREATE_PIXMAP_USAGE_SHARED.
This commit is contained in:
committed by
Michel Dänzer
parent
6216b5aa37
commit
8a9e9b21cb
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user