fix skin uniform buffer size (#19888)

# Objective

for `BufferUsages::STORAGE` on webgpu (and maybe other contexts), buffer
sizes must be a multiple of 4. the skin uniform buffer starts at 16384
then increases by 1.5x, which eventually hits a number which isn't

## Solution

`.next_multiple_of(4)`
This commit is contained in:
robtfm 2025-07-02 21:06:27 +01:00 committed by GitHub
parent 861e778c4c
commit b79b8133c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,7 +220,7 @@ pub fn prepare_skins(
let mut new_size = uniform.current_buffer.size();
while new_size < needed_size {
// 1.5× growth factor.
new_size += new_size / 2;
new_size = (new_size + new_size / 2).next_multiple_of(4);
}
// Create the new buffers.