/// Calls `vkCmdPushDescriptorSetKHR` on the builder.
Calls `vkCmdPushDescriptorSetKHR` on the builder.
Calls ` vkCmdPushDescriptorSetKHR ` on the builder .
pub unsafe fn push_descriptor_set(
        &mut self,
        pipeline_bind_point: PipelineBindPoint,
        pipeline_layout: Arc<PipelineLayout>,
        set_num: u32,
        descriptor_writes: impl IntoIterator<Item = WriteDescriptorSet>,
    ) {
        struct Cmd {
            pipeline_bind_point: PipelineBindPoint,
            pipeline_layout: Arc<PipelineLayout>,
            set_num: u32,
            descriptor_writes: SmallVec<[WriteDescriptorSet; 8]>,
        }
        impl Command for Cmd {
            fn name(&self) -> &'static str {
                "vkCmdPushDescriptorSetKHR"
            }
            unsafe fn send(&self, out: &mut UnsafeCommandBufferBuilder) {
                out.push_descriptor_set(
                    self.pipeline_bind_point,
                    &self.pipeline_layout,
                    self.set_num,
                    &self.descriptor_writes,
                );
            }
        }
        let descriptor_writes: SmallVec<[WriteDescriptorSet; 8]> =
            descriptor_writes.into_iter().collect();
        let state = self.current_state.invalidate_descriptor_sets(
            pipeline_bind_point,
            pipeline_layout.clone(),
            set_num,
            1,
        );
        let layout = state.pipeline_layout.descriptor_set_layouts()[set_num as usize].as_ref();
        debug_assert!(layout.desc().is_push_descriptor());
        let set_resources = match state
            .descriptor_sets
            .entry(set_num)
            .or_insert(SetOrPush::Push(DescriptorSetResources::new(layout, 0)))
        {
            SetOrPush::Push(set_resources) => set_resources,
            _ => unreachable!(),
        };
        for write in &descriptor_writes {
            set_resources.update(write);
        }
        self.append_command(
            Cmd {
                pipeline_bind_point,
                pipeline_layout,
                set_num,
                descriptor_writes,
            },
            [],
        )
        .unwrap();
    }
pub unsafe fn push_descriptor_set ( & mut self , pipeline_bind_point : PipelineBindPoint , pipeline_layout : Arc < PipelineLayout > , set_num : u32 , descriptor_writes : impl IntoIterator < Item = WriteDescriptorSet > , ) { struct Cmd { pipeline_bind_point : PipelineBindPoint , pipeline_layout : Arc < PipelineLayout > , set_num : u32 , descriptor_writes : SmallVec < [ WriteDescriptorSet ; 8 ] > , } impl Command for Cmd { fn name ( & self ) -> & ' static str { " " } unsafe fn send ( & self , out : & mut UnsafeCommandBufferBuilder ) { out . push_descriptor_set ( self . pipeline_bind_point , & self . pipeline_layout , self . set_num , & self . descriptor_writes , ) ; } } let descriptor_writes : SmallVec < [ WriteDescriptorSet ; 8 ] > = descriptor_writes . into_iter ( ) . collect ( ) ; let state = self . current_state . invalidate_descriptor_sets ( pipeline_bind_point , pipeline_layout . clone ( ) , set_num , 1 , ) ; let layout = state . pipeline_layout . descriptor_set_layouts ( ) [ set_num as usize ] . as_ref ( ) ; debug_assert ! ( layout desc ( ) is_push_descriptor ( ) ) ; let set_resources = match state . descriptor_sets . entry ( set_num ) . or_insert ( SetOrPush :: Push ( DescriptorSetResources :: new ( layout , 0 ) ) ) { SetOrPush :: Push ( set_resources ) => set_resources , _ => unreachable ! ( ) , } ; for write in & descriptor_writes { set_resources . update ( write ) ; } self . append_command ( Cmd { pipeline_bind_point , pipeline_layout , set_num , descriptor_writes , } , [ ] , ) . unwrap ( ) ; }
Calls `vkCmdPushDescriptorSetKHR` on the builder.
Calls ` vkCmdPushDescriptorSetKHR ` on the builder .
&mut self
pipeline_bind_point
PipelineBindPoint
pipeline_layout
Arc<PipelineLayout>
set_num
u32
descriptor_writes
impl IntoIterator<Item = WriteDescriptorSet>