-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ktxTexture2_DecodeAstc error returns and document them. (#961)
This started due to a warning when building documentation that `astc_encode.cpp` was not being found. After fixing that I noticed issues with the documentation for `ktxTexture2_DecodeAstc` which I fixed in c16537c. That commit also fixed an issue, where the function would fail with `KTX_INVALID_OPERATION` if a zlib or zstd supercompressed file had been opened without specifying the LOAD_DATA flag, by removing the check for `KTX_SS_NONE`. Subsequently I realized there still some supercompression scheme situations that need to be guarded against and I realized the function documentation was not listing the possible return values. While fixing these I spotted writes to stdout that this PR comments out. Libraries potentially used by GUI apps should not write to stdout. We could potentially add a flag parameter to request the ouput. Lastly all `astcenc` errors were being returned as KTX_INVALID_OPERATION. This maps astcenc errors to equivalent KTX_ errors with asserts on errors that are the fault of libktx or the way libktx has been compiled. Adding unit tests for the codec functions to texturetests would be a good thing.
- Loading branch information
1 parent
c16537c
commit b619004
Showing
1 changed file
with
99 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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