17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 22:49:05 +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

@@ -353,7 +353,7 @@ bool vulkan14_renderer::draw_indirect(vk14::instance_cull &Cull, command_set con
auto &draws{scene.draws};
auto &window{draw.draws_window};
auto const size{static_cast<VkDeviceSize>(Count) * draws.stride};
auto slice{(window.open && (size <= draws.window)) ? draw.draws_cache.allocate_before(size, draws.stride, window.base + draws.window) : vk14::ring_slice{}};
auto slice{(window.open && (size <= draws.window)) ? draw.draws_cache.allocate_before(size, draws.stride, window.base, window.base + draws.window) : vk14::ring_slice{}};
if ((false == bool(slice)) && (size <= draws.window))
{
slice = draw.draws_cache.allocate(size, draws.stride);