Bläddra i källkod

vulkan/opengl: fix reported texture memory usage of texture views.

Sasha Szpakowski 6 månader sedan
förälder
incheckning
f3dc86c8fa
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 2 1
      src/modules/graphics/opengl/Texture.cpp
  2. 2 1
      src/modules/graphics/vulkan/Texture.cpp

+ 2 - 1
src/modules/graphics/opengl/Texture.cpp

@@ -440,7 +440,8 @@ bool Texture::loadVolatile()
 		}
 	}
 
-	updateGraphicsMemorySize(true);
+	if (parentView.texture == this)
+		updateGraphicsMemorySize(true);
 
 	return true;
 }

+ 2 - 1
src/modules/graphics/vulkan/Texture.cpp

@@ -286,7 +286,8 @@ bool Texture::loadVolatile()
 		}
 	}
 
-	updateGraphicsMemorySize(true);
+	if (root)
+		updateGraphicsMemorySize(true);
 
 	return true;
 }