aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri2/dri2.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
committermarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
commit1af6fc1b5d93e54d6674de8b5870448b29f139a7 (patch)
tree83c0d1097657f08544c154d5ba6c820c1fb67e78 /xorg-server/hw/xfree86/dri2/dri2.c
parente4580373a81894c451e5933b24906a075828b77e (diff)
downloadvcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.gz
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.bz2
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.zip
fontconfig libX11 libXft mesa pixman xserver xkeyboard-config git update 4
May 2012
Diffstat (limited to 'xorg-server/hw/xfree86/dri2/dri2.c')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 591ff3ace..babf32f13 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -107,6 +107,7 @@ typedef struct _DRI2Screen {
DRI2AuthMagicProcPtr AuthMagic;
DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify;
DRI2SwapLimitValidateProcPtr SwapLimitValidate;
+ DRI2GetParamProcPtr GetParam;
HandleExposuresProcPtr HandleExposures;
@@ -1210,6 +1211,11 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
ds->SwapLimitValidate = info->SwapLimitValidate;
}
+ if (info->version >= 7) {
+ ds->GetParam = info->GetParam;
+ cur_minor = 4;
+ }
+
/*
* if the driver doesn't provide an AuthMagic function or the info struct
* version is too low, it relies on the old method (using libdrm) or fail
@@ -1332,3 +1338,38 @@ DRI2Version(int *major, int *minor)
if (minor != NULL)
*minor = DRI2VersRec.minorversion;
}
+
+int
+DRI2GetParam(ClientPtr client,
+ DrawablePtr drawable,
+ CARD64 param,
+ BOOL *is_param_recognized,
+ CARD64 *value)
+{
+ DRI2ScreenPtr ds = DRI2GetScreen(drawable->pScreen);
+ char high_byte = (param >> 24);
+
+ switch (high_byte) {
+ case 0:
+ /* Parameter names whose high_byte is 0 are reserved for the X
+ * server. The server currently recognizes no parameters.
+ */
+ goto not_recognized;
+ case 1:
+ /* Parameter names whose high byte is 1 are reserved for the DDX. */
+ if (ds->GetParam)
+ return ds->GetParam(client, drawable, param,
+ is_param_recognized, value);
+ else
+ goto not_recognized;
+ default:
+ /* Other parameter names are reserved for future use. They are never
+ * recognized.
+ */
+ goto not_recognized;
+ }
+
+not_recognized:
+ *is_param_recognized = FALSE;
+ return Success;
+}