diff options
author | Dave Airlie <airlied@redhat.com> | 2013-02-07 10:47:20 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-02-07 10:48:07 +1000 |
commit | 61a277488f7195914cbdda10355db0d758fc801c (patch) | |
tree | 763f75b7fbde52dd99e88744f0e5a4c8925b15c3 | |
parent | e8f222fd10e21f39488d3d8c697e4948cd787cd0 (diff) | |
download | xorg-driver-xf86-video-nouveau-61a277488f7195914cbdda10355db0d758fc801c.tar.gz |
nouveau: fix build on older X servers
should fix https://bugs.freedesktop.org/show_bug.cgi?id=60369
Reported-by: fabio.ped@libero.it
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/nouveau_exa.c | 2 | ||||
-rw-r--r-- | src/nv_accel_common.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index b8e9bef..bcc0d4e 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -139,8 +139,10 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth, return NULL; } +#ifdef NOUVEAU_PIXMAP_SHARING if ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) nvpix->shared = TRUE; +#endif return nvpix; } diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c index 09c14b3..b06fe0c 100644 --- a/src/nv_accel_common.c +++ b/src/nv_accel_common.c @@ -35,11 +35,15 @@ nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, NVPtr pNv = NVPTR(scrn); Bool scanout = (usage_hint & NOUVEAU_CREATE_PIXMAP_SCANOUT); Bool tiled = (usage_hint & NOUVEAU_CREATE_PIXMAP_TILED); - Bool shared = ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED); + Bool shared = FALSE; union nouveau_bo_config cfg = {}; int flags = NOUVEAU_BO_MAP | (bpp >= 8 ? NOUVEAU_BO_VRAM : 0); int cpp = bpp / 8, ret; +#ifdef NOUVEAU_PIXMAP_SHARING + shared = ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED); +#endif + flags = NOUVEAU_BO_MAP; if (bpp >= 8) flags |= shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM; |