summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-04-24 09:51:22 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2015-04-24 09:51:22 +0900
commit84df3e7114fb71b5e10c1a6f7869ab1505fef5b0 (patch)
tree019ada16a97c7d2fbf82353e7beff0646be9c125
parentb947f4bf4efa8841bea4d306d0b0d21c7511c724 (diff)
glamor: Handle GLAMOR_* flags removed from xserver
The behaviour is the same as when the removed flags were passed in. (cherry picked from radeon commit b16609b453bb1a181198cf27778f205dc23fb642) Reviewed-by: Christian König <christian.koenig@amd.com>
-rw-r--r--src/amdgpu_glamor.c10
-rw-r--r--src/amdgpu_glamor.h16
2 files changed, 19 insertions, 7 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 00f3845..22fea4a 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -298,13 +298,9 @@ Bool amdgpu_glamor_init(ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
- if (!glamor_init
- (screen,
- GLAMOR_INVERTED_Y_AXIS | GLAMOR_USE_EGL_SCREEN | GLAMOR_USE_SCREEN
-#ifdef GLAMOR_NO_DRI3
- | GLAMOR_NO_DRI3
-#endif
- | GLAMOR_USE_PICTURE_SCREEN)) {
+ if (!glamor_init(screen, GLAMOR_USE_EGL_SCREEN | GLAMOR_USE_SCREEN |
+ GLAMOR_USE_PICTURE_SCREEN | GLAMOR_INVERTED_Y_AXIS |
+ GLAMOR_NO_DRI3)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to initialize glamor.\n");
return FALSE;
diff --git a/src/amdgpu_glamor.h b/src/amdgpu_glamor.h
index 0b4adfb..01b5ce1 100644
--- a/src/amdgpu_glamor.h
+++ b/src/amdgpu_glamor.h
@@ -32,6 +32,22 @@
#define GLAMOR_FOR_XORG 1
#include <glamor.h>
+#ifndef GLAMOR_NO_DRI3
+#define GLAMOR_NO_DRI3 0
+#define glamor_fd_from_pixmap glamor_dri3_fd_from_pixmap
+#define glamor_pixmap_from_fd glamor_egl_dri3_pixmap_from_fd
+#endif
+
+#ifndef GLAMOR_INVERTED_Y_AXIS
+#define GLAMOR_INVERTED_Y_AXIS 0
+#endif
+#ifndef GLAMOR_USE_SCREEN
+#define GLAMOR_USE_SCREEN 0
+#endif
+#ifndef GLAMOR_USE_PICTURE_SCREEN
+#define GLAMOR_USE_PICTURE_SCREEN 0
+#endif
+
Bool amdgpu_glamor_pre_init(ScrnInfoPtr scrn);
Bool amdgpu_glamor_init(ScreenPtr screen);
Bool amdgpu_glamor_create_screen_resources(ScreenPtr screen);