Image: Add static is_format_compressed function.

This commit is contained in:
BlueCube3310 2024-02-24 12:41:08 +01:00
parent 2e7fc81315
commit 8239aeec8e
6 changed files with 12 additions and 7 deletions

View file

@ -92,7 +92,7 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img) {
uint64_t start_time = OS::get_singleton()->get_ticks_msec();
Image::Format img_format = r_img->get_format();
if (img_format >= Image::FORMAT_DXT1) {
if (Image::is_format_compressed(img_format)) {
return; // Do not compress, already compressed.
}
if (img_format > Image::FORMAT_RGBA8) {