-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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 DDS image load and save functionality #101994
base: master
Are you sure you want to change the base?
Conversation
e0950f4
to
ffd39de
Compare
9adaa31
to
02e11e1
Compare
02e11e1
to
f335f2d
Compare
422c89d
to
97fcc8c
Compare
97fcc8c
to
6912cfb
Compare
If info from the related MoltenVK issue I have mentioned here is correct, changing CI from |
@bruvzg Is it possible/advisable to check for macOS-15 or newer at runtime? |
Yes: if (@available(macOS 15.0, *)) {
// If it's Objective-C code.
} or if (__builtin_available(macOS 15.0, *)) {
// If it's C++ code.
} |
How do I invert it? I want an if not if (__builtin_available(macOS 15.0, *)) {
// If it's C++ code.
} |
32e1352
to
792acf7
Compare
This comment was marked as outdated.
This comment was marked as outdated.
792acf7
to
6743043
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7fd93df
to
290131f
Compare
This comment was marked as resolved.
This comment was marked as resolved.
811531d
to
e6aff30
Compare
This comment was marked as resolved.
This comment was marked as resolved.
e6aff30
to
2c4dd12
Compare
Commentary in rocketchat mentioned:
|
2c4dd12
to
4e1450d
Compare
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.
Tested this with all supported Image formats (uncompressed + s3tc + rgtc + bptc), some images fail to save. This diff should fix that and BGRA4 channel swapping: dds_uncomp.patch
Regarding RGB565: It saves correctly, but it looks like the renderers (both RD and Compatibility) expect the colors to be stored as BGR565, while the Image class operates on RGB565.
Edit: Here's a testing project:
dds-saveload-test.zip
#103635 should fix the issues with RGB565, otherwise this PR looks good in terms of functionality |
Save and load DDS from Image class. Co-authored-by: BlueCube3310 <[email protected]>
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.
Tested this with several different DDS files, loading still works correctly, saving also works. This will make it easier to debug compressed/VRAM-specific images
See: godotengine/godot-proposals#5748
The proposal involves adding the ImageLoaderDDS class, moving the DDS handling code inside it, and reusing the image loader (or part of it) in the texture loader in the future.
We are not supporting saving non-2d textures at this moment. Feature enhancement wanted.
BetsyCompressor has a runtime execution errorRendering team is handling it.Image.load_dds_from_buffer()
Image.save_dds_from_buffer()
Error save_dds(const String &p_path) const
Vector<uint8_t> save_dds_to_buffer() const