diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 12:58:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 12:58:28 +0200 |
commit | de07df55f7bfd711d5d85c3273cbbfb635bba679 (patch) | |
tree | c6e2a45d0b898e428af4a0a2833cd0376dd520fd | |
parent | 32239d477be66d8c94e9a7a95c56ae0cbad54cfb (diff) | |
parent | c1dc59f7134bc9f92daba92f1ed530db73101a5c (diff) | |
download | redot-engine-de07df55f7bfd711d5d85c3273cbbfb635bba679.tar.gz |
Merge pull request #85321 from Calinou/basis-universal-disable-unused-features
Disable unused Basis Universal features to reduce binary size
-rw-r--r-- | modules/basis_universal/SCsub | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/basis_universal/SCsub b/modules/basis_universal/SCsub index 0142317e1e..9bea0a0ca9 100644 --- a/modules/basis_universal/SCsub +++ b/modules/basis_universal/SCsub @@ -50,6 +50,26 @@ if env.dev_build: env_thirdparty = env_basisu.Clone() env_thirdparty.disable_warnings() + +# Disable unneeded features to reduce binary size. +# <https://github.com/BinomialLLC/basis_universal/wiki/How-to-Use-and-Configure-the-Transcoder> +env_thirdparty.Append( + CPPDEFINES=[ + # Storage formats. + # Godot only implements `.basis` support through basis_universal. + # Support for `.ktx` files are implemented with a direct libktx implementation. + # Building the encoder requires `BASISD_SUPPORT_KTX2` to be enabled, + # so we can only disable Zstandard compression for `.ktx` files + # (this is not used in `.basis` files). + ("BASISD_SUPPORT_KTX2_ZSTD", 0), + # GPU compression formats. + ("BASISD_SUPPORT_ATC", 0), # Proprietary Adreno format not supported by Godot. + ("BASISD_SUPPORT_FXT1", 0), # Legacy format not supported by Godot. + ("BASISD_SUPPORT_PVRTC1", 0), # Legacy format not supported by Godot. + ("BASISD_SUPPORT_PVRTC2", 0), # Legacy format not supported by Godot. + ] +) + if env.editor_build: env_thirdparty.Append(CPPDEFINES=["BASISU_NO_IMG_LOADERS"]) env_thirdparty.add_source_files(thirdparty_obj, encoder_sources) |