dri3: Don't use the major/minor version from the protocol headers
authorAdam Jackson <ajax@redhat.com>
Fri, 13 Dec 2013 16:36:38 +0000 (11:36 -0500)
committerAdam Jackson <ajax@redhat.com>
Fri, 13 Dec 2013 19:59:03 +0000 (14:59 -0500)
We want to advertise the version we implement, not the version the
protocol headers happen to describe.

Reviewed-by: Jasper St. Pierre <<jstpierre@mecheye.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
dri3/dri3_request.c
include/protocol-versions.h

index 3ebb9d5..4e1408f 100644 (file)
@@ -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);
index 95df8ce..7fe61e0 100644 (file)
 #define SERVER_DAMAGE_MAJOR_VERSION            1
 #define SERVER_DAMAGE_MINOR_VERSION            1
 
+/* DRI3 */
+#define SERVER_DRI3_MAJOR_VERSION               1
+#define SERVER_DRI3_MINOR_VERSION               0
+
 /* DMX */
 #define SERVER_DMX_MAJOR_VERSION               2
 #define SERVER_DMX_MINOR_VERSION               2