Skip to content

Export ktxTexture2_DecodeAstc in JS bindings#1034

Merged
MarkCallow merged 26 commits intomainfrom
js_decode_astc
Jun 21, 2025
Merged

Export ktxTexture2_DecodeAstc in JS bindings#1034
MarkCallow merged 26 commits intomainfrom
js_decode_astc

Conversation

@MarkCallow
Copy link
Collaborator

@MarkCallow MarkCallow commented Jun 21, 2025

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.

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.
@MarkCallow MarkCallow merged commit 64a6900 into main Jun 21, 2025
37 checks passed
@MarkCallow MarkCallow deleted the js_decode_astc branch June 21, 2025 23:38
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant