Export ktxTexture2_DecodeAstc in JS bindings#1034
Merged
MarkCallow merged 26 commits intomainfrom Jun 21, 2025
Merged
Conversation
Make the function available in the read-only lirary too fixing an oversight from when it was added. Add decode test to the libktx-test. At present it is only tested if the device does not support ASTC.
Add test.cmake to the source list of all the tests it creates.
Properly handle unicode file paths being passed to texturetests.
richgel999
pushed a commit
to BinomialLLC/KTX-Software-Binomial-Fork
that referenced
this pull request
Mar 9, 2026
Add ktxTexture2_DecodeAstc to `libktx_read`, a previous omission. Needed too so the function can be included in the read-only JS bindings. Add tests of ASTC encode and decode functionality to `texturetest`. The change includes needing to pass the path to `ktxdiff` to `texturetests` as the new tests use it to compare the decoded result with the original image. Change `texturetest` to use std::filesystem::path and c++17. Fix issue in `astc_codec.cpp` where conversion of `params.inputSwizzle' could fail, asserting in a debug build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ktxTexture2_DecodeAstc to
libktx_read, a previous omission. Needed too so the function can be included in the read-only JS bindings.Add tests of ASTC encode and decode functionality to
texturetest. The change includes needing to pass the path toktxdifftotexturetestsas the new tests use it to compare the decoded result with the original image.Change
texturetestto use std::filesystem::path and c++17.Fix issue in
astc_codec.cppwhere conversion of `params.inputSwizzle' could fail, asserting in a debug build.