From fbd96932d6f8a9add3e81ddd8aa42b327816b02a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 8 Sep 2019 12:59:32 +0300 Subject: 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 : 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 Reviewed-by: Eric Engestrom Reviewed-by: Bas Nieuwenhuizen Cc: 19.2 (cherry picked from commit 04dc6074cf7f651b720868e0ba24362b585d1b31) --- src/amd/vulkan/radv_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/amd/vulkan') diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index f0a18bd10db..974699387ac 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -600,7 +600,9 @@ static void radv_init_dri_options(struct radv_instance *instance) driParseOptionInfo(&instance->available_dri_options, radv_dri_options_xml); driParseConfigFiles(&instance->dri_options, &instance->available_dri_options, - 0, "radv", NULL); + 0, "radv", NULL, + instance->engineName, + instance->engineVersion); } VkResult radv_CreateInstance( -- cgit v1.2.3