rpcs3/rpcs3/Emu/RSX/VK/VKDataHeapManager.h
kd-11 268de3cd24 rsx/vk: Retire the concept of heap being in "critical" state
- We waste a lot of time trying to manage that. We just swap out the buffer anyway as long as the client has enough RAM.
- This was more of an issue in early days when corrupt allocation requests were common trying to take gigabytes in one draw.
2025-04-19 01:04:00 +03:00

33 lines
745 B
C++

#pragma once
#include <util/types.hpp>
#include <unordered_map>
namespace vk
{
class data_heap;
namespace data_heap_manager
{
using managed_heap_snapshot_t = std::unordered_map<const vk::data_heap*, s64>;
// Submit ring buffer for management
void register_ring_buffer(vk::data_heap& heap);
// Bulk registration
void register_ring_buffers(std::initializer_list<std::reference_wrapper<vk::data_heap>> heaps);
// Capture managed ring buffers snapshot at current time
managed_heap_snapshot_t get_heap_snapshot();
// Synchronize heap with snapshot
void restore_snapshot(const managed_heap_snapshot_t& snapshot);
// Reset all managed heap allocations
void reset_heap_allocations();
// Cleanup
void reset();
}
}