thuban_gpu 0.4.2

Thin portable compute-shader layer over wgpu for Thuban
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thuban_error::Result;

use crate::DeviceRef;

pub struct TimestampSet {
    pub(crate) query_set: wgpu::QuerySet,
}

impl TimestampSet {
    pub(crate) fn create(device: &DeviceRef, capacity: u32) -> Result<Self> {
        let query_set = device.device.create_query_set(&wgpu::QuerySetDescriptor {
            label: None,
            ty: wgpu::QueryType::Timestamp,
            count: capacity,
        });
        Ok(Self { query_set })
    }
}