summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-09-27 15:25:40 -0700
committerEric Anholt <[email protected]>2013-10-24 14:04:20 -0700
commit6868923702d5cdb93d06627ea4f40abe99cda75a (patch)
tree7037221cdea5b365f6c1f78b50e97aa5532f1709 /src/gallium/state_trackers
parentcf5d8fc310dbf59a61e4859b79219b3ac3b223ac (diff)
dri: Move driver config options to dri driver extensions.
This way they aren't all sitting in the global namespace (with the same name per driver). Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c10
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.h2
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c1
-rw-r--r--src/gallium/state_trackers/dri/sw/drisw.c1
4 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 92cac73d5bc..7410dbeba59 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -47,7 +47,10 @@
#undef false
-PUBLIC const char __driConfigOptions[] =
+const __DRIconfigOptionsExtension gallium_config_options = {
+ .base = { __DRI_CONFIG_OPTIONS, 1 },
+ .xml =
+
DRI_CONF_BEGIN
DRI_CONF_SECTION_QUALITY
DRI_CONF_FORCE_S3TC_ENABLE("false")
@@ -70,7 +73,8 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false")
DRI_CONF_SECTION_END
- DRI_CONF_END;
+ DRI_CONF_END
+};
#define false 0
@@ -415,7 +419,7 @@ dri_init_screen_helper(struct dri_screen *screen,
else
screen->target = PIPE_TEXTURE_RECT;
- driParseOptionInfo(&screen->optionCacheDefaults, __driConfigOptions);
+ driParseOptionInfo(&screen->optionCacheDefaults, gallium_config_options.xml);
driParseConfigFiles(&screen->optionCache,
&screen->optionCacheDefaults,
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h
index 18ede869ad7..f263a90e20e 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.h
+++ b/src/gallium/state_trackers/dri/common/dri_screen.h
@@ -133,6 +133,8 @@ dri_destroy_screen_helper(struct dri_screen * screen);
void
dri_destroy_screen(__DRIscreen * sPriv);
+extern const __DRIconfigOptionsExtension gallium_config_options;
+
#endif
/* vim: set sw=3 ts=8 sts=3 expandtab: */
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 56479686366..868cd25db6f 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -950,6 +950,7 @@ const struct __DriverAPIRec driDriverAPI = {
PUBLIC const __DRIextension *__driDriverExtensions[] = {
&driCoreExtension.base,
&driDRI2Extension.base,
+ &gallium_config_options.base,
NULL
};
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 121a2057a32..9f00a53152e 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -365,6 +365,7 @@ const struct __DriverAPIRec driDriverAPI = {
PUBLIC const __DRIextension *__driDriverExtensions[] = {
&driCoreExtension.base,
&driSWRastExtension.base,
+ &gallium_config_options.base,
NULL
};