gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 547 forks source link

Add typedef for buffer stride #3546

Closed tangmi closed 3 years ago

tangmi commented 3 years ago

Adds the following:

/// An stride between elements inside a buffer, in bytes.
pub type Stride = u32;

Note that CommandBuffer::copy_query_pool_results's and Device::get_query_pool_results's stride parameters have changed from u64 to u32. I'm unsure of the implications of this, but I don't imagine nobody has a buffer with a stride > u32::max_value() (can backends even support buffers that large?). Please let me know if I should change this back!

PR checklist:

bors[bot] commented 3 years ago

Build succeeded: