-
-
Notifications
You must be signed in to change notification settings - Fork 146
Fix Switch swizzle texture conversion and optimize Texture2DConverter #318
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
Conversation
0fa3a2b
to
dbe9b2e
Compare
Oh! It seems you forgot about my PR and independently resolved the swizzle texture issue in version 1.22.4. However, there are still some issues with your implementation. Due to commit conflicts, I’ll go ahead and close this PR and open new PRs to address these problems, while also including the other optimizations from this PR. |
I implemented a fixed version before I saw that you included it as well, otherwise I would have sticked and requested a fair amount of changes. Regarding the changes I would have requested, it would have started with using the formatting defined by rust.toml. Some asserts you included aren't really necessary, at least the type checker didn't complain to me about those points, and I don't really see how a type checker could get confused by some of them. Anyway, in case I didn't annoy you too much with my behavior,
|
Sorry for changing too many things in one single PR. I am also happy to draft new separated PRs later to fix these remaining things. |
Fine. Now all the changes this PR addressed has been implemented in 1.22.5. |
Summary
This PR mainly fixes the issue of Switch texture decoding, including:
This PR also does some improvements and small fixes to the Texture2DConverter:
copy
procedure inparse_image_data
, making it ~5% faster.paste
procedure inpad_image
, making it ~20% faster.swap_bytes_for_xbox
thatbytes
object is not mutable.A
mode toL
mode inimage_to_texture2d
, becauseA
is not a valid PIL image mode.CONV_TABLE
.TextureFormat -> (converter function, (additional args, ...))
.EAC_R_SIGNED
has been fixed."ETC2_RGB"
-like fmt instead of[2, "RGB"]
-like.Related Issues
Fixes #317
Fixes #319