Skip to content

Commit

Permalink
Set isCompressed at end of CompressBasisEx. (KhronosGroup#618)
Browse files Browse the repository at this point in the history
* Add test for the case that failed prior to the fix and fix a related incorrect test of the Java wrapper. Fixes KhronosGroup#617.

* Add astc_encode.cpp to docs.
  • Loading branch information
MarkCallow authored Aug 13, 2022
1 parent 8c143cc commit e5912c5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions cmake/docs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions lib/astc_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions lib/basis_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e5912c5

Please sign in to comment.