1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Improve vulkan capability detection on Android

- Add runtime check and abort when the device doesn't meet the requirements for vulkan support
- Add filters to the AndroidManifest when exporting with a vulkan renderer
This commit is contained in:
Fredia Huya-Kouadio
2023-02-05 17:16:13 -08:00
parent b0598dcdb7
commit 034fd15b8a
4 changed files with 48 additions and 2 deletions

View File

@@ -273,6 +273,12 @@ String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"com.oculus.feature.PASSTHROUGH\" android:required=\"true\" />\n";
}
}
String current_renderer = GLOBAL_GET("rendering/renderer/rendering_method.mobile");
bool has_vulkan = current_renderer == "forward_plus" || current_renderer == "mobile";
if (has_vulkan) {
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"android.hardware.vulkan.level\" android:required=\"true\" android:version=\"1\" />\n";
}
return manifest_xr_features;
}