Grow per-frame storage on-demand instead statically allocating for the maximum. (#3900)

This commit is contained in:
Branimir Karadžić
2026-08-16 17:26:25 -07:00
committed by GitHub
parent a772859619
commit 35a98dd645
15 changed files with 638 additions and 191 deletions
+1 -1
View File
@@ -1943,7 +1943,7 @@ WGPU_IMPORT
bx::free(g_allocator, m_uniforms[_handle.idx]);
}
uint32_t size = g_uniformTypeSize[_type]*_num;
const uint32_t size = bx::alignUp(g_uniformTypeSize[_type]*_num, 16);
void* data = bx::alloc(g_allocator, size);
bx::memSet(data, 0, size);
m_uniforms[_handle.idx] = data;