summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-06-26 15:22:13 -0700
committerEric Anholt <[email protected]>2013-08-17 11:43:19 +0200
commitbef423bee62f7b74858f1b7f74be21405ca75eef (patch)
tree1652593dcdcb566e62637347ffe99ed55dc8e7a0 /src/gallium/state_trackers
parent703a2f4219e6a95b7445138082e24cd762b1fa7e (diff)
dri: Choose a decent global driNConfigOptions.
Previously, we were asserting that each driver specified an NConfigOptions exactly equal to the number of options they supplied, leading to frequent bugs when people would forget to adjust the value when adjusting driver options. Instead, just overallocate the table by a bit and leave sanity checking to the assert in findOption(). Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_screen.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 3b42b5aa243..779741e32e3 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -74,8 +74,6 @@ PUBLIC const char __driConfigOptions[] =
#define false 0
-static const uint __driNConfigOptions = 13;
-
static const __DRIconfig **
dri_fill_in_modes(struct dri_screen *screen)
{
@@ -417,8 +415,7 @@ dri_init_screen_helper(struct dri_screen *screen,
else
screen->target = PIPE_TEXTURE_RECT;
- driParseOptionInfo(&screen->optionCacheDefaults,
- __driConfigOptions, __driNConfigOptions);
+ driParseOptionInfo(&screen->optionCacheDefaults, __driConfigOptions);
driParseConfigFiles(&screen->optionCache,
&screen->optionCacheDefaults,