mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-17 01:12:41 +00:00
Bump the vertex buffer sizes by 1
This commit is contained in:
parent
663cb309a0
commit
43d44c89e1
@ -504,6 +504,9 @@ impl<A: HalApi> Device<A> {
|
||||
|
||||
let actual_size = if desc.size == 0 {
|
||||
wgt::COPY_BUFFER_ALIGNMENT
|
||||
} else if desc.usage.contains(wgt::BufferUsages::VERTEX) {
|
||||
// Bumping the size by 1 so that we can bind an empty range at the end of the buffer.
|
||||
desc.size + 1
|
||||
} else {
|
||||
desc.size
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user