mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-07 17:20:14 +01:00
- Tagged eventIDs can be used to safely delete resources that are no longer used - TODO: Expand gc to collect images as well - TODO: Fix the texture cache to avoid over-allocating image resources
30 lines
463 B
C++
30 lines
463 B
C++
#include "stdafx.h"
|
|
#include "VKResourceManager.h"
|
|
|
|
namespace vk
|
|
{
|
|
resource_manager g_resource_manager;
|
|
atomic_t<u64> g_event_ctr;
|
|
|
|
resource_manager* get_resource_manager()
|
|
{
|
|
return &g_resource_manager;
|
|
}
|
|
|
|
u64 get_event_id()
|
|
{
|
|
return g_event_ctr++;
|
|
}
|
|
|
|
u64 current_event_id()
|
|
{
|
|
return g_event_ctr.load();
|
|
}
|
|
|
|
void on_event_completed(u64 event_id)
|
|
{
|
|
// TODO: Offload this to a secondary thread
|
|
g_resource_manager.eid_completed(event_id);
|
|
}
|
|
}
|