diff options
author | Lionel Landwerlin <[email protected]> | 2019-09-08 12:59:32 +0300 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-09-15 15:37:02 +0300 |
commit | 04dc6074cf7f651b720868e0ba24362b585d1b31 (patch) | |
tree | a4d6f4ec7a4ce32b397fbca1a0e6510539da14dc /src/mesa | |
parent | 6d5f11ab345b05759c22acbcd2f79928311689e3 (diff) |
driconfig: add a new engine name/version parameter
Vulkan applications can register with the following structure :
typedef struct VkApplicationInfo {
VkStructureType sType;
const void* pNext;
const char* pApplicationName;
uint32_t applicationVersion;
const char* pEngineName;
uint32_t engineVersion;
uint32_t apiVersion;
} VkApplicationInfo;
This enables the Vulkan implementations to apply workarounds based off
matching this description.
Here we add a new parameter for matching the driconfig options with
the following :
<device driver="anv">
<application engine_name_match="MyOwnEngine.*" engine_versions="10:12,40:42">
<option name="blaaah" value="true" />
</application>
</device>
v2: switch engine name match to use regexps
v3: Verify that the regexec returns REG_NOMATCH for match failure (Eric)
v4: Add missing bit that went to the following commit (Eric)
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Cc: 19.2 <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 4 |
6 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index a384cadd557..45f614bf720 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -148,7 +148,8 @@ driCreateNewScreen2(int scrn, int fd, /* Option parsing before ->InitScreen(), as some options apply there. */ driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions); - driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2", NULL); + driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, + "dri2", NULL, NULL, 0); *driver_configs = psp->driver->InitScreen(psp); if (*driver_configs == NULL) { diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index aa3175816cf..14b56f614d9 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -446,7 +446,7 @@ intelInitContext(struct intel_context *intel, 0, sizeof(ctx->TextureFormatSupported)); driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache, - sPriv->myNum, "i915", NULL); + sPriv->myNum, "i915", NULL, NULL, 0); intel->maxBatchSize = 4096; /* Estimate the size of the mappable aperture into the GTT. There's an diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6cec836da5c..ac84864f521 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -844,7 +844,7 @@ brw_process_driconf_options(struct brw_context *brw) driOptionCache *options = &brw->optionCache; driParseConfigFiles(options, &brw->screen->optionCache, brw->driContext->driScreenPriv->myNum, - "i965", NULL); + "i965", NULL, NULL, 0); if (INTEL_DEBUG & DEBUG_NO_HIZ) { brw->has_hiz = false; diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index b7d3a408c1f..81df6b34e65 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -2524,7 +2524,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen) driParseOptionInfo(&options, brw_config_options.xml); driParseConfigFiles(&screen->optionCache, &options, dri_screen->myNum, - "i965", NULL); + "i965", NULL, NULL, 0); driDestroyOptionCache(&options); screen->driScrnPriv = dri_screen; diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 4f210bf6522..742862d2675 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -216,13 +216,13 @@ GLboolean r200CreateContext( gl_api api, * the default textures. */ driParseConfigFiles (&rmesa->radeon.optionCache, &screen->optionCache, - screen->driScreen->myNum, "r200", NULL); + screen->driScreen->myNum, "r200", NULL, NULL, 0); rmesa->radeon.initialMaxAnisotropy = driQueryOptionf(&rmesa->radeon.optionCache, "def_max_anisotropy"); if (driQueryOptionb( &rmesa->radeon.optionCache, "hyperz")) rmesa->using_hyperz = GL_TRUE; - + /* Init default driver functions then plug in our R200-specific functions * (the texture functions are especially important) */ diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 57c7079b2f2..9db0ea6db3e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -177,13 +177,13 @@ r100CreateContext( gl_api api, /* init exp fog table data */ radeonInitStaticFogData(); - + /* Parse configuration files. * Do this here so that initialMaxAnisotropy is set before we create * the default textures. */ driParseConfigFiles (&rmesa->radeon.optionCache, &screen->optionCache, - screen->driScreen->myNum, "radeon", NULL); + screen->driScreen->myNum, "radeon", NULL, NULL, 0); rmesa->radeon.initialMaxAnisotropy = driQueryOptionf(&rmesa->radeon.optionCache, "def_max_anisotropy"); |