mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
prevent crash on empty uniform blocks
This commit is contained in:
@@ -435,6 +435,12 @@ impl RenderDataBundle {
|
||||
write_shader_values(shader_property_group, &mut buf)
|
||||
}
|
||||
|
||||
if buf.is_empty() {
|
||||
// There's no need to upload empty uniform blocks. Empty uniform blocks will be
|
||||
// optimized out anyway.
|
||||
continue;
|
||||
}
|
||||
|
||||
material_property_group_blocks.push((
|
||||
resource_definition.binding,
|
||||
render_context.uniform_memory_allocator.allocate(buf),
|
||||
|
||||
Reference in New Issue
Block a user