Merge pull request #1855 from kvark/vertex-offset

Bump the vertex buffer sizes by 1
This commit is contained in:
Connor Fitzgerald
2021-08-24 13:54:55 -04:00
committed by GitHub

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