[Mesa-dev] [PATCH 02/16] swrast: add the possibility to set options via drirc
Martin Peres
martin.peres at linux.intel.com
Fri Jun 5 06:03:56 PDT 2015
It is currently useless but it will be used very soon!
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
src/mesa/drivers/dri/swrast/swrast.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 2d4bb70..1522636 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -66,6 +66,17 @@
# include <sys/sysctl.h>
#endif
+#include "xmlpool.h"
+
+static const __DRIconfigOptionsExtension swrast_config_options = {
+ .base = { __DRI_CONFIG_OPTIONS, 1 },
+ .xml =
+
+DRI_CONF_BEGIN
+ /* will be filled later with cross-driver options */
+DRI_CONF_END
+};
+
const __DRIextension **__driDriverGetExtensions_swrast(void);
const char * const swrast_vendor_string = "Mesa Project";
@@ -758,6 +769,7 @@ dri_create_context(gl_api api,
struct gl_context *mesaCtx = NULL;
struct gl_context *sharedCtx = NULL;
struct dd_function_table functions;
+ driOptionCache optionCache;
TRACE;
@@ -784,6 +796,10 @@ dri_create_context(gl_api api,
mesaCtx = &ctx->Base;
+ /* parse information in __driConfigOptions */
+ driParseOptionInfo(&optionCache, swrast_config_options.xml);
+ driDestroyOptionInfo(&optionCache);
+
/* basic context setup */
if (!_mesa_initialize_context(mesaCtx, api, visual, sharedCtx, &functions)) {
*error = __DRI_CTX_ERROR_NO_MEMORY;
--
2.4.2
More information about the mesa-dev
mailing list