mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-23 16:28:58 +02:00
[gl, vk] Access Tracking Synchronization
This commit is contained in:
parent
642c91a49b
commit
699dda1957
10 changed files with 236 additions and 7 deletions
|
|
@ -130,6 +130,17 @@ public:
|
|||
ResetStorageBit(id.index);
|
||||
}
|
||||
|
||||
[[nodiscard]] bool Contains(SlotId id) const noexcept {
|
||||
if (!id) {
|
||||
return false;
|
||||
}
|
||||
const size_t word = id.index / 64;
|
||||
if (word >= stored_bitset.size()) {
|
||||
return false;
|
||||
}
|
||||
return ((stored_bitset[word] >> (id.index % 64)) & 1) != 0;
|
||||
}
|
||||
|
||||
[[nodiscard]] Iterator begin() noexcept {
|
||||
const auto it = std::ranges::find_if(stored_bitset, [](u64 value) { return value != 0; });
|
||||
if (it == stored_bitset.end()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue