Proper handling of --uastc-quality and --uastc-hdr-6x6i-level option values #1149
Proper handling of --uastc-quality and --uastc-hdr-6x6i-level option values #1149MarkCallow merged 13 commits intoKhronosGroup:mainfrom
Conversation
|
Thank you for this. Please make a PR in KTX-Software-CTS with the regenerated golden files. |
|
Please rebase on current main. Following PR #1151 it has fixes back ported from basis_universal 2.1 including the fix for the assertion failure here. #1151 also removed the workaround for the uninitialized astc_helper tables since the fix for it is one of those back ported. Lastly it includes the fix to You should be able to regenerate the golden images after which this PR should work. While making the CTS PR, please add a case with level = 2 to You can regenerate the images using either gcc or clang. You will need to specify |
for compilers supporting std::filesystem and for HDR.
Fixes KhronosGroup#1145. Additional fixes: - Adds `num_layers` property that was curiously missing. - Exposes ktxTexture[12]_IsHDR in the c API. - Reformats documentation comments for UASTC HDR ktxBasisParams to reduce line width.
These are: - Critical fixes for extreme inputs/outputs - Compiler warning - Fix parsing of uint64 in KTX2 header - Fix initialization of astc_helper tables for transcoding. Remove our workaround for the astc_helper tables not being initialized. Fix ktxdiff to choose correct transcode target when comparing HDR payloads.
|
Please rebase this to get the basisu fixes. |
|
Aarrgh! It is still failing on Linux and Windows. On Linux, because it is the canonical platform for the golden files, an exact match is expected. It is failing On Windows |
|
In the interest of saving time, I have been checking the golden files. Indeed the files for the uastc_hdr4x4_params tests have not been updated after the code fix hence the failures on the primary platform. I am still investigating the Windows failure. Even with quite a large tolerance it still fails. Only the level 12 case is failing. |
|
ktxdiff does not work for the new HDR formats. If the input is transcoded, it assumes its Unorm8. This case must be the only one in the HDR tests where a perfect comparison fails so that ktxdiff is invoked. Please work on the other 2 issues while I fix ktxdiff. |
|
Here is a fixed ktxdiff. Please regenerate the golden files for the uastc_hdr4x4_params tests, open a PR for them in the CTS repo then update the reference in this PR. Then add the fixed ktxdiff to the source branch of this PR. Hopefully the PR will finally go green. |
|
@ViNeek I just saw your e-mail. Thanks. Please revert the tolerance change in the CTS and add the fixed ktxdiff here. |
|
I merged KhronosGroup/KTX-Software-CTS#65 after checking the uastc_hdr4x4_params test is fixed. However inclusion of the fixed ktxdiff here and reversion of the outputTolerance change in uastc_hdr6x6i_params is still needed. The latter requires a further reference change. Make another PR with that and update the CTS reference here to point at it. I will be able to merge that change without changing the commit hash so no further CTS reference update will be required. Let's finally get this fixed today. |
|
There was a bug in the new compareSFloat16 function in ktxdiff. . Here is a fixed version. With this, the level 12 case fails with differences > 1.4 on some pixels near the end of the texture. I am puzzled because visually the textures don't look that much different especially in the lower right. I don't want to hold up this PR any more for such an edge case, so I have pushed a modified test to the CTS repo which sets the tolerance to 0.08 for all but level 12 and 1.0, which effectively disables the image comparison, for level 12. I'll investigate the level 12 case more when I have time. Set the reference here to the latest CTS top of main and add the updated ktxdiff_main.cpp to this PR and this should be good to go. |
|
Please update this PR. It will only take a couple of minutes. |
This PR fixes #1146. The values are properly forwarded to the basis encoder.