Bump the vertex buffer sizes by 1

This commit is contained in:
Dzmitry Malyshau 2021-08-23 16:50:34 -04:00
parent 663cb309a0
commit 43d44c89e1

View File

@ -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
};