GPUOpen-LibrariesAndSDKs/Cauldron

RingWithTabs::OnBeginFrame wrong m_backBufferIndex calculations

Closed this issue · 1 comments

@rys next one:

m_backBufferIndex = (m_backBufferIndex + 1) % m_numberOfBackBuffers;

This one should release (through m_mem.Free(...)) stuff from previous back_buffer, not the upcoming one.
Something like: m_backBufferIndex = m_backBufferIndex == 0 ? m_numberOfBackBuffers : m_backBufferIndex - 1;

My bad, this is actually correct: the oldest stuff (indexed in ring fashion) is released.