Skip to main content

VulkanBindlessHeap

Struct VulkanBindlessHeap 

Source
pub struct VulkanBindlessHeap {
    pub descriptor_set_layout: DescriptorSetLayout,
    pub descriptor_pool: DescriptorPool,
    pub descriptor_set: DescriptorSet,
    pub pipeline_layout: PipelineLayout,
    pub max_buffers: u32,
    pub max_textures: u32,
    pub max_samplers: u32,
    pub max_storage_images: u32,
    /* private fields */
}

Fields§

§descriptor_set_layout: DescriptorSetLayout§descriptor_pool: DescriptorPool§descriptor_set: DescriptorSet§pipeline_layout: PipelineLayout§max_buffers: u32§max_textures: u32§max_samplers: u32§max_storage_images: u32

Implementations§

Source§

impl VulkanBindlessHeap

Source

pub fn new( device: &Device, max_buffers: u32, max_textures: u32, max_samplers: u32, max_storage_images: u32, ) -> Result<Self, HalError>

Source

pub fn allocate_buffer_slot(&self) -> Result<u32, HalError>

Source

pub fn free_buffer_slot(&self, slot: u32)

Source

pub fn write_buffer_descriptor( &self, device: &Device, slot: u32, buffer: Buffer, size: u64, )

Source

pub fn allocate_texture_slot(&self) -> Result<u32, HalError>

Source

pub fn free_texture_slot(&self, slot: u32)

Source

pub fn write_texture_descriptor( &self, device: &Device, slot: u32, image_view: ImageView, image_layout: ImageLayout, )

Source

pub fn allocate_sampler_slot(&self) -> Result<u32, HalError>

Source

pub fn free_sampler_slot(&self, slot: u32)

Source

pub fn write_sampler_descriptor( &self, device: &Device, slot: u32, sampler: Sampler, )

Source

pub fn allocate_storage_image_slot(&self) -> Result<u32, HalError>

Source

pub fn free_storage_image_slot(&self, slot: u32)

Source

pub fn write_storage_image_descriptor( &self, device: &Device, slot: u32, image_view: ImageView, image_layout: ImageLayout, )

Source

pub fn write_buffer_descriptors_batch( &self, device: &Device, writes: &[(u32, Buffer, u64)], )

Source

pub fn write_texture_descriptors_batch( &self, device: &Device, writes: &[(u32, ImageView, ImageLayout)], )

Source

pub fn write_storage_image_descriptors_batch( &self, device: &Device, writes: &[(u32, ImageView, ImageLayout)], )

Source

pub fn destroy(&self, device: &Device)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.