summaryrefslogtreecommitdiff
path: root/thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-04-14 16:45:14 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-04-14 16:50:02 +0200
commit638cfec853cfdbc95b5ccc67477afbaa3a53bc33 (patch)
tree68e408f59de168080efbb5e4ecdb2fca4bf7a1c9 /thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch
parent8ce0fb0a946455ed6a7bc8a54fcf90a9d5a9ae4d (diff)
etcpak: We only need the compression code, remove rest of etcpak app
We do our own image loading, threading, and memory management in Godot already, so the only components we need from etcpak (at least as of now) are the `Compress*` methods defined in `ProcessDxtc.cpp` and `ProcessRGB.cpp`. So we don't need to compile or vendor the rest.
Diffstat (limited to 'thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch')
-rw-r--r--thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch64
1 files changed, 0 insertions, 64 deletions
diff --git a/thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch b/thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch
deleted file mode 100644
index ab0d1e63a2..0000000000
--- a/thirdparty/etcpak/patches/llvm-c++11-narrowing-errors.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/thirdparty/etcpak/BlockData.cpp b/thirdparty/etcpak/BlockData.cpp
-index bd738085f3..395b55246b 100644
---- a/thirdparty/etcpak/BlockData.cpp
-+++ b/thirdparty/etcpak/BlockData.cpp
-@@ -334,10 +334,10 @@ static etcpak_force_inline void DecodeT( uint64_t block, uint32_t* dst, uint32_t
- const auto c3b = clampu8( cb1 - table59T58H[codeword] );
-
- const uint32_t col_tab[4] = {
-- cr0 | ( cg0 << 8 ) | ( cb0 << 16 ) | 0xFF000000,
-- c2r | ( c2g << 8 ) | ( c2b << 16 ) | 0xFF000000,
-- cr1 | ( cg1 << 8 ) | ( cb1 << 16 ) | 0xFF000000,
-- c3r | ( c3g << 8 ) | ( c3b << 16 ) | 0xFF000000
-+ uint32_t(cr0 | ( cg0 << 8 ) | ( cb0 << 16 ) | 0xFF000000),
-+ uint32_t(c2r | ( c2g << 8 ) | ( c2b << 16 ) | 0xFF000000),
-+ uint32_t(cr1 | ( cg1 << 8 ) | ( cb1 << 16 ) | 0xFF000000),
-+ uint32_t(c3r | ( c3g << 8 ) | ( c3b << 16 ) | 0xFF000000)
- };
-
- const uint32_t indexes = ( block >> 32 ) & 0xFFFFFFFF;
-@@ -389,10 +389,10 @@ static etcpak_force_inline void DecodeTAlpha( uint64_t block, uint64_t alpha, ui
- const auto c3b = clampu8( cb1 - table59T58H[codeword] );
-
- const uint32_t col_tab[4] = {
-- cr0 | ( cg0 << 8 ) | ( cb0 << 16 ),
-- c2r | ( c2g << 8 ) | ( c2b << 16 ),
-- cr1 | ( cg1 << 8 ) | ( cb1 << 16 ),
-- c3r | ( c3g << 8 ) | ( c3b << 16 )
-+ uint32_t(cr0 | ( cg0 << 8 ) | ( cb0 << 16 )),
-+ uint32_t(c2r | ( c2g << 8 ) | ( c2b << 16 )),
-+ uint32_t(cr1 | ( cg1 << 8 ) | ( cb1 << 16 )),
-+ uint32_t(c3r | ( c3g << 8 ) | ( c3b << 16 ))
- };
-
- const uint32_t indexes = ( block >> 32 ) & 0xFFFFFFFF;
-@@ -436,10 +436,10 @@ static etcpak_force_inline void DecodeH( uint64_t block, uint32_t* dst, uint32_t
- const auto codeword = codeword_hi | codeword_lo;
-
- const uint32_t col_tab[] = {
-- clampu8( r0 + table59T58H[codeword] ) | ( clampu8( g0 + table59T58H[codeword] ) << 8 ) | ( clampu8( b0 + table59T58H[codeword] ) << 16 ),
-- clampu8( r0 - table59T58H[codeword] ) | ( clampu8( g0 - table59T58H[codeword] ) << 8 ) | ( clampu8( b0 - table59T58H[codeword] ) << 16 ),
-- clampu8( r1 + table59T58H[codeword] ) | ( clampu8( g1 + table59T58H[codeword] ) << 8 ) | ( clampu8( b1 + table59T58H[codeword] ) << 16 ),
-- clampu8( r1 - table59T58H[codeword] ) | ( clampu8( g1 - table59T58H[codeword] ) << 8 ) | ( clampu8( b1 - table59T58H[codeword] ) << 16 )
-+ uint32_t(clampu8( r0 + table59T58H[codeword] ) | ( clampu8( g0 + table59T58H[codeword] ) << 8 ) | ( clampu8( b0 + table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r0 - table59T58H[codeword] ) | ( clampu8( g0 - table59T58H[codeword] ) << 8 ) | ( clampu8( b0 - table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r1 + table59T58H[codeword] ) | ( clampu8( g1 + table59T58H[codeword] ) << 8 ) | ( clampu8( b1 + table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r1 - table59T58H[codeword] ) | ( clampu8( g1 - table59T58H[codeword] ) << 8 ) | ( clampu8( b1 - table59T58H[codeword] ) << 16 ))
- };
-
- for( uint8_t j = 0; j < 4; j++ )
-@@ -483,10 +483,10 @@ static etcpak_force_inline void DecodeHAlpha( uint64_t block, uint64_t alpha, ui
- const auto tbl = g_alpha[(alpha >> 48) & 0xF];
-
- const uint32_t col_tab[] = {
-- clampu8( r0 + table59T58H[codeword] ) | ( clampu8( g0 + table59T58H[codeword] ) << 8 ) | ( clampu8( b0 + table59T58H[codeword] ) << 16 ),
-- clampu8( r0 - table59T58H[codeword] ) | ( clampu8( g0 - table59T58H[codeword] ) << 8 ) | ( clampu8( b0 - table59T58H[codeword] ) << 16 ),
-- clampu8( r1 + table59T58H[codeword] ) | ( clampu8( g1 + table59T58H[codeword] ) << 8 ) | ( clampu8( b1 + table59T58H[codeword] ) << 16 ),
-- clampu8( r1 - table59T58H[codeword] ) | ( clampu8( g1 - table59T58H[codeword] ) << 8 ) | ( clampu8( b1 - table59T58H[codeword] ) << 16 )
-+ uint32_t(clampu8( r0 + table59T58H[codeword] ) | ( clampu8( g0 + table59T58H[codeword] ) << 8 ) | ( clampu8( b0 + table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r0 - table59T58H[codeword] ) | ( clampu8( g0 - table59T58H[codeword] ) << 8 ) | ( clampu8( b0 - table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r1 + table59T58H[codeword] ) | ( clampu8( g1 + table59T58H[codeword] ) << 8 ) | ( clampu8( b1 + table59T58H[codeword] ) << 16 )),
-+ uint32_t(clampu8( r1 - table59T58H[codeword] ) | ( clampu8( g1 - table59T58H[codeword] ) << 8 ) | ( clampu8( b1 - table59T58H[codeword] ) << 16 ))
- };
-
- for( uint8_t j = 0; j < 4; j++ )