compute-toys / wgpu-compute-toy

Cross-platform compute shader engine
https://compute.toys
MIT License
119 stars 16 forks source link

FR: add timestamp queries #22

Open munrocket opened 6 months ago

munrocket commented 6 months ago

The reason why it's not working because we need after .request_adapter() check existed features and request device with them.

const QUERY_FEATURES: wgpu::Features = {
    wgpu::Features::TIMESTAMP_QUERY
        .union(wgpu::Features::TIMESTAMP_QUERY_INSIDE_PASSES)
        .union(wgpu::Features::PIPELINE_STATISTICS_QUERY)
};

Also exists wgpu-profiler crate. Right now wgpu::Features::empty().