i965/screen: Allow drirc to set 'allow_rgb10_configs' again.
authorMario Kleiner <mario.kleiner.de@gmail.com>
Thu, 18 Jan 2018 06:16:20 +0000 (08:16 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 18 Jan 2018 06:18:47 +0000 (08:18 +0200)
Since setup of ALLOW_RGB10_CONFIGS was moved to i965's own
brw_config_options.xml, this was hard-coded to false and
could not be overriden by drirc. Add some parsing into
i965's private screen->optionCache to enable drirc again.

Fixes: b391fb26df9f1b ("dri_util: remove ALLOW_RGB10_CONFIGS option (v2)")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/drivers/dri/i965/intel_screen.c

index 190d8ecb115efa3309d5d662322791a1d8cb23d7..9dbda5142e5f23bfc75fbb484e8aaa4a793183b0 100644 (file)
@@ -2395,7 +2395,12 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
       return NULL;
    }
    /* parse information in __driConfigOptions */
-   driParseOptionInfo(&screen->optionCache, brw_config_options.xml);
+   driOptionCache options;
+   memset(&options, 0, sizeof(options));
+
+   driParseOptionInfo(&options, brw_config_options.xml);
+   driParseConfigFiles(&screen->optionCache, &options, dri_screen->myNum, "i965");
+   driDestroyOptionCache(&options);
 
    screen->driScrnPriv = dri_screen;
    dri_screen->driverPrivate = (void *) screen;