diff options
author | Dave Parks <davep@lindenlab.com> | 2024-06-27 13:12:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 13:12:43 -0500 |
commit | ab87978cbc71cd4c83648627998055a010700f05 (patch) | |
tree | 1bf605af76de6f129b10c271517c33acae29fbaa /indra/newview/gltf | |
parent | e95df8a28436f6893dfe2f9e46e11fb18a0e1598 (diff) |
1836 dont store texture in system memory unless absolutely necessary (#1843)
* #1836 Texture memory usage overhaul. Much decrufting
- don't keep a copy of textures in system memory
- use GPU to downrez textures instead of reloading from cache
- use GPU to generate brightness/darkness bumpmaps
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r-- | indra/newview/gltf/buffer_util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h index 40f9448aaf..89cedf4a47 100644 --- a/indra/newview/gltf/buffer_util.h +++ b/indra/newview/gltf/buffer_util.h @@ -181,6 +181,16 @@ namespace LL } template<> + inline void copyVec4<U8, U64>(U8* src, U64& dst) + { + U8* data = (U8*)&dst; + data[0] = src[0]; + data[1] = src[1]; + data[2] = src[2]; + data[3] = src[3]; + } + + template<> inline void copyVec4<U16, LLColor4U>(U16* src, LLColor4U& dst) { dst.set(src[0], src[1], src[2], src[3]); |