From b9067c961749c1945962d81a0381465150adb80c Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 30 Mar 2023 16:58:50 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 068959cf..ea542784 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ All C/C++ code dependencies are present inside the Basis Universal repo itself t The encoder optionally uses Zstandard's single source file compressor (in zstd/zstd.c) to support compressing supercompressed KTX2 files. The stand-alone transcoder (in the "transcoder" directory) is a single .cpp source file library which has no 3rd party code dependencies apart from zstd/zstddeclib.c, which is also technically optional. It's only used for decompressing UASTC KTX2 files that use Zstandard. +### Note about Visual Studio 2022 (compiling under Windows) +The C/C++ compiler that ships with MSVC 2022 (Platform Toolset v143) is buggy, and it's been this way for years. I've reported the bugs and I've had others verify that yes, it produces buggy code. I've been doing my best to work around the 2022 compiler bugs, but it's probably not worth the effort. Either use the LLVM (clang-cl) Platform Toolset, or switch to Platform Toolset v142 (Visual Studio 2019)'s compiler. I test with various versions of gcc and clang, and MSVC 2019. + ### Command Line Compression Tool The command line tool used to create, validate, and transcode/unpack .basis/.KTX2 files is named "basisu". Run basisu without any parameters for help. From 6786a3d80a239eacf07f65ce55a178424b9b0fa6 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 30 Mar 2023 16:59:42 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea542784..a1c52548 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ All C/C++ code dependencies are present inside the Basis Universal repo itself t The encoder optionally uses Zstandard's single source file compressor (in zstd/zstd.c) to support compressing supercompressed KTX2 files. The stand-alone transcoder (in the "transcoder" directory) is a single .cpp source file library which has no 3rd party code dependencies apart from zstd/zstddeclib.c, which is also technically optional. It's only used for decompressing UASTC KTX2 files that use Zstandard. ### Note about Visual Studio 2022 (compiling under Windows) -The C/C++ compiler that ships with MSVC 2022 (Platform Toolset v143) is buggy, and it's been this way for years. I've reported the bugs and I've had others verify that yes, it produces buggy code. I've been doing my best to work around the 2022 compiler bugs, but it's probably not worth the effort. Either use the LLVM (clang-cl) Platform Toolset, or switch to Platform Toolset v142 (Visual Studio 2019)'s compiler. I test with various versions of gcc and clang, and MSVC 2019. +The C/C++ compiler that ships with MSVC 2022 (Platform Toolset v143) is buggy, and it's been this way for years. I've reported the bugs and I've had others verify that yes, it produces buggy code. I've been doing my best to work around the 2022 compiler bugs, but it's probably not worth the effort. Either use the LLVM (clang-cl) Platform Toolset, or switch to Platform Toolset v142 (Visual Studio 2019's compiler). I test with various versions of gcc and clang, and MSVC 2019. ### Command Line Compression Tool From b9a5c5b2cf86ee713cc9a5aa7165a93bbc731072 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 30 Mar 2023 17:03:21 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index a1c52548..564c033d 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,14 @@ make For Visual Studio 2019, you can now either use the CMakeLists.txt file or the included `basisu.sln` file. Earlier versions of Visual Studio (particularly 2017) should work but aren't actively tested. We develop with the most up to date version of 2019. +To test the codec: + +`basisu -test` + +To test the codec in OpenCL mode (must have OpenCL libs/headers/drivers installed, and have compiled OpenCL support in by specifying cmake -D OPENCL=TRUE): + +`basisu -test -opencl` + To compress a sRGB PNG/BMP/TGA/JPEG image to an ETC1S .KTX2 file: `basisu -ktx2 x.png`