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
replace libpng with libspng #10889
replace libpng with libspng #10889
Conversation
09dce67
to
cc625c6
Compare
|
The reason you can't get CMake to work is because spng's CMakeLists.txt does not set any include directory on the spng/spng_static target. So they don't get set when linking to it. It also unconditionally installs the spng headers, which we probably don't want. Since its compilation steps are very simple I think we can just make a custom replacement for it instead of trying to make it behave. Replace the entirety of our spng CMakeLists.txt (the one outside the submodule) with: |
|
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise this LGTM (just looked at the png changes). I tested Dynamic Input Textures, loading a texture pack, and dumping some textures. All seemed to work fine
|
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
|
i don't think this PR should have made fifoci complain, nor the zlib-ng change, so idk what's up with that :( |
|
Texture dumps can’t be read by anything using libpng. This looks like a bug with libspng. example files: |
|
a bug with libspng or with libpng |
|
Not sure but I filed a bug with libspng. All my gui apps reads them just fine but if some command line tool uses libpng, it will fail. |
|
Since this PR was made the file at "dolphin/Source/PCH/nopch/pch.h" is no longer necessary. |
This was made as a workaround for having PCH ignore the file "ImageC.c" which could not be made into ".cpp" due to limitations of libpng, but since it has been replaced by libspng dolphin-emu#10889 this is no longer needed


This only replaces the png library dolphin itself uses (mgba and Qt use their own).
It also allows getting rid of the gross C support code needed for libpng and make the External a submodule.
oof, i had a bug that made me think the speedup was a lot more than it really is. There is about 10% speedup for smaller png writes, for larger ones it's actually a bit slower (but still faster overall than current master, thanks to zlib-ng).
On the read path, I tested by comparing time taken for prefetching the hypatia wind waker hires texture set to load:
this PR: 66 seconds
zlib-ng branch: 95 seconds
master (zlib and libpng): 130 seconds
Not sure how to make it work with cmake.