Texture cache: Fix the remaining issues with memory mnagement and unmapping.
This commit is contained in:
parent
9cf4c8831d
commit
f350c3d74e
12 changed files with 63 additions and 16 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <deque>
|
||||
#include <limits>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
@ -59,6 +60,15 @@ public:
|
|||
return ref->second.gpu_memory;
|
||||
}
|
||||
|
||||
std::optional<size_t> getStorageID(size_t id) const {
|
||||
std::unique_lock<std::mutex> lk(config_mutex);
|
||||
const auto ref = address_spaces.find(id);
|
||||
if (ref == address_spaces.end()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
return ref->second.storage_id;
|
||||
}
|
||||
|
||||
protected:
|
||||
static constexpr size_t UNSET_CHANNEL{std::numeric_limits<size_t>::max()};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue