Skip to content

Commit

Permalink
fix issues in webgpu feature mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Feb 14, 2025
1 parent 7b598d2 commit 6fff77d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions wgpu/src/backend/webgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,15 +490,10 @@ fn map_blend_factor(factor: wgt::BlendFactor) -> webgpu_sys::GpuBlendFactor {
BlendFactor::SrcAlphaSaturated => bf::SrcAlphaSaturated,
BlendFactor::Constant => bf::Constant,
BlendFactor::OneMinusConstant => bf::OneMinusConstant,
BlendFactor::Src1
| BlendFactor::OneMinusSrc1
| BlendFactor::Src1Alpha
| BlendFactor::OneMinusSrc1Alpha => {
panic!(
"{:?} is not enabled for this backend",
wgt::Features::DUAL_SOURCE_BLENDING
)
}
BlendFactor::Src1 => bf::Src1,
BlendFactor::OneMinusSrc1 => bf::OneMinusSrc1,
BlendFactor::Src1Alpha => bf::Src1Alpha,
BlendFactor::OneMinusSrc1Alpha => bf::OneMinusSrc1Alpha,
}
}

Expand Down Expand Up @@ -782,7 +777,7 @@ const FEATURES_MAPPING: [(wgt::Features, webgpu_sys::GpuFeatureName); 13] = [
),
(
wgt::Features::DUAL_SOURCE_BLENDING,
webgpu_sys::GpuFeatureName::Float32Filterable,
webgpu_sys::GpuFeatureName::DualSourceBlending,
),
];

Expand Down

0 comments on commit 6fff77d

Please sign in to comment.