diff options
author | Lioncash <mathew1800@gmail.com> | 2022-02-01 07:39:40 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-02-01 07:40:41 +0100 |
commit | 540ed72e99d783f03574a63077c876deed9a6aaf (patch) | |
tree | 8e8ecc9388054e7f96e5d3b9f3b6b462039bcae5 | |
parent | Merge pull request #7791 from german77/wall_clock (diff) | |
download | yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar.gz yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar.bz2 yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar.lz yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar.xz yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.tar.zst yuzu-540ed72e99d783f03574a63077c876deed9a6aaf.zip |
-rw-r--r-- | src/video_core/shader_cache.cpp | 4 | ||||
-rw-r--r-- | src/video_core/shader_cache.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/shader_cache.cpp b/src/video_core/shader_cache.cpp index 78bf90c48..87636857d 100644 --- a/src/video_core/shader_cache.cpp +++ b/src/video_core/shader_cache.cpp @@ -170,7 +170,7 @@ void ShaderCache::RemovePendingShaders() { marked_for_removal.clear(); if (!removed_shaders.empty()) { - RemoveShadersFromStorage(std::move(removed_shaders)); + RemoveShadersFromStorage(removed_shaders); } } @@ -213,7 +213,7 @@ void ShaderCache::UnmarkMemory(Entry* entry) { rasterizer.UpdatePagesCachedCount(addr, size, -1); } -void ShaderCache::RemoveShadersFromStorage(std::vector<ShaderInfo*> removed_shaders) { +void ShaderCache::RemoveShadersFromStorage(std::span<ShaderInfo*> removed_shaders) { // Remove them from the cache std::erase_if(storage, [&removed_shaders](const std::unique_ptr<ShaderInfo>& shader) { return std::ranges::find(removed_shaders, shader.get()) != removed_shaders.end(); diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h index 136fe294c..65333608c 100644 --- a/src/video_core/shader_cache.h +++ b/src/video_core/shader_cache.h @@ -138,7 +138,7 @@ private: /// @param removed_shaders Shaders to be removed from the storage /// @pre invalidation_mutex is locked /// @pre lookup_mutex is locked - void RemoveShadersFromStorage(std::vector<ShaderInfo*> removed_shaders); + void RemoveShadersFromStorage(std::span<ShaderInfo*> removed_shaders); /// @brief Creates a new entry in the lookup cache and returns its pointer /// @pre lookup_mutex is locked |