nvk: Reset offset value in ResetDescriptorPool

This is another secret change you've been waiting for 🐸

This change resets the current_offset value to 0 in ResetDescriptorPool
(without it the offset would keep counting until it reaches the limit
which causes allocation issues and/or application crashes/freezes)

RADV does the same thing, so I think this change is correct 🤓

BTW this meme seems to be relevant: https://youtu.be/1stQbTuUBIE

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Echo J 2023-04-02 16:29:19 +03:00 committed by Marge Bot
parent 35d85fca88
commit d1bbd16f1f

View file

@ -568,6 +568,7 @@ nvk_ResetDescriptorPool(VkDevice _device,
nvk_descriptor_set_destroy(device, pool, pool->entries[i].set, false);
}
pool->entry_count = 0;
pool->current_offset = 0;
return VK_SUCCESS;
}