Files
basis_universal/transcoder/basisu_transcoder.cpp
Richard Geldreich f2497f14d6 KTX2 transcoder: build with BASISD_SUPPORT_KTX2 disabled
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>
2026-07-18 17:20:38 -04:00

1.6 MiB