fn new_impl(
        device: &wgpu::Device,
        ty: wgpu::QueryType,
        label: Option<&str>,
        count: u32,
    ) -> Self {
        // Size of a single query result in u64s.
        let query_size = query_ty_size(ty);
        let buffer_size = query_size * count * size_of::<u64>() as u32;

        // Create the query set
        let inner = device.create_query_set(&wgpu::QuerySetDescriptor { label, ty, count });

        let buffer = device.create_buffer(&wgpu::BufferDescriptor {
            label,
            size: buffer_size as u64,
            usage: QUERYSET_BUFFER_USAGE,
            mapped_at_creation: false,
        });
        QuerySet { inner, buffer, ty }
    }
/// Makes the wgpu calls to create the query set.
Makes the wgpu calls to create the query set.
Makes the wgpu calls to create the query set .
fn new_impl(
        device: &wgpu::Device,
        ty: wgpu::QueryType,
        label: Option<&str>,
        count: u32,
    ) -> Self {
        // Size of a single query result in u64s.
        let query_size = query_ty_size(ty);
        let buffer_size = query_size * count * size_of::<u64>() as u32;
        // Create the query set
        let inner = device.create_query_set(&wgpu::QuerySetDescriptor { label, ty, count });
        let buffer = device.create_buffer(&wgpu::BufferDescriptor {
            label,
            size: buffer_size as u64,
            usage: QUERYSET_BUFFER_USAGE,
            mapped_at_creation: false,
        });
        QuerySet { inner, buffer, ty }
    }
fn new_impl ( device : & wgpu :: Device , ty : wgpu :: QueryType , label : Option < & str > , count : u32 , ) -> Self { // Size of a single query result in u64s. let query_size = query_ty_size ( ty ) ; let buffer_size = query_size * count * size_of :: < u64 > ( ) as u32 ; // Create the query set let inner = device . create_query_set ( & wgpu :: QuerySetDescriptor { label , ty , count } ) ; let buffer = device . create_buffer ( & wgpu :: BufferDescriptor { label , size : buffer_size as u64 , usage : QUERYSET_BUFFER_USAGE , mapped_at_creation : false , } ) ; QuerySet { inner , buffer , ty } }
Makes the wgpu calls to create the query set.
Makes the wgpu calls to create the query set .
device
&wgpu::Device
ty
wgpu::QueryType
label
Option<&str>
count
u32
device
&wgpu::Device
ty
wgpu::QueryType
label
Option<&str>
count
u32