virtualx-engine/thirdparty/basis_universal/patches/basisu-pr344.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.6 KiB
Diff
Raw Normal View History

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