Thirdparty: Harmonize patches to document downstream changes
This commit is contained in:
@ -1976,7 +1976,7 @@ namespace basisu
|
||||
// Accepts 2D, 2D mipmapped, 2D array, 2D array mipmapped
|
||||
// and cubemap, cubemap mipmapped, and cubemap array mipmapped.
|
||||
bool write_dds_file(uint8_vec &dds_data, const basisu::vector<gpu_image_vec>& gpu_images, bool cubemap_flag, bool use_srgb_format)
|
||||
{
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
26
thirdparty/basis_universal/patches/0001-external-zstd-pr344.patch
vendored
Normal file
26
thirdparty/basis_universal/patches/0001-external-zstd-pr344.patch
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/thirdparty/basis_universal/encoder/basisu_comp.cpp b/thirdparty/basis_universal/encoder/basisu_comp.cpp
|
||||
index f16e75bd46..81813257cd 100644
|
||||
--- a/thirdparty/basis_universal/encoder/basisu_comp.cpp
|
||||
+++ b/thirdparty/basis_universal/encoder/basisu_comp.cpp
|
||||
@@ -33,7 +33,7 @@
|
||||
#endif
|
||||
|
||||
#if BASISD_SUPPORT_KTX2_ZSTD
|
||||
-#include "../zstd/zstd.h"
|
||||
+#include <zstd.h>
|
||||
#endif
|
||||
|
||||
// Set to 1 to disable the mipPadding alignment workaround (which only seems to be needed when no key-values are written at all)
|
||||
diff --git a/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp b/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp
|
||||
index ea994b0c4f..32018cd282 100644
|
||||
--- a/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp
|
||||
+++ b/thirdparty/basis_universal/transcoder/basisu_transcoder.cpp
|
||||
@@ -164,7 +164,7 @@
|
||||
// If BASISD_SUPPORT_KTX2_ZSTD is 0, UASTC files compressed with Zstd cannot be loaded.
|
||||
#if BASISD_SUPPORT_KTX2_ZSTD
|
||||
// We only use two Zstd API's: ZSTD_decompress() and ZSTD_isError()
|
||||
- #include "../zstd/zstd.h"
|
||||
+ #include <zstd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
diff --git a/thirdparty/basis_universal/encoder/basisu_enc.cpp b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
index c431ceaf12..e87dd636a2 100644
|
||||
index 47e8981bc3..6c0ac0ad37 100644
|
||||
--- a/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
+++ b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
@@ -409,7 +409,7 @@ namespace basisu
|
||||
@@ -458,7 +458,7 @@ namespace basisu
|
||||
bool load_jpg(const char *pFilename, image& img)
|
||||
{
|
||||
int width = 0, height = 0, actual_comps = 0;
|
||||
@ -1,5 +1,5 @@
|
||||
diff --git a/thirdparty/basis_universal/encoder/basisu_enc.cpp b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
index 6c0ac0ad370..2bf486a0287 100644
|
||||
index 6c0ac0ad37..2bf486a028 100644
|
||||
--- a/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
+++ b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
@ -1,5 +1,5 @@
|
||||
diff --git a/thirdparty/basis_universal/encoder/basisu_enc.cpp b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
index 2bf486a0287..fff98e83014 100644
|
||||
index 2bf486a028..fff98e8301 100644
|
||||
--- a/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
+++ b/thirdparty/basis_universal/encoder/basisu_enc.cpp
|
||||
@@ -37,9 +37,6 @@
|
||||
@ -31,7 +31,7 @@ index 2bf486a0287..fff98e83014 100644
|
||||
|
||||
bool load_png(const uint8_t *pBuf, size_t buf_size, image &img, const char *pFilename)
|
||||
diff --git a/thirdparty/basis_universal/encoder/basisu_gpu_texture.cpp b/thirdparty/basis_universal/encoder/basisu_gpu_texture.cpp
|
||||
index 000869a5337..342446b8fd4 100644
|
||||
index 000869a533..648cfb47ae 100644
|
||||
--- a/thirdparty/basis_universal/encoder/basisu_gpu_texture.cpp
|
||||
+++ b/thirdparty/basis_universal/encoder/basisu_gpu_texture.cpp
|
||||
@@ -19,9 +19,6 @@
|
||||
@ -44,11 +44,10 @@ index 000869a5337..342446b8fd4 100644
|
||||
namespace basisu
|
||||
{
|
||||
//------------------------------------------------------------------------------------------------
|
||||
@@ -1979,208 +1976,8 @@ namespace basisu
|
||||
// Accepts 2D, 2D mipmapped, 2D array, 2D array mipmapped
|
||||
@@ -1980,207 +1977,7 @@ namespace basisu
|
||||
// and cubemap, cubemap mipmapped, and cubemap array mipmapped.
|
||||
bool write_dds_file(uint8_vec &dds_data, const basisu::vector<gpu_image_vec>& gpu_images, bool cubemap_flag, bool use_srgb_format)
|
||||
- {
|
||||
{
|
||||
- if (!gpu_images.size())
|
||||
- {
|
||||
- assert(0);
|
||||
@ -250,7 +249,6 @@ index 000869a5337..342446b8fd4 100644
|
||||
- }
|
||||
-
|
||||
- return true;
|
||||
+ {
|
||||
+ return false;
|
||||
}
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
From b4a0fa23c13da413d94b99f307e401c3b83e0108 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Stava <ondrej.stava@gmail.com>
|
||||
Date: Fri, 23 Apr 2021 18:59:45 -0700
|
||||
Subject: [PATCH] Made it easier to use the library with external zstdlib
|
||||
implementations (mostly in non CMake builds).
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In our internal repository, we have our own version of zstdlib and introducing extra copy is both undesirable and potentially dangerous (due to ODR violations).
|
||||
|
||||
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
|
||||
---
|
||||
encoder/basisu_comp.cpp | 2 +-
|
||||
transcoder/basisu_transcoder.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/encoder/basisu_comp.cpp b/encoder/basisu_comp.cpp
|
||||
index 41eae2b7..4e69e9e2 100644
|
||||
--- a/encoder/basisu_comp.cpp
|
||||
+++ b/encoder/basisu_comp.cpp
|
||||
@@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#if BASISD_SUPPORT_KTX2_ZSTD
|
||||
-#include "../zstd/zstd.h"
|
||||
+#include <zstd.h>
|
||||
#endif
|
||||
|
||||
// Set to 1 to disable the mipPadding alignment workaround (which only seems to be needed when no key-values are written at all)
|
||||
diff --git a/transcoder/basisu_transcoder.cpp b/transcoder/basisu_transcoder.cpp
|
||||
index 3aeba0ee..c698861f 100644
|
||||
--- a/transcoder/basisu_transcoder.cpp
|
||||
+++ b/transcoder/basisu_transcoder.cpp
|
||||
@@ -155,7 +155,7 @@
|
||||
// If BASISD_SUPPORT_KTX2_ZSTD is 0, UASTC files compressed with Zstd cannot be loaded.
|
||||
#if BASISD_SUPPORT_KTX2_ZSTD
|
||||
// We only use two Zstd API's: ZSTD_decompress() and ZSTD_isError()
|
||||
- #include "../zstd/zstd.h"
|
||||
+ #include <zstd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user