mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-27 16:49:39 +01:00
Creating buffers with size 0 actually creates them with size 1
This commit is contained in:
1 parent
1e177d0813
commit
3662987220
1 file changed
+1
-1
+1
-1
@@ -499,7 +499,7 @@ impl Device {
|
||||
assert_ne!(type_size, 0);
|
||||
|
||||
let desc = BufferDescriptor {
|
||||
size: type_size * count as u32,
|
||||
size: (type_size * count as u32).max(1),
|
||||
usage,
|
||||
};
|
||||
let mut ptr: *mut u8 = std::ptr::null_mut();
|
||||
|
||||
Reference in new issue
Block a user