Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).

This commit is contained in:
clayjohn 2022-09-07 17:44:36 -07:00
parent c2babb6558
commit 4a1c7de57c
43 changed files with 411 additions and 245 deletions

View file

@ -101,10 +101,15 @@ const PackedStringArray ProjectSettings::_get_supported_features() {
features.append(VERSION_BRANCH "." _MKSTR(VERSION_PATCH));
features.append(VERSION_FULL_CONFIG);
features.append(VERSION_FULL_BUILD);
// For now, assume Vulkan is always supported.
// This should be removed if it's possible to build the editor without Vulkan.
features.append("Vulkan Clustered");
features.append("Vulkan Mobile");
#ifdef VULKAN_ENABLED
features.append("Forward Plus");
features.append("Mobile");
#endif
#ifdef GLES3_ENABLED
features.append("GL Compatibility");
#endif
return features;
}
@ -909,7 +914,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
project_features = ProjectSettings::get_required_features();
}
// Check the rendering API.
const String rendering_api = has_setting("rendering/quality/driver/driver_name") ? (String)get_setting("rendering/quality/driver/driver_name") : String();
const String rendering_api = has_setting("rendering/renderer/rendering_method") ? (String)get_setting("rendering/renderer/rendering_method") : String();
if (!rendering_api.is_empty()) {
// Add the rendering API as a project feature if it doesn't already exist.
if (!project_features.has(rendering_api)) {