From c812557a0e1d6242362460ba6a3aa2012ea9f4b1 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 12 Feb 2014 20:47:21 +0000 Subject: dri_util: cleanup dri extension handling Explicitly set the version that is implemented, as that may differ from the one defined in dri_interface.h. The remaining __DRI*Extensions are treated as constants, so got ahead and declare them as such. Signed-off-by: Emil Velikov Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/common/dri_util.c | 2 +- src/mesa/drivers/dri/common/dri_util.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index c4104743b50..248c3616524 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -775,7 +775,7 @@ const __DRIswrastExtension driSWRastExtension = { }; const __DRI2configQueryExtension dri2ConfigQueryExtension = { - .base = { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION }, + .base = { __DRI2_CONFIG_QUERY, 1 }, .configQueryb = dri2ConfigQueryb, .configQueryi = dri2ConfigQueryi, diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index a37a0bbbcd0..1138bf106de 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -174,13 +174,13 @@ struct __DRIscreenRec { struct { /* Flag to indicate that this is a DRI2 screen. Many of the above * fields will not be valid or initializaed in that case. */ - __DRIdri2LoaderExtension *loader; - __DRIimageLookupExtension *image; - __DRIuseInvalidateExtension *useInvalidate; + const __DRIdri2LoaderExtension *loader; + const __DRIimageLookupExtension *image; + const __DRIuseInvalidateExtension *useInvalidate; } dri2; struct { - __DRIimageLoaderExtension *loader; + const __DRIimageLoaderExtension *loader; } image; driOptionCache optionInfo; -- cgit v1.2.3