1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies

This commit is contained in:
Bastiaan Olij
2022-05-28 21:09:23 +10:00
parent 0810b0d471
commit 69b66ec425
5 changed files with 18 additions and 2 deletions

View File

@@ -592,6 +592,10 @@ void RendererStorageRD::update_dirty_resources() {
}
bool RendererStorageRD::has_os_feature(const String &p_feature) const {
if (!RD::get_singleton()) {
return false;
}
if (p_feature == "rgtc" && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_BC5_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) {
return true;
}