Skip to content

Commit e7e4fa5

Browse files
[Impeller] report application version info as 2.0 (flutter#167961)
Update the reported engine so we can distinguish 3.27 engines from (eventually) newer engines.
1 parent f7d7633 commit e7e4fa5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

engine/src/flutter/impeller/renderer/backend/vulkan/context_vk.cc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,18 @@ void ContextVK::Setup(Settings settings) {
205205
}
206206

207207
vk::ApplicationInfo application_info;
208-
application_info.setApplicationVersion(VK_API_VERSION_1_0);
208+
209+
// Use the same encoding macro as vulkan versions, but otherwise application
210+
// version is intended to be the version of the Impeller engine. This version
211+
// information, along with the application name below is provided to allow
212+
// IHVs to make optimizations and/or disable functionality based on knowledge
213+
// of the engine version (for example, to work around bugs). We don't tie this
214+
// to the overall Flutter version as that version is not yet defined when the
215+
// engine is compiled. Instead we can manually bump it occassionally.
216+
//
217+
// variant, major, minor, patch
218+
application_info.setApplicationVersion(
219+
VK_MAKE_API_VERSION(0, 2, 0, 0) /*version 2.0.0*/);
209220
application_info.setApiVersion(VK_API_VERSION_1_1);
210221
application_info.setEngineVersion(VK_API_VERSION_1_0);
211222
application_info.setPEngineName("Impeller");

0 commit comments

Comments
 (0)