mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-08-03 03:49:00 +00:00
Two things prevented the transcoder from compiling with BASISD_SUPPORT_KTX2 set to 0: - ktx2_image_level_info was defined inside the #if BASISD_SUPPORT_KTX2 block, but dds_transcoder::get_image_level_info() takes it by reference and is compiled unconditionally. Move the struct ahead of that block so it is always defined; it has no KTX2-specific members. - The "#include ../zstd/zstd.h" was nested inside #if BASISD_SUPPORT_KTX2, but the Zstd decompressor (zstd_decompress()) is compiled whenever BASISD_SUPPORT_KTX2_ZSTD is set, independent of KTX2 (Zstd is also used by other codecs). With KTX2 off but Zstd on, the ZSTD_* symbols were referenced without the header being included. Gate the include on BASISD_SUPPORT_KTX2_ZSTD alone, matching where the symbols are used. BASISD_SUPPORT_KTX2_ZSTD still defaults to 1 (unchanged). The default build (KTX2 and Zstd both enabled) is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.6 MiB
1.6 MiB