From 62fe9268d659a0c734cfeeb1ddd44c18bfe08d01 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Tue, 7 Oct 2025 21:56:51 +0300 Subject: [PATCH] Texture size calculation should rely on working internal format --- src/CRE/texture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CRE/texture.cpp b/src/CRE/texture.cpp index dd105efb..9c2ca20f 100644 --- a/src/CRE/texture.cpp +++ b/src/CRE/texture.cpp @@ -726,7 +726,7 @@ static texture* texture_load_tex(texture_id id, GLenum target, if (texture_load_pixels(target_cube_map_array[i], working_internal_format, mip_width, mip_height, j, data) < 0) goto fail; - size += texture_get_size(internal_format, mip_width, mip_height); + size += texture_get_size(working_internal_format, mip_width, mip_height); } else for (int32_t i = 0; i <= max_mipmap_level; i++) { @@ -741,7 +741,7 @@ static texture* texture_load_tex(texture_id id, GLenum target, if (texture_load_pixels(target, working_internal_format, mip_width, mip_height, i, data) < 0) goto fail; - size += texture_get_size(internal_format, mip_width, mip_height); + size += texture_get_size(working_internal_format, mip_width, mip_height); } texture_bind(target, 0);