mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
small Buffer docs fixes (#2328)
* fixed Buffer::new* docs still referring to buffer_info instead of create_info * fixed line length --------- Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
This commit is contained in:
parent
f0a6ce1435
commit
86f63ac9f2
@ -305,7 +305,7 @@ impl Buffer {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - Panics if `buffer_info.size` is not zero.
|
||||
/// - Panics if `create_info.size` is not zero.
|
||||
pub fn new_sized<T>(
|
||||
allocator: Arc<dyn MemoryAllocator>,
|
||||
create_info: BufferCreateInfo,
|
||||
@ -330,7 +330,7 @@ impl Buffer {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - Panics if `buffer_info.size` is not zero.
|
||||
/// - Panics if `create_info.size` is not zero.
|
||||
/// - Panics if `len` is zero.
|
||||
pub fn new_slice<T>(
|
||||
allocator: Arc<dyn MemoryAllocator>,
|
||||
@ -349,7 +349,7 @@ impl Buffer {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - Panics if `buffer_info.size` is not zero.
|
||||
/// - Panics if `create_info.size` is not zero.
|
||||
/// - Panics if `len` is zero.
|
||||
pub fn new_unsized<T>(
|
||||
allocator: Arc<dyn MemoryAllocator>,
|
||||
@ -376,7 +376,7 @@ impl Buffer {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - Panics if `buffer_info.size` is not zero.
|
||||
/// - Panics if `create_info.size` is not zero.
|
||||
/// - Panics if `layout.alignment()` is greater than 64.
|
||||
pub fn new(
|
||||
allocator: Arc<dyn MemoryAllocator>,
|
||||
@ -388,10 +388,10 @@ impl Buffer {
|
||||
// TODO: Enable once sparse binding materializes
|
||||
// assert!(!allocate_info.flags.contains(BufferCreateFlags::SPARSE_BINDING));
|
||||
|
||||
assert!(
|
||||
create_info.size == 0,
|
||||
"`Buffer::new*` functions set the `buffer_info.size` field themselves, you should not \
|
||||
set it yourself",
|
||||
assert_eq!(
|
||||
create_info.size, 0,
|
||||
"`Buffer::new*` functions set the `create_info.size` field themselves, you should not \
|
||||
set it yourself"
|
||||
);
|
||||
|
||||
create_info.size = layout.size();
|
||||
|
Loading…
Reference in New Issue
Block a user