aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dri3
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dri3')
-rw-r--r--xorg-server/dri3/dri3.c5
-rw-r--r--xorg-server/dri3/dri3_request.c5
-rw-r--r--xorg-server/dri3/dri3_screen.c6
3 files changed, 14 insertions, 2 deletions
diff --git a/xorg-server/dri3/dri3.c b/xorg-server/dri3/dri3.c
index 2bca7ae9b..76e07b40e 100644
--- a/xorg-server/dri3/dri3.c
+++ b/xorg-server/dri3/dri3.c
@@ -68,6 +68,11 @@ dri3_extension_init(void)
ExtensionEntry *extension;
int i;
+#ifdef PANORAMIX
+ if (!noPanoramiXExtension)
+ return;
+#endif
+
extension = AddExtension(DRI3_NAME, DRI3NumberEvents, DRI3NumberErrors,
proc_dri3_dispatch, sproc_dri3_dispatch,
NULL, StandardMinorOpcode);
diff --git a/xorg-server/dri3/dri3_request.c b/xorg-server/dri3/dri3_request.c
index 3ebb9d509..4e1408fb5 100644
--- a/xorg-server/dri3/dri3_request.c
+++ b/xorg-server/dri3/dri3_request.c
@@ -29,6 +29,7 @@
#include <unistd.h>
#include <xace.h>
#include "../Xext/syncsdk.h"
+#include <protocol-versions.h>
static int
proc_dri3_query_version(ClientPtr client)
@@ -38,8 +39,8 @@ proc_dri3_query_version(ClientPtr client)
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
- .majorVersion = DRI3_MAJOR,
- .minorVersion = DRI3_MINOR
+ .majorVersion = SERVER_DRI3_MAJOR_VERSION,
+ .minorVersion = SERVER_DRI3_MINOR_VERSION
};
REQUEST_SIZE_MATCH(xDRI3QueryVersionReq);
diff --git a/xorg-server/dri3/dri3_screen.c b/xorg-server/dri3/dri3_screen.c
index cf2735b8d..c88029612 100644
--- a/xorg-server/dri3/dri3_screen.c
+++ b/xorg-server/dri3/dri3_screen.c
@@ -55,6 +55,9 @@ dri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd,
dri3_screen_info_ptr info = ds->info;
PixmapPtr pixmap;
+ if (!info || !info->pixmap_from_fd)
+ return BadImplementation;
+
pixmap = (*info->pixmap_from_fd) (screen, fd, width, height, stride, depth, bpp);
if (!pixmap)
return BadAlloc;
@@ -71,6 +74,9 @@ dri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
dri3_screen_info_ptr info = ds->info;
int fd;
+ if (!info || !info->fd_from_pixmap)
+ return BadImplementation;
+
fd = (*info->fd_from_pixmap)(screen, pixmap, stride, size);
if (fd < 0)
return BadAlloc;