driParseOptionInfo(&dev->option_info, xml_options);
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
- dev->driver_name);
+ dev->driver_name, NULL);
}
char *
ctx->base.throttling = FALSE;
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsNine);
- driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine");
+ driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine", NULL);
if (driCheckOption(&userInitOptions, "throttle_value", DRI_INT)) {
throttling_value_user = driQueryOptioni(&userInitOptions, "throttle_value");
if (throttling_value_user == -1)
char *prime = NULL;
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsLoader);
- driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "loader");
+ driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "loader", NULL);
if (driCheckOption(&userInitOptions, "device_id", DRI_STRING))
prime = strdup(driQueryOptionstr(&userInitOptions, "device_id"));
driDestroyOptionCache(&userInitOptions);
/* Option parsing before ->InitScreen(), as some options apply there. */
driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
- driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2");
+ driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2", NULL);
*driver_configs = psp->driver->InitScreen(psp);
if (*driver_configs == NULL) {
0, sizeof(ctx->TextureFormatSupported));
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
- sPriv->myNum, "i915");
+ sPriv->myNum, "i915", NULL);
intel->maxBatchSize = 4096;
/* Estimate the size of the mappable aperture into the GTT. There's an
driOptionCache *options = &brw->optionCache;
driParseConfigFiles(options, &brw->screen->optionCache,
- brw->driContext->driScreenPriv->myNum, "i965");
+ brw->driContext->driScreenPriv->myNum,
+ "i965", NULL);
int bo_reuse_mode = driQueryOptioni(options, "bo_reuse");
switch (bo_reuse_mode) {
memset(&options, 0, sizeof(options));
driParseOptionInfo(&options, brw_config_options.xml);
- driParseConfigFiles(&screen->optionCache, &options, dri_screen->myNum, "i965");
+ driParseConfigFiles(&screen->optionCache, &options, dri_screen->myNum,
+ "i965", NULL);
driDestroyOptionCache(&options);
screen->driScrnPriv = dri_screen;
* the default textures.
*/
driParseConfigFiles (&rmesa->radeon.optionCache, &screen->optionCache,
- screen->driScreen->myNum, "r200");
+ screen->driScreen->myNum, "r200", NULL);
rmesa->radeon.initialMaxAnisotropy = driQueryOptionf(&rmesa->radeon.optionCache,
"def_max_anisotropy");
* the default textures.
*/
driParseConfigFiles (&rmesa->radeon.optionCache, &screen->optionCache,
- screen->driScreen->myNum, "radeon");
+ screen->driScreen->myNum, "radeon", NULL);
rmesa->radeon.initialMaxAnisotropy = driQueryOptionf(&rmesa->radeon.optionCache,
"def_max_anisotropy");
driOptionCache *cache;
int screenNum;
const char *driverName, *execName;
+ const char *kernelDriverName;
uint32_t ignoringDevice;
uint32_t ignoringApp;
uint32_t inDriConf;
parseDeviceAttr(struct OptConfData *data, const XML_Char **attr)
{
uint32_t i;
- const XML_Char *driver = NULL, *screen = NULL;
+ const XML_Char *driver = NULL, *screen = NULL, *kernel = NULL;
for (i = 0; attr[i]; i += 2) {
if (!strcmp (attr[i], "driver")) driver = attr[i+1];
else if (!strcmp (attr[i], "screen")) screen = attr[i+1];
+ else if (!strcmp (attr[i], "kernel_driver")) kernel = attr[i+1];
else XML_WARNING("unknown device attribute: %s.", attr[i]);
}
if (driver && strcmp (driver, data->driverName))
data->ignoringDevice = data->inDevice;
+ else if (kernel && (!data->kernelDriverName || strcmp (kernel, data->kernelDriverName)))
+ data->ignoringDevice = data->inDevice;
else if (screen) {
driOptionValue screenNum;
if (!parseValue (&screenNum, DRI_INT, screen))
void
driParseConfigFiles(driOptionCache *cache, const driOptionCache *info,
- int screenNum, const char *driverName)
+ int screenNum, const char *driverName,
+ const char *kernelDriverName)
{
char *home;
struct OptConfData userData;
userData.cache = cache;
userData.screenNum = screenNum;
userData.driverName = driverName;
+ userData.kernelDriverName = kernelDriverName;
userData.execName = util_get_process_name();
parseConfigDir(&userData, DATADIR "/drirc.d");
const char *configOptions);
/** \brief Initialize option cache from info and parse configuration files
*
- * To be called in <driver>CreateContext. screenNum and driverName select
- * device sections. */
+ * To be called in <driver>CreateContext. screenNum, driverName and
+ * kernelDriverName select device sections. */
void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
- int screenNum, const char *driverName);
+ int screenNum, const char *driverName,
+ const char *kernelDriverName);
/** \brief Destroy option info
*
* To be called in <driver>DestroyScreen */