mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-25 18:25:29 +00:00
Grow per-frame storage on-demand instead statically allocating for the maximum. (#3900)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user