[Mesa-dev] [PATCH 08/16] dri_util: cleanup dri extension handling

Emil Velikov emil.l.velikov at gmail.com
Sun Mar 16 06:48:28 PDT 2014


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 <emil.l.velikov at gmail.com>
---
 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(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index aed73c7..c4ff9c7 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -778,7 +778,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 a37a0bb..1138bf1 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;
-- 
1.9.0



More information about the mesa-dev mailing list