17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 05:54:43 +01:00

Keep the slices of the ring caches within the window the shaders index from

This commit is contained in:
2026-10-29 19:21:14 +01:00
parent 975fc1b4ea
commit 8bd41f431d
4 changed files with 11 additions and 10 deletions

View File

@@ -293,9 +293,10 @@ class ring_cache
void reset(frame_ring *Ring, VkDeviceSize Part);
// Size bytes aligned to Alignment (at most 256); empty when the ring is full
ring_slice allocate(VkDeviceSize Size, VkDeviceSize Alignment);
// the same, only when the slice fits in the part held and ends before Limit (an offset in the buffer); empty, with nothing taken,
// otherwise
ring_slice allocate_before(VkDeviceSize Size, VkDeviceSize Alignment, VkDeviceSize Limit);
// the same, only when the slice fits in the part held and lies within Base to Limit (offsets in the buffer: a window the shaders
// index from Base); empty, with nothing taken, otherwise. the part held may lie below Base: a large slice which got a part of its
// own opened the window above it
ring_slice allocate_before(VkDeviceSize Size, VkDeviceSize Alignment, VkDeviceSize Base, VkDeviceSize Limit);
private:
// where the next slice aligned to Alignment would begin in the part held, as an offset in the buffer