mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 16:31:57 +09:00
[Perf] (Magma): wire texture and buffer lookups get direct-mapped fronts and a continued pass stops re-marking its attachments (rd12 monolith 59.6 -> 60.5 fps).
This commit is contained in:
@@ -292,6 +292,18 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
IBufferCopyCommandProvider* m_copyProvider = nullptr;
|
||||
Vector<Vector<VkBufferObject>> m_deferredBufferReleases;
|
||||
std::unordered_map<Uint64, WireBufferResource> m_wireBuffers;
|
||||
// P14: a direct-mapped front for m_wireBuffers (every draw resolves each vertex, index and
|
||||
// uniform buffer). Keyed on WireBufferKey ({slot, gen}, never reused) and believed only at
|
||||
// the erase count it was taken at: a node never moves until erased, and every erase moves
|
||||
// the count.
|
||||
struct WireBufferLookup {
|
||||
Uint64 key = 0;
|
||||
Uint64 eraseCount = 0;
|
||||
WireBufferResource* resource = nullptr;
|
||||
};
|
||||
static constexpr SizeT kWireBufferLookupEntries = 256;
|
||||
Array<WireBufferLookup, kWireBufferLookupEntries> m_wireBufferLookup{};
|
||||
Uint64 m_wireBufferEraseCount = 0;
|
||||
// See DeferredWireRelease. ONE FLAT LIST rather than the per-frame-slot buckets above:
|
||||
// the whole point is that these entries do not wait for a frame slot to come round.
|
||||
Vector<DeferredWireRelease> m_deferredWireReleases;
|
||||
|
||||
Reference in New Issue
Block a user