summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.h')
-rw-r--r--src/mesa/drivers/dri/common/utils.h49
1 files changed, 46 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 3346914fe60..be328df058f 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -32,12 +32,52 @@
#include "context.h"
#include "dri_util.h"
-struct dri_debug_control
-{
+struct dri_debug_control {
const char * string;
unsigned flag;
};
+/**
+ * Description of the entry-points and parameters for an OpenGL function.
+ */
+struct dri_extension_function {
+ /**
+ * \brief
+ * Packed string describing the parameter signature and the entry-point
+ * names.
+ *
+ * The parameter signature and the names of the entry-points for this
+ * function are packed into a single string. The substrings are
+ * separated by NUL characters. The whole string is terminated by
+ * two consecutive NUL characters.
+ */
+ const char * strings;
+
+
+ /**
+ * Offset of the function in the dispatch table.
+ */
+ unsigned offset;
+};
+
+/**
+ * Description of the API for an extension to OpenGL.
+ */
+struct dri_extension {
+ /**
+ * Name of the extension.
+ */
+ const char * name;
+
+
+ /**
+ * Pointer to a list of \c dri_extension_function structures. The list
+ * is terminated by a structure with a \c NULL
+ * \c dri_extension_function::strings pointer.
+ */
+ const struct dri_extension_function * functions;
+};
+
extern unsigned driParseDebugString( const char * debug,
const struct dri_debug_control * control );
@@ -45,7 +85,10 @@ extern unsigned driGetRendererString( char * buffer,
const char * hardware_name, const char * driver_date, GLuint agp_mode );
extern void driInitExtensions( GLcontext * ctx,
- const char * const card_extensions[], GLboolean enable_imaging );
+ const struct dri_extension * card_extensions, GLboolean enable_imaging );
+
+extern void driInitSingleExtension( GLcontext * ctx,
+ const struct dri_extension * ext );
#ifndef DRI_NEW_INTERFACE_ONLY
extern GLboolean driCheckDriDdxDrmVersions( __DRIscreenPrivate *sPriv,