-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Add thirdparty library etcpak for faster imports. #47370
Conversation
046e3ed
to
9232a58
Compare
f3e9d0b
to
4dbdedf
Compare
From 64 8k texture load test, in a 1 minute period 37 seconds is get_pixel and 13 seconds is texture compression (this pr), https://github.com/fire/texture-import-godot-project/tree/main/peacock |
8d38b14
to
5e89ec1
Compare
Added some flags:
Edited 2021-03-27:
Before ETC2 and DXT5
After DXT5 and ETC2
|
78fb320
to
5a7102d
Compare
Quick test of importing all assets of the TPS demo (note: includes some DAEs and glTFs too):
Example:
So there's already a pretty significant gain on this very unscientific test. This can likely be improved further by ensuring that we properly use the available SSE4.1 / AVX2 code paths on compatible CPUs. |
- `etc` module was renamed to `etcpak` and modified to use the new library. - PKM importer is removed in the process, it's obsolete. - Old library `etc2comp` is removed. - S3TC compression no longer done via `squish` (but decompression still is). - Slight modifications to etcpak sources for MinGW compatibility, to fix LLVM `-Wc++11-narrowing` errors, and to allow using vendored or system libpng. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Thanks! |
LLVM + MINGW still requires the |
That doesn't seem like a correct fix. What's the error exactly? This API is not compiler dependent, it's likely related to whether your MinGW distro is configured to use pthread or another thread API. Typically MinGW-GCC distros come with winpthreads, there might be a switch or a package you need for mingw-llvm. |
This is the proper fix: diff --git a/thirdparty/etcpak/System.cpp b/thirdparty/etcpak/System.cpp
index a09b289cb2..aee8483b36 100644
--- a/thirdparty/etcpak/System.cpp
+++ b/thirdparty/etcpak/System.cpp
@@ -1,5 +1,5 @@
#include <algorithm>
-#ifdef _WIN32
+#ifdef _MSC_VER
# include <windows.h>
#else
# include <pthread.h> Edit: Well part of it, more |
If anyone is interested, I did some work to backport this change (and follow-ups) to the https://github.com/akien-mga/godot/commits/3.x-etcpak It's WIP and I don't plan to work further on it as it turns out etcpak doesn't support all formats needed for GLES2 support in the |
Add
etcpak
library for faster ETC/ETC2/S3TC imports.etc
module was renamed toetcpak
and modified to use the new library.etc2comp
is removed.squish
(but decompression still is).to fix LLVM
-Wc++11-narrowing
errors, and to allow using vendored orsystem libpng.
Squish and etc modules have been modified.
Modifications for mingw.
Some times from TPS sample.
ook ook ook 🍌
Please help measure if this is faster or not.