From e5912c5d86c6864de553227b62e20957810b8194 Mon Sep 17 00:00:00 2001 From: Mark Callow <2244683+MarkCallow@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:46:55 -0700 Subject: [PATCH] Set isCompressed at end of CompressBasisEx. (#618) * Add test for the case that failed prior to the fix and fix a related incorrect test of the Java wrapper. Fixes #617. * Add astc_encode.cpp to docs. --- cmake/docs.cmake | 1 + lib/astc_encode.cpp | 4 ---- lib/basis_encode.cpp | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/docs.cmake b/cmake/docs.cmake index 907c847ab4..bbfdb68bab 100644 --- a/cmake/docs.cmake +++ b/cmake/docs.cmake @@ -82,6 +82,7 @@ function( CreateDocLibKTX ) lib/mainpage.md LICENSE.md include + lib/astc_encode.cpp lib/basis_encode.cpp lib/basis_transcode.cpp lib/strings.c diff --git a/lib/astc_encode.cpp b/lib/astc_encode.cpp index cf9a4bc725..0b28a4d202 100644 --- a/lib/astc_encode.cpp +++ b/lib/astc_encode.cpp @@ -759,10 +759,6 @@ ktxTexture2_CompressAstcEx(ktxTexture2* This, ktxAstcParams* params) { * * Such textures can be directly uploaded to a GPU via a graphics API. * - * @memberof ktxTexture2 - * @ingroup writer - * @~English - * * @param[in] This pointer to the ktxTexture2 object of interest. * @param[in] quality Compression quality, a value from 0 - 100. Higher=higher quality/slower speed. diff --git a/lib/basis_encode.cpp b/lib/basis_encode.cpp index caf1c5695b..9a00a9bca4 100644 --- a/lib/basis_encode.cpp +++ b/lib/basis_encode.cpp @@ -1018,6 +1018,7 @@ ktxTexture2_CompressBasisEx(ktxTexture2* This, ktxBasisParams* params) priv._requiredLevelAlignment = 1; } This->vkFormat = VK_FORMAT_UNDEFINED; + This->isCompressed = KTX_TRUE; // Block-compressed textures never need byte swapping so typeSize is 1. assert(This->_protected->_typeSize == 1);