diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-21 10:47:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 09:47:31 -0500 |
commit | db84bf9567c27e266ccc6b1b6aed089c6022fe91 (patch) | |
tree | bcf9edf9968e4087621a9e55ea02743671b45c12 /indra/newview/lltextureview.cpp | |
parent | a0da63db57b4799cf67df4618afe70760840a719 (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/lltextureview.cpp')
-rw-r--r-- | indra/newview/lltextureview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index ca3386948d..bda53f66eb 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -525,9 +525,9 @@ void LLGLTexMemBar::draw() F64 raw_image_bytes_MB = raw_image_bytes / (1024.0 * 1024.0); F64 saved_raw_image_bytes_MB = saved_raw_image_bytes / (1024.0 * 1024.0); F64 aux_raw_image_bytes_MB = aux_raw_image_bytes / (1024.0 * 1024.0); - F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 1024.0 * 1.3333f; // add 33% for mipmaps - F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 1024.0; - F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 1024.0; + F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0; + F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0; + F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 512.0; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -579,7 +579,7 @@ void LLGLTexMemBar::draw() texture_bytes_alloc, vertex_bytes_alloc, render_bytes_alloc, - texture_bytes_alloc+vertex_bytes_alloc+render_bytes_alloc); + texture_bytes_alloc+vertex_bytes_alloc); LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height * 6, text_color, LLFontGL::LEFT, LLFontGL::TOP); |