diff options
author | BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com> | 2024-09-11 16:51:15 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-17 08:57:45 +0200 |
commit | 4addddd8dfcd3f3d5ce1db94a10c36678963adb9 (patch) | |
tree | 1110b86c1d8d844a0a8a49d39dee28c6cf24680e /drivers/gles3 | |
parent | 6dd8e7feceb281c6862010667ba9d62fcb73c987 (diff) | |
download | redot-engine-4addddd8dfcd3f3d5ce1db94a10c36678963adb9.tar.gz |
Compatibility: Fix alignment of compressed textures when retrieving
(cherry picked from commit 0182294b3779e03d9201d596a8395cf2a094b078)
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/storage/texture_storage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index b074838ee8..e96c8bb8a8 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -1039,7 +1039,7 @@ Ref<Image> TextureStorage::texture_2d_get(RID p_texture) const { data.resize(data_size); ERR_FAIL_COND_V(data.is_empty(), Ref<Image>()); - image = Image::create_from_data(texture->width, texture->height, texture->mipmaps > 1, texture->real_format, data); + image = Image::create_from_data(texture->alloc_width, texture->alloc_height, texture->mipmaps > 1, texture->real_format, data); ERR_FAIL_COND_V(image->is_empty(), Ref<Image>()); if (texture->format != texture->real_format) { image->convert(texture->format); @@ -1095,7 +1095,7 @@ Ref<Image> TextureStorage::texture_2d_get(RID p_texture) const { data.resize(data_size); ERR_FAIL_COND_V(data.is_empty(), Ref<Image>()); - image = Image::create_from_data(texture->width, texture->height, false, Image::FORMAT_RGBA8, data); + image = Image::create_from_data(texture->alloc_width, texture->alloc_height, false, Image::FORMAT_RGBA8, data); ERR_FAIL_COND_V(image->is_empty(), Ref<Image>()); if (texture->format != Image::FORMAT_RGBA8) { |