wlroots/render/vulkan
Kenny Levinsen e180bedd61 render/vulkan: Better bucket size selection
The current buffer allocator allocates a buffer that is either the
minimum stage span, the requested size times two, or the largest current
allocation times two.

Imagine needing a miniscule allocation. We currently have 1M, 8M and 16M
buffers, but the 1M buffer is full or not available. The last rule would
cause us to request a 32M buffer, rather than a more appropriate 2M
buffer to fill the bucket sequence.

Make two adjustments to this logic:

1. Round the requested size up to the nearest power of two to avoid odd
   bucket sizes.

2. Look through the available buffers and find a hole in the bucket
   sequence to fill, which is made easy by the power of two rule above
   as we can just iterate until the buffer we are looking at is more
   than 2x our current target.

The buffer we create is inserted into the middle of the list of buffers
as needed to maintain the size order.
2025-03-13 01:41:18 +01:00
..
shaders render/vulkan: unify alpha pre-multiplication in output shader 2025-02-23 15:41:23 +01:00
meson.build render/vulkan: use renamed glslang binary by default 2023-07-27 16:06:49 +08:00
pass.c matrix: move to util/ 2025-01-27 17:48:18 +01:00
pixel_format.c render: unify getter for texture formats 2024-04-21 11:27:29 +00:00
renderer.c render/vulkan: Better bucket size selection 2025-03-13 01:41:18 +01:00
texture.c render/vulkan: add support for explicit sync 2024-10-28 17:51:21 +00:00
util.c render/vulkan: drop unused vulkan_has_extension() 2023-05-26 12:25:53 +00:00
vulkan.c xwayland,render/vulkan: fix some size assertions 2024-12-30 12:47:54 +03:00