Skip to content

Commit

Permalink
use require_downlevel_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Dec 20, 2022
1 parent e2a1edf commit e902508
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions wgpu-core/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2739,13 +2739,8 @@ impl<A: HalApi> Device<A> {
return Err(pipeline::CreateRenderPipelineError::DepthStencilState(e));
}

if ds.bias.clamp != 0.0
&& !self
.shared
.downlevel_flags
.contains(wgt::DownlevelFlags::DEPTH_BIAS_CLAMP)
{
return Err(MissingDownlevelFlags(wgt::DownlevelFlags::DEPTH_BIAS_CLAMP).into());
if ds.bias.clamp != 0.0 {
self.require_downlevel_flags(wgt::DownlevelFlags::DEPTH_BIAS_CLAMP)?;
}
}

Expand Down

0 comments on commit e902508

Please sign in to comment.