mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-10-06 00:55:29 +00:00
Make codec options externally configurable and remove BC7 support
This change makes it possible to exclude formats using compile time options. BC7 is *never* exposed on the web and it has an absolutely huge coding table which means we're just wasting space. basis_transcoder.js 58707 basis_transcoder.wasm 224404
This commit is contained in:
@@ -23,11 +23,25 @@
|
||||
// Set to 1 for fuzz testing. This will disable all CRC16 checks on headers and compressed data.
|
||||
#define BASISU_NO_HEADER_OR_DATA_CRC16_CHECKS 0
|
||||
|
||||
#define BASISD_SUPPORT_DXT1 1
|
||||
#define BASISD_SUPPORT_DXT5A 1
|
||||
#define BASISD_SUPPORT_BC7 1
|
||||
#define BASISD_SUPPORT_PVRTC1 1
|
||||
#define BASISD_SUPPORT_ETC2_EAC_A8 1
|
||||
#ifndef BASISD_SUPPORT_DXT1
|
||||
#define BASISD_SUPPORT_DXT1 1
|
||||
#endif
|
||||
|
||||
#ifndef BASISD_SUPPORT_DXT5A
|
||||
#define BASISD_SUPPORT_DXT5A 1
|
||||
#endif
|
||||
|
||||
#ifndef BASISD_SUPPORT_BC7
|
||||
#define BASISD_SUPPORT_BC7 1
|
||||
#endif
|
||||
|
||||
#ifndef BASISD_SUPPORT_PVRTC1
|
||||
#define BASISD_SUPPORT_PVRTC1 1
|
||||
#endif
|
||||
|
||||
#ifndef BASISD_SUPPORT_ETC2_EAC_A8
|
||||
#define BASISD_SUPPORT_ETC2_EAC_A8 1
|
||||
#endif
|
||||
|
||||
#define BASISD_WRITE_NEW_BC7_TABLES 0
|
||||
#define BASISD_WRITE_NEW_DXT1_TABLES 0
|
||||
|
||||
@@ -15,5 +15,5 @@ if (EMSCRIPTEN)
|
||||
set_target_properties(basis_transcoder.js PROPERTIES
|
||||
OUTPUT_NAME "basis_transcoder"
|
||||
SUFFIX ".js"
|
||||
LINK_FLAGS "--bind -s ALLOW_MEMORY_GROWTH=1 -O3 -s ASSERTIONS=0 -DNDEBUG")
|
||||
LINK_FLAGS "--bind -s ALLOW_MEMORY_GROWTH=1 -O3 -s ASSERTIONS=0 -DNDEBUG -DBASISD_SUPPORT_BC7=0")
|
||||
endif()
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Reference in New Issue
Block a user