Files
filament/third_party/etc2comp/tnt
Philip Rideout f56f5a300c Temporary workaround for WebGL builds on macOS.
Better fix is to replace etc2comp and astcenc with basis.
2022-03-22 22:21:57 -07:00
..

This folder was created as follows:

(1)

    curl -L -O https://github.com/google/etc2comp/archive/9cd0f9c.zip
    unzip 9cd0f9c.zip
    mv etc2comp-* etc2comp

(2)

Remove the outer IF block and the EtcTool line from CMakeLists.txt

(3)

Add this line to EtcLib/CMakeLists.txt:

    target_include_directories(EtcLib PUBLIC Etc EtcCodec)

The above line exposes the public header to downstream projects; it's the "Modern CMake"
alternative to the existing lines:

    include_directories(./Etc)
    include_directories(./EtcCodec)

See:

    https://cliutils.gitlab.io/modern-cmake/chapters/intro/dodonot.html

(4)

Add the following to the top of EtcBlock4x4Encoding_RGB8.cpp to prevent potential unbounded upper
loops due to reliance on undefined nan behavior.

#if defined(__clang__)
// Workaround for relying on undefined behavior (casting nan to unsigned int) which can cause hang
// behavior when the resulting int is used as a loop upper bound. Ideally this pragma would go in
// EtcConfig.h, but moving it there triggers asserts.
#pragma float_control(precise, off)
#endif