From f3dc86c8faa162cb2d20bfa1e6f8d7058589b639 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 8 Mar 2025 12:47:50 +0100 Subject: [PATCH] vulkan/opengl: fix reported texture memory usage of texture views. --- src/modules/graphics/opengl/Texture.cpp | 3 ++- src/modules/graphics/vulkan/Texture.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/Texture.cpp b/src/modules/graphics/opengl/Texture.cpp index 89ef30f50..571708f23 100644 --- a/src/modules/graphics/opengl/Texture.cpp +++ b/src/modules/graphics/opengl/Texture.cpp @@ -440,7 +440,8 @@ bool Texture::loadVolatile() } } - updateGraphicsMemorySize(true); + if (parentView.texture == this) + updateGraphicsMemorySize(true); return true; } diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 26588542c..b4fd22f7e 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -286,7 +286,8 @@ bool Texture::loadVolatile() } } - updateGraphicsMemorySize(true); + if (root) + updateGraphicsMemorySize(true); return true; }