Struct vulkano::instance::InstanceCreateInfo
source · pub struct InstanceCreateInfo {
pub application_name: Option<String>,
pub application_version: Version,
pub enabled_extensions: InstanceExtensions,
pub enabled_layers: Vec<String>,
pub engine_name: Option<String>,
pub engine_version: Version,
pub max_api_version: Option<Version>,
pub enumerate_portability: bool,
pub enabled_validation_features: Vec<ValidationFeatureEnable>,
pub disabled_validation_features: Vec<ValidationFeatureDisable>,
pub _ne: NonExhaustive,
}
Expand description
Parameters to create a new Instance
.
Fields§
§application_name: Option<String>
A string of your choice stating the name of your application.
The default value is None
.
application_version: Version
A version number of your choice specifying the version of your application.
The default value is zero.
enabled_extensions: InstanceExtensions
The extensions to enable on the instance.
The default value is InstanceExtensions::empty()
.
enabled_layers: Vec<String>
The layers to enable on the instance.
The default value is empty.
engine_name: Option<String>
A string of your choice stating the name of the engine used to power the application.
engine_version: Version
A version number of your choice specifying the version of the engine used to power the application.
The default value is zero.
max_api_version: Option<Version>
The highest Vulkan API version that the application will use with the instance.
Usually, you will want to leave this at the default.
The default value is Version::HEADER_VERSION
, but if the
supported instance version is 1.0, then it will be 1.0.
enumerate_portability: bool
Include portability subset devices when enumerating physical devices.
If you enable this flag, you must ensure that your program is prepared to handle the non-conformant aspects of these devices.
If this flag is not enabled, and there are no fully-conformant devices on the system, then
Instance::new
will return an IncompatibleDriver
error.
The default value is false
.
Notes
If this flag is enabled, and the
khr_portability_enumeration
extension is supported, it will be enabled automatically when creating the instance.
If the extension is not supported, this flag will be ignored.
enabled_validation_features: Vec<ValidationFeatureEnable>
Features of the validation layer to enable.
If not empty, the
ext_validation_features
extension must be enabled on the instance.
disabled_validation_features: Vec<ValidationFeatureDisable>
Features of the validation layer to disable.
If not empty, the
ext_validation_features
extension must be enabled on the instance.
_ne: NonExhaustive
Implementations§
source§impl InstanceCreateInfo
impl InstanceCreateInfo
sourcepub fn application_from_cargo_toml() -> Self
pub fn application_from_cargo_toml() -> Self
Returns an InstanceCreateInfo
with the application_name
and application_version
set
from information in your crate’s Cargo.toml file.
Panics
- Panics if the required environment variables are missing, which happens if the project wasn’t built by Cargo.