diff --git a/CHANGELOG.md b/CHANGELOG.md index 7749e5222d..b778fbb627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Bottom level categories: #### General - Bother to free the `hal::Api::CommandBuffer` when a `wgpu_core::command::CommandEncoder` is dropped. By @jimblandy in [#3069](https://github.com/gfx-rs/wgpu/pull/3069). +- Fixed the mipmap example by adding the missing WRITE_TIMESTAMP_INSIDE_PASSES feature. By @Olaroll in [#3081](https://github.com/gfx-rs/wgpu/pull/3081). ## wgpu-0.14.0 (2022-10-05) diff --git a/wgpu/examples/mipmap/main.rs b/wgpu/examples/mipmap/main.rs index 7e5e1a574c..70ecbd91a0 100644 --- a/wgpu/examples/mipmap/main.rs +++ b/wgpu/examples/mipmap/main.rs @@ -200,7 +200,9 @@ impl Example { impl framework::Example for Example { fn optional_features() -> wgpu::Features { - wgpu::Features::TIMESTAMP_QUERY | wgpu::Features::PIPELINE_STATISTICS_QUERY + wgpu::Features::TIMESTAMP_QUERY + | wgpu::Features::PIPELINE_STATISTICS_QUERY + | wgpu::Features::WRITE_TIMESTAMP_INSIDE_PASSES } fn init( @@ -323,10 +325,11 @@ impl framework::Example for Example { }); // If both kinds of query are supported, use queries - let query_sets = if device - .features() - .contains(wgpu::Features::TIMESTAMP_QUERY | wgpu::Features::PIPELINE_STATISTICS_QUERY) - { + let query_sets = if device.features().contains( + wgpu::Features::TIMESTAMP_QUERY + | wgpu::Features::PIPELINE_STATISTICS_QUERY + | wgpu::Features::WRITE_TIMESTAMP_INSIDE_PASSES, + ) { // For N total mips, it takes N - 1 passes to generate them, and we're measuring those. let mip_passes = MIP_LEVEL_COUNT - 1;