ursus_core/vulkan/core/context.rs
1use ash::vk;
2
3/// A set of handles required for any one-shot GPU operation
4/// (memory allocation, one-shot commands). Groups the handles that are typically
5/// passed around together throughout the `vulkan/` module.
6#[derive(Clone, Copy)]
7pub struct DeviceContext<'a> {
8 pub device: &'a ash::Device,
9 pub physical_device: vk::PhysicalDevice,
10 pub instance: &'a ash::Instance,
11}
12
13/// Command pool + queue for submitting one-shot commands (staging uploads,
14/// mipmap generation, etc.).
15#[derive(Clone, Copy)]
16pub struct SubmitContext {
17 pub command_pool: vk::CommandPool,
18 pub queue: vk::Queue,
19}