Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTX compare tool - phase 1 #815

Merged
merged 16 commits into from
Jan 17, 2024
Merged

Conversation

aqnuep
Copy link
Collaborator

@aqnuep aqnuep commented Dec 6, 2023

Draft implementation for the compare tool with no image comparison yet.
Basic test set covering the following:

  • Help
  • Command line errors
  • Use with invalid files without the "allow-invalid-input" flag
  • Use with invalid files with the "allow-invalid-input" flag
  • Unicode filename support

Note: This PR contains the changes in PR #809 too, because the CTS is based on the CTS main branch which already got merged, yet the code wasn't, so there was no other way to make tests pass otherwise.

@aqnuep aqnuep force-pushed the ktx-compare-dev branch 4 times, most recently from b35e6a2 to ea23f5d Compare December 6, 2023 16:27
@MarkCallow
Copy link
Collaborator

Note: This PR contains the changes in PR #809 too because the CTS is based on the CTS main branch which already got merged, yet the code wasn't

Sorry about that. I've been waiting for @lexaknyazev's review. Since he already agreed to the behavior change to an error and the changes are fairly minor I'll merge it now.

@aqnuep
Copy link
Collaborator Author

aqnuep commented Dec 7, 2023

Sorry about that. I've been waiting for @lexaknyazev's review. Since he already agreed to the behavior change to an error and the changes are fairly minor I'll merge it now.

No worries, just wanted to be up-front to expect that unrelated change showing up in this PR.

@aqnuep aqnuep force-pushed the ktx-compare-dev branch 2 times, most recently from 0bccdd1 to 0fede0e Compare December 14, 2023 14:45
@aqnuep
Copy link
Collaborator Author

aqnuep commented Dec 14, 2023

This PR is now fully tested with the tests in PR KhronosGroup/KTX-Software-CTS#13 and fixed accordingly. It should be ready for review, I just left the PR as draft because there will be a need to update the CTS commit reference. @MarkCallow, let me know if you have any questions or comments.

Many small things including:

* Update release notes.
* Update pyktx README.md with note about macOS build warning.
* Fix many small issues with pyktx deployment.
* Fix pyktx version number to include normalized tweak.
* Add tweak to version number in Android package names.
* Fix typo in example in documentation.
* Fix Emscripten build to meet new requirement to enable
  GetProcAddress via compile option.
* Fix KhronosGroup#851: image corruption on loading.
* Prepare for publishing pyktx to PyPI.
@MarkCallow
Copy link
Collaborator

To fix the Travis build you will need to rebase to current main (4.3.0-beta1) which has the fix for the Emscripten build issue.

Copy link
Collaborator

@MarkCallow MarkCallow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I haven't done a really detailed review of the new code just gave myself an overview. I did find a couple of very minor things. I'm marking this "Request changes" because of the need to rebase to get the fix for the Emscripten change that has broken the Travis build.

@@ -245,7 +245,7 @@ const char* dfdToStringColorModel(khr_df_model_e value) {
return NULL;
}

const char* dfdToStringSampleDatatypeQualifiers(uint32_t bit_index, bool bit_value) {
const char* dfdToStringSampleDatatypeQualifiersBit(uint32_t bit_index, bool bit_value) {
if (!bit_value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the rename? Wouldn't dfdToStringSampleDatatypeQualifierBits be more accurate than ...QualifiersBit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other similar bit conversion functions have the Bit suffix. For some reason this one did not have it, so I fixed a consistency issue.

tools/ktx/command_compare.cpp Outdated Show resolved Hide resolved
tools/ktx/command_compare.cpp Outdated Show resolved Hide resolved
@b raw - Encoded image data is compared verbatim, as it appears in the file. <br />
@b image - Effective image data is compared per texel block. <br />
@b ignore - Ignore image contents. <br />
The default mode is @b raw, meaning that the encoded image data must match exactly.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should explain "effective image data" in an additional sentence following "exactly."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part will go through some major changes in phase 2, so I'll leave it as is for now, because a lot of things will get clarified in the meantime.

MarkCallow and others added 13 commits December 29, 2023 18:44
Refine size calculation.
by creating a .nojelkyll file when deploying docs. Fixes KhronosGroup#825.
This fixes KhronosGroup#827, the conflicting permissions in the directories that
lead to impossibility to install the package.
Draft implementation for the compare tool with no image comparison yet.
Basic test set covering the following:
  * Help
  * Command line errors
  * Use with invalid files without the "allow-invalid-input" flag
  * Use with invalid files with the "allow-invalid-input" flag
  * Unicode filename support
@aqnuep
Copy link
Collaborator Author

aqnuep commented Jan 11, 2024

FYI: since it seems this and the corresponding CTS PR KhronosGroup/KTX-Software-CTS#13 is unlikely to get merged before we proceed with the image diff part of the implementation, we've started working on that here, so likely we'll have one pair of large PRs in the end.

@aqnuep aqnuep merged commit e8fa50e into KhronosGroup:ktx-compare Jan 17, 2024
14 checks passed
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.

3 participants