pub struct VulkanContext {Show 13 fields
_entry: Entry,
instance: Instance,
physical_device: PhysicalDevice,
device: Device,
queue: Queue,
queue_family_index: u32,
command_pool: CommandPool,
external_memory_fd: Device,
persistent_buffer: Buffer,
persistent_buffer_memory: DeviceMemory,
persistent_buffer_size: u64,
width: u32,
height: u32,
}Fields§
§_entry: Entry§instance: Instance§physical_device: PhysicalDevice§device: Device§queue: Queue§queue_family_index: u32§command_pool: CommandPool§external_memory_fd: Device§persistent_buffer: Buffer§persistent_buffer_memory: DeviceMemory§persistent_buffer_size: u64§width: u32§height: u32Implementations§
Source§impl VulkanContext
impl VulkanContext
pub fn new(width: u32, height: u32) -> Result<Self>
fn create_persistent_buffer( device: &Device, mem_props: &PhysicalDeviceMemoryProperties, size: u64, ) -> Result<(Buffer, DeviceMemory)>
pub fn export_persistent_memory_fd(&self) -> Result<RawFd>
pub fn get_persistent_buffer_size(&self) -> u64
pub fn copy_dmabuf_to_persistent_buffer( &self, planes: &[DmaBufPlane], modifier: u64, width: u32, height: u32, ) -> Result<()>
fn import_dmabuf_as_image( &self, fd: RawFd, plane: &DmaBufPlane, modifier: u64, width: u32, height: u32, ) -> Result<(Image, DeviceMemory)>
fn record_and_submit_copy( &self, src_image: Image, width: u32, height: u32, ) -> Result<()>
Trait Implementations§
Source§impl Drop for VulkanContext
impl Drop for VulkanContext
impl Send for VulkanContext
impl Sync for VulkanContext
Auto Trait Implementations§
impl Freeze for VulkanContext
impl RefUnwindSafe for VulkanContext
impl Unpin for VulkanContext
impl UnsafeUnpin for VulkanContext
impl UnwindSafe for VulkanContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more