You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the file is UASTC with no supercompression, and contains no key value fields at all, 12 mipPadding alignment bytes are required but the validator doesn't account for them. Here's an example file:
If you look at encoder/basisu_comp.cpp, there are two new macros:
// Set to 1 to disable the mipPadding alignment workaround (which only seems to be needed when no key-values are written at all)
#define BASISU_DISABLE_KTX2_ALIGNMENT_WORKAROUND (0)
// Set to 1 to disable writing all KTX2 key values, triggering the validator bug.
#define BASISU_DISABLE_KTX2_KEY_VALUES (0)
If these are set to 1 and the command line tool is ran like this: "basisu -ktx2 -uastc -ktx2_no_zstandard kodim18.png" you'll reproduce the problematic KTX2 file that fails validation.
We want to be able to set BASISU_DISABLE_KTX2_ALIGNMENT_WORKAROUND to 1 in our repo, to disable the workaround, but can't. I am pretty sure this is a validator issue - we can read the file OK.
richg@richgX-PC:/mnt/j/dev/ktx2l2/KTX-Software/build/tools/ktx2check$ ./ktx2check /mnt/j/dev/bu_4_4_test2/basis_universal/bin/kodim18.ktx2
Issues in: /mnt/j/dev/bu_4_4_test2/basis_universal/bin/kodim18.ktx2
ERROR: Size of image data in file does not match size calculated from
levelIndex.
If the file is UASTC with no supercompression, and contains no key value fields at all, 12 mipPadding alignment bytes are required but the validator doesn't account for them. Here's an example file:
kodim18.zip
If key value fields are present I wasn't able to reproduce this after a few attempts, so it may only occur with no key value fields.
The text was updated successfully, but these errors were encountered: