Closed donmccurdy closed 2 years ago
Which ktx2check
are you using, version 4, version 4.1-rc1 or are you building from master
?
Which ktx2check are you using,
Never mind. The problem is happening with the code in master. There seem to be 2 issues:
For no. 1 ktx2check
must only check that primaries is a valid DFD value. It must permit differences with the comparator.
No. 2 is just a silly coding error in the bytesPlane0 check.
With the fix I just committed f32_5x1.ktx2
passes validation. The other 2 files fail for reasons that appear to be genuine problems.
Thanks @MarkCallow, appreciate the help! I'll work on the remaining issues. I didn't realize there were so many sample .ktx2 files in this repository, those should be helpful for me in testing output as well.
@donmccurdy heads up. I introduced a bug in ktx2check
just before I fixed the issues discussed here. The bug affects validation of UASTC files. See PR #585 for details and watch for it landing. I also found that the exit code could be wrong when validating multiple files and there are valid files after the broken one(s). This too is fixed in PR #585.
I'm writing these KTX2 files with a new exporter, so it's very likely the files have some real issues. However, the errors I see from ktx2check do not seem to match what I think is happening, and ktxinfo is able to read the files including parts that ktx2check complains about, so I'm wondering if this might be a bug in the validation.
The easiest sample to start with is
f32_5x1.ktx2
:However,
ktxinfo
reports that bytesPlane0 is non-zero, which is what I'd expected:The other files report the same issue, as well as others like
Level 0 byteLength or uncompressedByteLength does not match expected value.
Butktxinfo
reports the expected byteLength and uncompressedByteLength just fine. I'm using uncompressed formats, no supercompression involved.Does this seem like a bug in a CLI tool, or are my files just totally bad? Thanks!
Samples:
ktx_samples.zipktx_samples.zipCode: