From: Charles Giessen Date: Fri, 28 Jan 2022 18:28:23 +0000 (-0700) Subject: Ignore layers with non zero variant value X-Git-Tag: upstream/v1.3.207~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c64dac9b343d8aca1878666b860e503904ec74a;p=platform%2Fupstream%2FVulkan-Loader.git Ignore layers with non zero variant value Layers which contain an API version where the variant value is non zero are not designed for the Vulkan-Loader, so it should be ignored. --- diff --git a/loader/loader.c b/loader/loader.c index a5fd1659..dbf7a51e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -2265,6 +2265,15 @@ static VkResult loader_read_layer_json(const struct loader_instance *inst, struc props->disable_env_var.value[sizeof(props->disable_env_var.value) - 1] = '\0'; } + // Make sure the layer's manifest doesn't contain a non zero variant value + if (VK_API_VERSION_VARIANT(props->info.specVersion) != 0) { + loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, + "Layer %s has an \'api_version\' field which contains a non-zero variant value of %d. " + " Skipping Layer.", + props->info.layerName, VK_API_VERSION_VARIANT(props->info.specVersion)); + goto out; + } + // Now get all optional items and objects and put in list: // functions // instance_extensions