[][src]Struct vulkano::device::Features

pub struct Features {
    pub robust_buffer_access: bool,
    pub full_draw_index_uint32: bool,
    pub image_cube_array: bool,
    pub independent_blend: bool,
    pub geometry_shader: bool,
    pub tessellation_shader: bool,
    pub sample_rate_shading: bool,
    pub dual_src_blend: bool,
    pub logic_op: bool,
    pub multi_draw_indirect: bool,
    pub draw_indirect_first_instance: bool,
    pub depth_clamp: bool,
    pub depth_bias_clamp: bool,
    pub fill_mode_non_solid: bool,
    pub depth_bounds: bool,
    pub wide_lines: bool,
    pub large_points: bool,
    pub alpha_to_one: bool,
    pub multi_viewport: bool,
    pub sampler_anisotropy: bool,
    pub texture_compression_etc2: bool,
    pub texture_compression_astc_ldr: bool,
    pub texture_compression_bc: bool,
    pub occlusion_query_precise: bool,
    pub pipeline_statistics_query: bool,
    pub vertex_pipeline_stores_and_atomics: bool,
    pub fragment_stores_and_atomics: bool,
    pub shader_tessellation_and_geometry_point_size: bool,
    pub shader_image_gather_extended: bool,
    pub shader_storage_image_extended_formats: bool,
    pub shader_storage_image_multisample: bool,
    pub shader_storage_image_read_without_format: bool,
    pub shader_storage_image_write_without_format: bool,
    pub shader_uniform_buffer_array_dynamic_indexing: bool,
    pub shader_sampled_image_array_dynamic_indexing: bool,
    pub shader_storage_buffer_array_dynamic_indexing: bool,
    pub shader_storage_image_array_dynamic_indexing: bool,
    pub shader_clip_distance: bool,
    pub shader_cull_distance: bool,
    pub shader_float64: bool,
    pub shader_int64: bool,
    pub shader_int16: bool,
    pub shader_resource_residency: bool,
    pub shader_resource_min_lod: bool,
    pub sparse_binding: bool,
    pub sparse_residency_buffer: bool,
    pub sparse_residency_image2d: bool,
    pub sparse_residency_image3d: bool,
    pub sparse_residency2_samples: bool,
    pub sparse_residency4_samples: bool,
    pub sparse_residency8_samples: bool,
    pub sparse_residency16_samples: bool,
    pub sparse_residency_aliased: bool,
    pub variable_multisample_rate: bool,
    pub inherited_queries: bool,
    pub buffer_device_address: bool,
    pub buffer_device_address_capture_replay: bool,
    pub buffer_device_address_multi_device: bool,
    pub variable_pointers_storage_buffer: bool,
    pub variable_pointers: bool,
    pub shader_buffer_int64_atomics: bool,
    pub shader_shared_int64_atomics: bool,
    pub storage_buffer_8bit: bool,
    pub storage_uniform_8bit: bool,
    pub storage_push_constant_8bit: bool,
    pub storage_buffer_16bit: bool,
    pub storage_uniform_16bit: bool,
    pub storage_push_constant_16bit: bool,
    pub storage_input_output_16bit: bool,
    pub shader_float16: bool,
    pub shader_int8: bool,
}

Represents all the features that are available on a physical device or enabled on a logical device.

Note that the robust_buffer_access is guaranteed to be supported by all Vulkan implementations.

Example

use vulkano::device::Features;
let minimal_features = Features {
    geometry_shader: true,
    .. Features::none()
};

let optimal_features = vulkano::device::Features {
    geometry_shader: true,
    tessellation_shader: true,
    .. Features::none()
};

if !physical_device.supported_features().superset_of(&minimal_features) {
    panic!("The physical device is not good enough for this application.");
}

assert!(optimal_features.superset_of(&minimal_features));
let features_to_request = optimal_features.intersection(physical_device.supported_features());

Fields

robust_buffer_access: boolfull_draw_index_uint32: boolimage_cube_array: boolindependent_blend: boolgeometry_shader: booltessellation_shader: boolsample_rate_shading: booldual_src_blend: boollogic_op: boolmulti_draw_indirect: booldraw_indirect_first_instance: booldepth_clamp: booldepth_bias_clamp: boolfill_mode_non_solid: booldepth_bounds: boolwide_lines: boollarge_points: boolalpha_to_one: boolmulti_viewport: boolsampler_anisotropy: booltexture_compression_etc2: booltexture_compression_astc_ldr: booltexture_compression_bc: boolocclusion_query_precise: boolpipeline_statistics_query: boolvertex_pipeline_stores_and_atomics: boolfragment_stores_and_atomics: boolshader_tessellation_and_geometry_point_size: boolshader_image_gather_extended: boolshader_storage_image_extended_formats: boolshader_storage_image_multisample: boolshader_storage_image_read_without_format: boolshader_storage_image_write_without_format: boolshader_uniform_buffer_array_dynamic_indexing: boolshader_sampled_image_array_dynamic_indexing: boolshader_storage_buffer_array_dynamic_indexing: boolshader_storage_image_array_dynamic_indexing: boolshader_clip_distance: boolshader_cull_distance: boolshader_float64: boolshader_int64: boolshader_int16: boolshader_resource_residency: boolshader_resource_min_lod: boolsparse_binding: boolsparse_residency_buffer: boolsparse_residency_image2d: boolsparse_residency_image3d: boolsparse_residency2_samples: boolsparse_residency4_samples: boolsparse_residency8_samples: boolsparse_residency16_samples: boolsparse_residency_aliased: boolvariable_multisample_rate: boolinherited_queries: boolbuffer_device_address: boolbuffer_device_address_capture_replay: boolbuffer_device_address_multi_device: boolvariable_pointers_storage_buffer: boolvariable_pointers: boolshader_buffer_int64_atomics: boolshader_shared_int64_atomics: boolstorage_buffer_8bit: boolstorage_uniform_8bit: boolstorage_push_constant_8bit: boolstorage_buffer_16bit: boolstorage_uniform_16bit: boolstorage_push_constant_16bit: boolstorage_input_output_16bit: boolshader_float16: boolshader_int8: bool

Implementations

impl Features[src]

pub fn none() -> Features[src]

Builds a Features object with all values to false.

pub fn all() -> Features[src]

Builds a Features object with all values to true.

Note: This function is used for testing purposes, and is probably useless in a real code.

pub fn superset_of(&self, other: &Features) -> bool[src]

Returns true if self is a superset of the parameter.

That is, for each feature of the parameter that is true, the corresponding value in self is true as well.

pub fn intersection(&self, other: &Features) -> Features[src]

Builds a Features that is the intersection of self and another Features object.

The result's field will be true if it is also true in both self and other.

pub fn difference(&self, other: &Features) -> Features[src]

Builds a Features that is the difference of another Features object from self.

The result's field will be true if it is true in self but not other.

Trait Implementations

impl Clone for Features[src]

impl Debug for Features[src]

impl Default for Features[src]

impl Eq for Features[src]

impl Hash for Features[src]

impl PartialEq<Features> for Features[src]

impl StructuralEq for Features[src]

impl StructuralPartialEq for Features[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.