Skip to content

Commit

Permalink
Use shadowing for maybe_features override
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Nov 27, 2024
1 parent 1ff851b commit 63c1f35
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions vello/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,10 @@ impl RenderContext {
.await?;
let features = adapter.features();
let limits = Limits::default();
#[cfg_attr(
not(feature = "wgpu-profiler"),
expect(
unused_mut,
reason = "Mutation is only expected with the wgpu-profiler feature"
)
)]
let mut maybe_features = wgpu::Features::CLEAR_TEXTURE;
let maybe_features = wgpu::Features::CLEAR_TEXTURE;
#[cfg(feature = "wgpu-profiler")]
{
maybe_features |= wgpu_profiler::GpuProfiler::ALL_WGPU_TIMER_FEATURES;
};
let maybe_features = maybe_features | wgpu_profiler::GpuProfiler::ALL_WGPU_TIMER_FEATURES;

let (device, queue) = adapter
.request_device(
&wgpu::DeviceDescriptor {
Expand Down

0 comments on commit 63c1f35

Please sign in to comment.