From e7e4fa56cc53cea54cde8fd100f5348aa59a52ed Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 28 Apr 2025 17:52:26 -0700 Subject: [PATCH] [Impeller] report application version info as 2.0 (#167961) Update the reported engine so we can distinguish 3.27 engines from (eventually) newer engines. --- .../impeller/renderer/backend/vulkan/context_vk.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/context_vk.cc b/engine/src/flutter/impeller/renderer/backend/vulkan/context_vk.cc index 5b8400d5620..6066065ca2b 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/context_vk.cc +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/context_vk.cc @@ -205,7 +205,18 @@ void ContextVK::Setup(Settings settings) { } vk::ApplicationInfo application_info; - application_info.setApplicationVersion(VK_API_VERSION_1_0); + + // Use the same encoding macro as vulkan versions, but otherwise application + // version is intended to be the version of the Impeller engine. This version + // information, along with the application name below is provided to allow + // IHVs to make optimizations and/or disable functionality based on knowledge + // of the engine version (for example, to work around bugs). We don't tie this + // to the overall Flutter version as that version is not yet defined when the + // engine is compiled. Instead we can manually bump it occassionally. + // + // variant, major, minor, patch + application_info.setApplicationVersion( + VK_MAKE_API_VERSION(0, 2, 0, 0) /*version 2.0.0*/); application_info.setApiVersion(VK_API_VERSION_1_1); application_info.setEngineVersion(VK_API_VERSION_1_0); application_info.setPEngineName("Impeller");