summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-04 21:40:45 +0200
committerGitHub <noreply@github.com>2022-08-04 21:40:45 +0200
commit52bfae1741625e2274e1f3b15a4d626d1e7daffd (patch)
tree90656f892eecf78d8244b1ad27620868339aa4f3 /servers/rendering
parent49ac05550e4ce3b3489fad0a2addd907af1f5898 (diff)
parent8a9700c8a76fc0df2d5caf26aeaf6b1b4f6f7202 (diff)
Merge pull request #63918 from akien-mga/no-s3tc-for-mobile
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/utilities.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/utilities.cpp b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
index 5a91046628..ae1f22be3b 100644
--- a/servers/rendering/renderer_rd/storage_rd/utilities.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/utilities.cpp
@@ -290,9 +290,14 @@ bool Utilities::has_os_feature(const String &p_feature) const {
return true;
}
+#if !defined(ANDROID_ENABLED) && !defined(IPHONE_ENABLED)
+ // Some Android devices report support for S3TC but we don't expect that and don't export the textures.
+ // This could be fixed but so few devices support it that it doesn't seem useful (and makes bigger APKs).
+ // For good measure we do the same hack for iOS, just in case.
if (p_feature == "s3tc" && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_BC1_RGB_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) {
return true;
}
+#endif
if (p_feature == "bptc" && RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_BC7_UNORM_BLOCK, RD::TEXTURE_USAGE_SAMPLING_BIT)) {
return true;