Struct vulkano::device::Device[][src]

pub struct Device { /* fields omitted */ }
Expand description

Represents a Vulkan context.

Implementations

Builds a new Vulkan device for the given physical device.

You must pass two things when creating a logical device:

  • A list of optional Vulkan features that must be enabled on the device. Note that if a feature is not enabled at device creation, you can’t use it later even it it’s supported by the physical device.

  • An iterator to a list of queues to create. Each element of the iterator must indicate the family whose queue belongs to and a priority between 0.0 and 1.0 to assign to it. A queue with a higher value indicates that the commands will execute faster than on a queue with a lower value. Note however that no guarantee can be made on the way the priority value is handled by the implementation.

Panic
  • Panics if one of the queue families doesn’t belong to the given device.

Returns the Vulkan version supported by the device.

This is the lower of the physical device’s supported version and the instance’s max_api_version.

Grants access to the Vulkan functions of the device.

Waits until all work on this device has finished. You should never need to call this function, but it can be useful for debugging or benchmarking purposes.

Note: This is the Vulkan equivalent of OpenGL’s glFinish.

Safety

This function is not thread-safe. You must not submit anything to any of the queue of the device (either explicitly or implicitly, for example with a future’s destructor) while this function is waiting.

Returns the instance used to create this device.

Returns the physical device that was used to create this device.

Returns an iterator to the list of queues families that this device uses.

Note: Will return -> impl ExactSizeIterator<Item = QueueFamily> in the future.

Returns the features that have been enabled on the device.

Returns the extensions that have been enabled on the device.

Returns the standard memory pool used by default if you don’t provide any other pool.

Returns the standard descriptor pool used by default if you don’t provide any other pool.

Returns the standard command buffer pool used by default if you don’t provide any other pool.

Panic
  • Panics if the device and the queue family don’t belong to the same physical device.

Assigns a human-readable name to object for debugging purposes.

Panics
  • If object is not owned by this device.

Assigns a human-readable name to object for debugging purposes.

Safety

object must be a Vulkan handle owned by this device, and its type must be accurately described by ty.

Checks the given combination of image attributes/configuration for compatibility with the physical device.

Returns a struct with additional capabilities available for this image configuration.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type of the object.

Returns a reference to the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.