mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fixed missing device feature in mipmap example (#3081)
This commit is contained in:
@@ -56,6 +56,7 @@ Add the `"wgsl"` feature, to enable WGSL shaders in `wgpu-core` and `wgpu`. Enab
|
||||
#### 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).
|
||||
|
||||
### Testing/Internal
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user