Skip to content

Commit 246b062

Browse files
committed
basis_universal: Update to 1.60
1 parent 78c9f8d commit 246b062

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+36977
-13986
lines changed

modules/basis_universal/SCsub

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,24 @@ basisu_encoder = env.editor_build
2020
if basisu_encoder:
2121
encoder_sources = [
2222
"3rdparty/android_astc_decomp.cpp",
23-
"basisu_astc_hdr_enc.cpp",
23+
"basisu_astc_hdr_6x6_enc.cpp",
24+
"basisu_astc_hdr_common.cpp",
2425
"basisu_backend.cpp",
2526
"basisu_basis_file.cpp",
2627
"basisu_bc7enc.cpp",
27-
"basisu_opencl.cpp",
2828
"basisu_comp.cpp",
2929
"basisu_enc.cpp",
3030
"basisu_etc.cpp",
3131
"basisu_frontend.cpp",
3232
"basisu_gpu_texture.cpp",
3333
"basisu_kernels_sse.cpp",
34+
"basisu_opencl.cpp",
3435
"basisu_pvrtc1_4.cpp",
35-
"basisu_resampler.cpp",
3636
"basisu_resample_filters.cpp",
37+
"basisu_resampler.cpp",
3738
"basisu_ssim.cpp",
3839
"basisu_uastc_enc.cpp",
40+
"basisu_uastc_hdr_4x4_enc.cpp",
3941
"pvpngreader.cpp",
4042
]
4143
encoder_sources = [thirdparty_dir + "encoder/" + file for file in encoder_sources]

modules/basis_universal/image_compress_basisu.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedCha
101101
basisu::basis_compressor_params params;
102102

103103
params.m_uastc = true;
104-
params.m_quality_level = basisu::BASISU_QUALITY_MIN;
105-
params.m_pack_uastc_flags &= ~basisu::cPackUASTCLevelMask;
106-
params.m_pack_uastc_flags |= basisu::cPackUASTCLevelFastest;
104+
params.m_etc1s_quality_level = basisu::BASISU_QUALITY_MIN;
105+
params.m_pack_uastc_ldr_4x4_flags &= ~basisu::cPackUASTCLevelMask;
106+
params.m_pack_uastc_ldr_4x4_flags |= basisu::cPackUASTCLevelFastest;
107107

108-
params.m_rdo_uastc = 0.0f;
109-
params.m_rdo_uastc_quality_scalar = 0.0f;
110-
params.m_rdo_uastc_dict_size = 1024;
108+
params.m_rdo_uastc_ldr_4x4 = 0.0f;
109+
params.m_rdo_uastc_ldr_4x4_quality_scalar = 0.0f;
110+
params.m_rdo_uastc_ldr_4x4_dict_size = 1024;
111111

112112
params.m_mip_fast = true;
113113
params.m_multithreading = true;
@@ -127,7 +127,7 @@ Vector<uint8_t> basis_universal_packer(const Ref<Image> &p_image, Image::UsedCha
127127
if (is_hdr) {
128128
decompress_format = BASIS_DECOMPRESS_HDR_RGB;
129129
params.m_hdr = true;
130-
params.m_uastc_hdr_options.set_quality_level(0);
130+
params.m_uastc_hdr_4x4_options.set_quality_level(0);
131131

132132
} else {
133133
switch (p_channels) {

thirdparty/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Files extracted from upstream source:
6262
## basis_universal
6363

6464
- Upstream: https://github.com/BinomialLLC/basis_universal
65-
- Version: 1.50.0 (051ad6d8a64bb95a79e8601c317055fd1782ad3e, 2024)
65+
- Version: 1.60 (323239a6a5ffa57d6570cfc403be99156e33a8b0, 2025)
6666
- License: Apache 2.0
6767

6868
Files extracted from upstream source:
@@ -77,6 +77,8 @@ Patches:
7777
- `0002-external-jpgd.patch` (GH-88508)
7878
- `0003-external-tinyexr.patch` (GH-97582)
7979
- `0004-remove-tinydds-qoi.patch` (GH-97582)
80+
- `0005-windows-illegal-character.patch` (GH-103968)
81+
- `0006-ambiguous-calls.patch` (GH-103968)
8082

8183

8284
## brotli
@@ -512,6 +514,7 @@ Patches:
512514

513515
- `0001-external-basisu.patch` (GH-76572)
514516
- `0002-disable-astc-block-ext.patch` (GH-76572)
517+
- `0003-basisu-1.60.patch` (GH-103968)
515518

516519

517520
## libogg

thirdparty/basis_universal/encoder/3rdparty/android_astc_decomp.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,12 @@ void decodeISETritBlock (ISEDecodedResult* dst, int numValues, BitAccessStream&
836836
m[4] = data.getNext(numBits);
837837
deUint32 T7 = data.getNext(1);
838838

839+
#ifndef __EMSCRIPTEN__
839840
#ifdef __GNUC__
840841
#pragma GCC diagnostic push
841842
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
842843
#endif
844+
#endif
843845
switch (numValues)
844846
{
845847
// \note Fall-throughs.
@@ -851,9 +853,11 @@ void decodeISETritBlock (ISEDecodedResult* dst, int numValues, BitAccessStream&
851853
default:
852854
DE_ASSERT(false);
853855
}
856+
#ifndef __EMSCRIPTEN__
854857
#ifdef __GNUC__
855858
#pragma GCC diagnostic pop
856859
#endif
860+
#endif
857861

858862
const deUint32 T = (T7 << 7) | (T56 << 5) | (T4 << 4) | (T23 << 2) | (T01 << 0);
859863

@@ -898,10 +902,12 @@ void decodeISEQuintBlock (ISEDecodedResult* dst, int numValues, BitAccessStream&
898902
m[2] = data.getNext(numBits);
899903
deUint32 Q56 = data.getNext(2);
900904

905+
#ifndef __EMSCRIPTEN__
901906
#ifdef __GNUC__
902907
#pragma GCC diagnostic push
903908
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
904909
#endif
910+
#endif
905911
switch (numValues)
906912
{
907913
// \note Fall-throughs.
@@ -911,9 +917,11 @@ void decodeISEQuintBlock (ISEDecodedResult* dst, int numValues, BitAccessStream&
911917
default:
912918
DE_ASSERT(false);
913919
}
920+
#ifndef __EMSCRIPTEN__
914921
#ifdef __GNUC__
915922
#pragma GCC diagnostic pop
916923
#endif
924+
#endif
917925

918926
const deUint32 Q = (Q56 << 5) | (Q34 << 3) | (Q012 << 0);
919927

0 commit comments

Comments
 (0)