Expand description
The Vulkan platform contracts and the platform graphics over them.
What a platform exposes so that a render backend can draw with Vulkan:
the instance and the device (IVulkanInstance, IVulkanDevice), the
graphics context of a device (IVulkanPlatformGraphicsContext), the
surfaces a context presents to (IVulkanKhrSurfacePlatformSurface,
IVulkanKhrSurfacePlatformSurfaceFactory,
IVulkanRenderTargetPlatformSurface), the render target of a surface
and the session of a frame (IVulkanRenderTarget,
IVulkanRenderSession), and the import of images and semaphores that
were created outside of a device
(IVulkanContextExternalObjectsFeature).
And the implementation every windowing platform shares
(VulkanPlatformGraphics): it creates the instance (with the debug
messenger when asked), selects a physical device, creates the device with
its queue, and gives each thread that renders a context whose render
targets present through a swap chain. A platform adds three things
(VulkanPlatformSpecificOptions): the way to the entry points of the
Vulkan loader, the instance extensions of its window system, and the
factory that turns its windows into surfaces.
These types belong to no render backend. The types, constants and
function tables of Vulkan are those of the ash crate, which is
exported again for the crates that implement or read the contracts; the
loader of the system is opened at run time (ash::Entry::load), and
nothing is linked.
Re-exports§
pub use ash;
Modules§
- unmanaged_
interop - The entry points, structures and enumerations of Vulkan.
Structs§
- Version
- A version number of three parts.
- Vulkan
Device Creation Options - Vulkan
Exception - A failure reported by Vulkan or by the code driving it.
- Vulkan
Helpers - Values of the Vulkan headers that are computed and not enumerated.
- Vulkan
Image Info - A Vulkan image as a render backend needs to know it: the handles are those of the device of the context that hands the value out, the other members are the numeric values of the Vulkan enumerations.
- Vulkan
Instance Creation Options - Vulkan
Options - How an application wants Vulkan to be set up.
- Vulkan
Platform Graphics - The platform graphics of Vulkan: creates the graphics contexts of the threads that render, each over a device of its own or all over the device of the application.
- Vulkan
Platform Specific Options - What a windowing platform adds to the options of the application.
Traits§
- IVulkan
Context External Objects Feature - Lets a Vulkan context import images and semaphores that were created outside of it (by another device or another process).
- IVulkan
Device - A Vulkan device with the queue the framework renders with.
- IVulkan
Device Factory - Where the devices of the contexts come from.
- IVulkan
External Image - An image of a Vulkan device that was imported from an external image.
- IVulkan
External Semaphore - A semaphore of a Vulkan device that was imported from a handle.
- IVulkan
Instance - A Vulkan instance and the way to its entry points.
- IVulkan
KhrSurface Platform Surface - A surface that is presented to through a
VkSurfaceKHRand a swap chain. - IVulkan
KhrSurface Platform Surface Factory - Lets a context present to surfaces that are not Vulkan surfaces themselves (the window of a platform).
- IVulkan
Platform Graphics Context - A platform graphics context that renders with Vulkan.
- IVulkan
Render Session - One frame being rendered with Vulkan. Disposing the session presents the frame.
- IVulkan
Render Target - The Vulkan render target of a surface.
- IVulkan
Render Target Platform Surface - A platform render surface that provides its own
IVulkanRenderTarget, e.g. an offscreen image-based target that doesn’t involve a swapchain. - Vulkan
Exception Extensions - Turns every result but
VK_SUCCESSinto a failure. - Vulkan
Result Extensions - Names the function whose result a failure is.
Functions§
- try_
get_ vulkan_ khr_ surface - The render surface viewed as a surface with a
VkSurfaceKHR, when it is one. - try_
get_ vulkan_ render_ target_ surface - The render surface viewed as a surface with its own Vulkan render target, when it is one.
Type Aliases§
- VkGet
Instance Proc Address Delegate - The address of an instance-level entry point of Vulkan by its name
(
vkGetInstanceProcAddr): the instance, zero for the entry points that need none, and the name; zero when there is no such entry point. - Vulkan
Device Check Surface Factory - Creates a
VkSurfaceKHRon an instance, for asking the physical devices whether they can present. Zero stands for no surface: the devices are not asked then. A failure is the failure of the creation of the device.