From 9235a8107bbc830f5f37ea56863fd8e817c6da92 Mon Sep 17 00:00:00 2001 From: DrChat Date: Fri, 2 Mar 2018 23:28:29 -0600 Subject: [PATCH] [Vulkan] Track active textures in the texture cache --- src/xenia/gpu/vulkan/texture_cache.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index d6db729ba..074f9fa2c 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -430,6 +430,7 @@ TextureCache::Texture* TextureCache::DemandResolveTexture( cpu::MMIOHandler::kWatchWrite, &WatchCallback, this, texture); textures_[texture_hash] = texture; + COUNT_profile_set("gpu/texture_cache/textures", textures_.size()); return texture; } @@ -503,6 +504,7 @@ TextureCache::Texture* TextureCache::Demand(const TextureInfo& texture_info, texture_info.guest_address + texture_info.input_length)); textures_[texture_hash] = texture; + COUNT_profile_set("gpu/texture_cache/textures", textures_.size()); return texture; } @@ -1488,6 +1490,7 @@ void TextureCache::RemoveInvalidatedTextures() { it != invalidated_textures.end(); ++it) { pending_delete_textures_.push_back(*it); textures_.erase((*it)->texture_info.hash()); + COUNT_profile_set("gpu/texture_cache/textures", textures_.size()); } invalidated_textures.clear(); @@ -1503,6 +1506,7 @@ void TextureCache::ClearCache() { } } textures_.clear(); + COUNT_profile_set("gpu/texture_cache/textures", 0); for (auto it = samplers_.begin(); it != samplers_.end(); ++it) { vkDestroySampler(*device_, it->second->sampler, nullptr);