summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmapmanager.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-21 10:47:31 -0400
committerGitHub <noreply@github.com>2024-08-21 09:47:31 -0500
commitdb84bf9567c27e266ccc6b1b6aed089c6022fe91 (patch)
treebcf9edf9968e4087621a9e55ea02743671b45c12 /indra/newview/llreflectionmapmanager.cpp
parenta0da63db57b4799cf67df4618afe70760840a719 (diff)
Improve accuracy of texture memory tracking (#2371)
* Fix alloc_tex_image to account for more missing texture memory Change alloc_tex_image calls to pass internal format to properly account for used image type * Fix scaleDown passing primary format in place of internal format to glTexImage2D * Make texture debug view and texture bias calculation consistent and remove double accounting for render target textures
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r--indra/newview/llreflectionmapmanager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 3526004071..f083747bfe 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -80,6 +80,9 @@ void load_exr(const std::string& filename)
gGL.getTexUnit(0)->bind(gEXRImage);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGBA, GL_FLOAT, out);
+
+ LLImageGLMemory::alloc_tex_image(width, height, GL_RGB16F, 1);
+
free(out); // release memory of image data
glGenerateMipmap(GL_TEXTURE_2D);