Magnum::Vk::LayerProperties class new in Git master

Vulkan layer properties.

Provides a searchable container of Vulkan layers enumerated with enumerateLayerProperties(). Only instance layers are enumerated, as device layers are deprecated since Vulkan 1.0.13 and the assumption is that no drivers currently use rely on these anymore. See § 37.3.1 for more information.

See the Instance creation docs for an example of using this class for checking available layers before enabling them on an instance.

Constructors, destructors, conversion operators

LayerProperties(NoCreateT) explicit
Construct without populating the contents.
LayerProperties(const LayerProperties&) deleted
Copying is not allowed.
LayerProperties(LayerProperties&&) noexcept
Move constructor.

Public functions

auto operator=(const LayerProperties&) -> LayerProperties& deleted
Copying is not allowed.
auto operator=(LayerProperties&&) -> LayerProperties& noexcept
Move assignment.
auto names() const -> Containers::ArrayView<const Containers::StringView>
Layer names.
auto isSupported(Containers::StringView layer) const -> bool
Whether given layer is supported.
auto count() const -> UnsignedInt
Count of layers reported by the driver.
auto name(UnsignedInt id) const -> Containers::StringView
Layer name.
auto revision(UnsignedInt id) const -> UnsignedInt
Layer revision.
auto version(UnsignedInt id) const -> Version
Vulkan version the layer is implemented against.
auto description(UnsignedInt id) const -> Containers::StringView
Layer description.

Function documentation

Magnum::Vk::LayerProperties::LayerProperties(NoCreateT) explicit

Construct without populating the contents.

Equivalent to a moved-from state. Move over the result of enumerateLayerProperties() to make it usable.

Containers::ArrayView<const Containers::StringView> Magnum::Vk::LayerProperties::names() const

Layer names.

A list of all layers reported by the driver. Use isSupported() to query support of a particular layer name. Note that the list is sorted and thus may be different than the order in which the name(), revision(), version() and description() accessors return values.

The returned views are owned by the LayerProperties instance (i.e., not a global memory).

bool Magnum::Vk::LayerProperties::isSupported(Containers::StringView layer) const

Whether given layer is supported.

Search complexity is $ \mathcal{O}(\log n) $ in the total layer count.

Containers::StringView Magnum::Vk::LayerProperties::name(UnsignedInt id) const

Layer name.

Parameters
id Layer index, expected to be smaller than count()

The returned view is owned by the LayerProperties instance (i.e., not a global memory).

UnsignedInt Magnum::Vk::LayerProperties::revision(UnsignedInt id) const

Layer revision.

Parameters
id Layer index, expected to be smaller than count()

Version Magnum::Vk::LayerProperties::version(UnsignedInt id) const

Vulkan version the layer is implemented against.

Parameters
id Layer index, expected to be smaller than count()

Containers::StringView Magnum::Vk::LayerProperties::description(UnsignedInt id) const

Layer description.

Parameters
id Layer index, expected to be smaller than count()

The returned view is owned by the LayerProperties instance (i.e., not a global memory).