We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b85882 commit c493b63Copy full SHA for c493b63
wgpu-core/src/device/mod.rs
@@ -502,12 +502,18 @@ impl<A: HalApi> Device<A> {
502
usage |= hal::BufferUses::COPY_DST;
503
}
504
505
+ let actual_size = if desc.size == 0 {
506
+ wgt::COPY_BUFFER_ALIGNMENT
507
+ } else {
508
+ desc.size
509
+ };
510
+
511
let mut memory_flags = hal::MemoryFlags::empty();
512
memory_flags.set(hal::MemoryFlags::TRANSIENT, transient);
513
514
let hal_desc = hal::BufferDescriptor {
515
label: desc.label.borrow_option(),
- size: desc.size,
516
+ size: actual_size,
517
usage,
518
memory_flags,
519
};
0 commit comments