Struct vulkano::buffer::immutable::ImmutableBuffer [] [src]

pub struct ImmutableBuffer<T: ?Sized, A = StdMemoryPoolAlloc> { /* fields omitted */ }

Buffer that is written once then read for as long as it is alive.

Methods

impl<T: ?Sized> ImmutableBuffer<T>
[src]

Builds an ImmutableBuffer from some data.

This function builds a memory-mapped intermediate buffer, writes the data to it, builds a command buffer that copies from this intermediate buffer to the final buffer, and finally submits the command buffer as a future.

This function returns two objects: the newly-created buffer, and a future representing the initial upload operation. In order to be allowed to use the ImmutableBuffer, you must either submit your operation after this future, or execute this future and wait for it to be finished before submitting your own operation.

Builds an ImmutableBuffer that copies its data from another buffer.

This function returns two objects: the newly-created buffer, and a future representing the initial upload operation. In order to be allowed to use the ImmutableBuffer, you must either submit your operation after this future, or execute this future and wait for it to be finished before submitting your own operation.

Builds an ImmutableBuffer that copies its data from another buffer.

impl<T> ImmutableBuffer<T>
[src]

Builds a new buffer with uninitialized data. Only allowed for sized data.

Returns two things: the buffer, and a special access that should be used for the initial upload to the buffer.

You will get an error if you try to use the buffer before using the initial upload access. However this function doesn't check whether you actually used this initial upload to fill the buffer like you're supposed to do.

You will also get an error if you try to get exclusive access to the final buffer.

Safety

  • The ImmutableBufferInitialization should be used to fill the buffer with some initial data, otherwise the content is undefined.

impl<T> ImmutableBuffer<[T]>
[src]

Builds a new buffer with uninitialized data. Can be used for arrays.

Returns two things: the buffer, and a special access that should be used for the initial upload to the buffer.

You will get an error if you try to use the buffer before using the initial upload access. However this function doesn't check whether you actually used this initial upload to fill the buffer like you're supposed to do.

You will also get an error if you try to get exclusive access to the final buffer.

Safety

  • The ImmutableBufferInitialization should be used to fill the buffer with some initial data, otherwise the content is undefined.

impl<T: ?Sized> ImmutableBuffer<T>
[src]

Builds a new buffer without checking the size and granting free access for the initial upload.

Returns two things: the buffer, and a special access that should be used for the initial upload to the buffer. You will get an error if you try to use the buffer before using the initial upload access. However this function doesn't check whether you used this initial upload to fill the buffer. You will also get an error if you try to get exclusive access to the final buffer.

Safety

  • You must ensure that the size that you pass is correct for T.
  • The ImmutableBufferInitialization should be used to fill the buffer with some initial data.

impl<T: ?Sized, A> ImmutableBuffer<T, A>
[src]

Returns the device used to create this buffer.

Returns the queue families this buffer can be used on.

Trait Implementations

impl<T: ?Sized, A> BufferAccess for ImmutableBuffer<T, A>
[src]

Returns the inner information about this buffer.

Returns a key that uniquely identifies the range given by offset/size. Read more

Locks the resource for usage on the GPU. Returns false if the lock was already acquired. Read more

Locks the resource for usage on the GPU. Supposes that the resource is already locked, and simply increases the lock by one. Read more

Returns the size of the buffer in bytes.

Returns the length of the buffer in number of elements. Read more

Builds a BufferSlice object holding the buffer by reference.

Builds a BufferSlice object holding part of the buffer by reference. Read more

Builds a BufferSlice object holding the buffer by value.

Builds a BufferSlice object holding part of the buffer by reference. Read more

Returns true if an access to self (as defined by self_offset and self_size) potentially overlaps the same memory as an access to other (as defined by other_offset and other_size). Read more

Returns true if an access to self (as defined by self_offset and self_size) potentially overlaps the same memory as an access to other (as defined by other_first_layer, other_num_layers, other_first_mipmap and other_num_mipmaps). Read more

Shortcut for conflicts_buffer that compares the whole buffer to another.

Shortcut for conflicts_image that compares the whole buffer to a whole image.

Shortcut for conflict_key that grabs the key of the whole buffer.

impl<T: ?Sized, A> TypedBufferAccess for ImmutableBuffer<T, A>
[src]

The type of the content.

impl<T: ?Sized, A> DeviceOwned for ImmutableBuffer<T, A>
[src]

Returns the device that owns Self.