[video_core] replace std::map/unordered_map/unordered_set with ankerl::unordered_dense:: equivalents
All checks were successful
eden-license / license-header (pull_request) Successful in 18s

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-08-29 03:13:35 +00:00 committed by crueter
parent 42280f34d6
commit 94aa87f17c
2 changed files with 6 additions and 5 deletions

View file

@ -6,8 +6,8 @@
#pragma once #pragma once
#include <unordered_set>
#include <boost/container/small_vector.hpp> #include <boost/container/small_vector.hpp>
#include <ankerl/unordered_dense.h>
#include "common/alignment.h" #include "common/alignment.h"
#include "common/settings.h" #include "common/settings.h"
@ -2038,7 +2038,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
lru_cache.Free(image.lru_index); lru_cache.Free(image.lru_index);
const auto& clear_page_table = const auto& clear_page_table =
[image_id](u64 page, [image_id](u64 page,
std::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>& ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>&
selected_page_table) { selected_page_table) {
const auto page_it = selected_page_table.find(page); const auto page_it = selected_page_table.find(page);
if (page_it == selected_page_table.end()) { if (page_it == selected_page_table.end()) {

View file

@ -16,6 +16,7 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <boost/container/small_vector.hpp> #include <boost/container/small_vector.hpp>
#include <ankerl/unordered_dense.h>
#include <queue> #include <queue>
#include "common/common_types.h" #include "common/common_types.h"
@ -66,7 +67,7 @@ struct AsyncDecodeContext {
std::atomic_bool complete; std::atomic_bool complete;
}; };
using TextureCacheGPUMap = std::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>; using TextureCacheGPUMap = ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>;
class TextureCacheChannelInfo : public ChannelInfo { class TextureCacheChannelInfo : public ChannelInfo {
public: public:
@ -85,8 +86,8 @@ public:
std::vector<SamplerId> compute_sampler_ids; std::vector<SamplerId> compute_sampler_ids;
std::vector<ImageViewId> compute_image_view_ids; std::vector<ImageViewId> compute_image_view_ids;
std::unordered_map<TICEntry, ImageViewId> image_views; ankerl::unordered_dense::map<TICEntry, ImageViewId> image_views;
std::unordered_map<TSCEntry, SamplerId> samplers; ankerl::unordered_dense::map<TSCEntry, SamplerId> samplers;
TextureCacheGPUMap* gpu_page_table; TextureCacheGPUMap* gpu_page_table;
TextureCacheGPUMap* sparse_page_table; TextureCacheGPUMap* sparse_page_table;