Lines Matching +full:vulkan +full:- +full:layers
3 // <LICENSE-APACHE or
4 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT
5 // license <LICENSE-MIT or https://opensource.org/licenses/MIT>,
10 //! Vulkan library loading system.
13 //! of Vulkan. A Vulkan implementation is defined as a single `vkGetInstanceProcAddr` function,
38 /// A loaded library containing a valid Vulkan implementation.
50 /// Loads the default Vulkan library for this system.
51 pub fn new() -> Result<Arc<Self>, LoadingError> { in new()
54 fn def_loader_impl() -> Result<Box<dyn Loader>, LoadingError> { in new()
61 fn def_loader_impl() -> Result<Box<dyn Loader>, LoadingError> { in new()
63 fn get_path() -> &'static Path { in new()
64 Path::new("vulkan-1.dll") in new()
67 fn get_path() -> &'static Path { in new()
71 fn get_path() -> &'static Path { in new()
75 fn get_path() -> &'static Path { in new()
87 /// Loads a custom Vulkan library.
88 pub fn with_loader(loader: impl Loader + 'static) -> Result<Arc<Self>, LoadingError> { in with_loader()
111 unsafe fn get_api_version(loader: &impl Loader) -> Result<Version, VulkanError> { in get_api_version()
112 // Per the Vulkan spec: in get_api_version()
114 // Vulkan 1.0 implementation. Otherwise, the application can call vkEnumerateInstanceVersion in get_api_version()
115 // to determine the version of Vulkan. in get_api_version()
139 ) -> Result<Vec<ExtensionProperties>, VulkanError> { in get_extension_properties()
174 /// Returns pointers to the raw global Vulkan functions of the library.
176 pub fn fns(&self) -> &EntryFunctions { in fns()
180 /// Returns the highest Vulkan version that is supported for instances.
182 pub fn api_version(&self) -> Version { in api_version()
188 pub fn extension_properties(&self) -> &[ExtensionProperties] { in extension_properties()
194 pub fn supported_extensions(&self) -> &InstanceExtensions { in supported_extensions()
198 /// Returns the list of layers that are available when creating an instance.
205 /// > **Note**: The available layers may change between successive calls to this function, so
206 /// > each call may return different results. It is possible that one of the layers enumerated
223 ) -> Result<impl ExactSizeIterator<Item = LayerProperties>, OomError> { in layer_properties()
260 ) -> Result<Vec<ExtensionProperties>, VulkanError> { in layer_extension_properties()
269 ) -> Result<InstanceExtensions, VulkanError> { in supported_layer_extensions()
278 /// the given layers.
282 layers: impl IntoIterator<Item = &'a str>, in supported_extensions_with_layers()
283 ) -> Result<InstanceExtensions, VulkanError> { in supported_extensions_with_layers()
284 layers in supported_extensions_with_layers()
298 ) -> ash::vk::PFN_vkVoidFunction { in get_instance_proc_addr()
303 /// Implemented on objects that grant access to a Vulkan implementation.
312 ) -> ash::vk::PFN_vkVoidFunction; in get_instance_proc_addr()
324 ) -> ash::vk::PFN_vkVoidFunction { in get_instance_proc_addr()
330 fn fmt(&self, _f: &mut Formatter<'_>) -> Result<(), FmtError> { in fmt()
335 /// Implementation of `Loader` that loads Vulkan from a dynamic library.
347 /// - The dynamic library must be a valid Vulkan implementation.
349 pub unsafe fn new(path: impl AsRef<Path>) -> Result<DynamicLibraryLoader, LoadingError> { in new()
369 ) -> ash::vk::PFN_vkVoidFunction { in get_instance_proc_addr()
374 /// Expression that returns a loader that assumes that Vulkan is linked to the executable you're
390 ) -> ash::vk::PFN_vkVoidFunction;
399 ) -> ash::vk::PFN_vkVoidFunction {
408 /// Error that can happen when loading a Vulkan library.
411 /// Failed to load the Vulkan shared library.
419 fn source(&self) -> Option<&(dyn Error + 'static)> { in source()
429 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> { in fmt()
434 Self::LibraryLoadFailure(_) => "failed to load the Vulkan shared library", in fmt()
442 fn from(err: VulkanError) -> Self { in from()