-
Notifications
You must be signed in to change notification settings - Fork 6
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
Converting some PNG files to CRN produce a file with a different checksum on different platforms or even with different compilers #69
Comments
The content of the files is totally different, even file size changes between compilers or build types (Release, Debug…). But when I convert the CRN back to PNG, the PNG are equals byte-to-byte. So I guess the stored data is the same, but the way it is compressed differs greatly. |
With an LTO release build, same amd64 machine, and this command:
GCC 13:
Clang 16:
Clang 18:
But then when I do:
The produced PNG files are exactly the same:
Something that crn-to-png test doesn't check, is that if the mipmaps are the same. |
If I transcode to DDS this way:
The file sizes are the same:
But the checksums are not:
|
Unlike the CRN files that are almost completely different, the DDS files are only different from a dozen of bytes. |
Disabling fast math makes the files all the same. |
GCC 13:
Clang 16:
Clang 18:
|
Alongside disabling fast-math on all platforms, disabling x87 with |
Converting the
test/unvanquished_64.png
image to CRN produces the same file with:But the
test/test-colormap1-alpha1.png
produces a CRN file with a different checksum on every platform or even compilers! Just compiling crunch with GCC or Clang makes the output file different! The same is verified with the other test alpha PNG files.The text was updated successfully, but these errors were encountered: