/// Calls `vkCmdCopyQueryPoolResults` on the builder.
///
/// # Safety
/// `stride` must be at least the number of bytes that will be written by each query.
Calls `vkCmdCopyQueryPoolResults` on the builder.
Calls ` vkCmdCopyQueryPoolResults ` on the builder .
pub unsafe fn copy_query_pool_results<D, T>(
        &mut self,
        query_pool: Arc<QueryPool>,
        queries: Range<u32>,
        destination: Arc<D>,
        stride: DeviceSize,
        flags: QueryResultFlags,
    ) -> Result<(), SyncCommandBufferBuilderError>
    where
        D: TypedBufferAccess<Content = [T]> + 'static,
        T: QueryResultElement,
    {
        struct Cmd<D> {
            query_pool: Arc<QueryPool>,
            queries: Range<u32>,
            destination: Arc<D>,
            stride: DeviceSize,
            flags: QueryResultFlags,
        }
        impl<D, T> Command for Cmd<D>
        where
            D: TypedBufferAccess<Content = [T]> + 'static,
            T: QueryResultElement,
        {
            fn name(&self) -> &'static str {
                "vkCmdCopyQueryPoolResults"
            }
            unsafe fn send(&self, out: &mut UnsafeCommandBufferBuilder) {
                out.copy_query_pool_results(
                    self.query_pool.queries_range(self.queries.clone()).unwrap(),
                    self.destination.as_ref(),
                    self.stride,
                    self.flags,
                );
            }
        }
        self.append_command(
            Cmd {
                query_pool,
                queries,
                destination: destination.clone(),
                stride,
                flags,
            },
            [(
                KeyTy::Buffer(destination),
                "destination".into(),
                Some((
                    PipelineMemoryAccess {
                        stages: PipelineStages {
                            transfer: true,
                            ..PipelineStages::none()
                        },
                        access: AccessFlags {
                            transfer_write: true,
                            ..AccessFlags::none()
                        },
                        exclusive: true,
                    },
                    ImageLayout::Undefined,
                    ImageLayout::Undefined,
                    ImageUninitializedSafe::Unsafe,
                )),
            )],
        )?;
        Ok(())
    }
pub unsafe fn copy_query_pool_results < D , T > ( & mut self , query_pool : Arc < QueryPool > , queries : Range < u32 > , destination : Arc < D > , stride : DeviceSize , flags : QueryResultFlags , ) -> Result < ( ) , SyncCommandBufferBuilderError > where D : TypedBufferAccess < Content = [ T ] > + ' static , T : QueryResultElement , { struct Cmd < D > { query_pool : Arc < QueryPool > , queries : Range < u32 > , destination : Arc < D > , stride : DeviceSize , flags : QueryResultFlags , } impl < D , T > Command for Cmd < D > where D : TypedBufferAccess < Content = [ T ] > + ' static , T : QueryResultElement , { fn name ( & self ) -> & ' static str { " " } unsafe fn send ( & self , out : & mut UnsafeCommandBufferBuilder ) { out . copy_query_pool_results ( self . query_pool . queries_range ( self . queries . clone ( ) ) . unwrap ( ) , self . destination . as_ref ( ) , self . stride , self . flags , ) ; } } self . append_command ( Cmd { query_pool , queries , destination : destination . clone ( ) , stride , flags , } , [ ( KeyTy :: Buffer ( destination ) , " " . into ( ) , Some ( ( PipelineMemoryAccess { stages : PipelineStages { transfer : true , .. PipelineStages :: none ( ) } , access : AccessFlags { transfer_write : true , .. AccessFlags :: none ( ) } , exclusive : true , } , ImageLayout :: Undefined , ImageLayout :: Undefined , ImageUninitializedSafe :: Unsafe , ) ) , ) ] , ) ? ; Ok ( ( ) ) }
Calls `vkCmdCopyQueryPoolResults` on the builder.
Calls ` vkCmdCopyQueryPoolResults ` on the builder .
&mut self
query_pool
Arc<QueryPool>
queries
Range<u32>
destination
Arc<D>
stride
DeviceSize
flags
QueryResultFlags
safety
`stride` must be at least the number of bytes that will be written by each query.
` stride ` must be at least the number of bytes that will be written by each query .