Skip to content

Commit

Permalink
fixup! [WebGPU] validate polygon mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Oct 2, 2023
1 parent 48f701b commit 16ff4df
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions wgpu/src/backend/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,9 @@ fn map_primitive_state(primitive: &wgt::PrimitiveState) -> web_sys::GpuPrimitive

match primitive.polygon_mode {
wgt::PolygonMode::Fill => (),
wgt::PolygonMode::Line => panic!(
"{:?} is not enabled for this backend",
wgt::Features::POLYGON_MODE_LINE
),
wgt::PolygonMode::Point => panic!(
"{:?} is not enabled for this backend",
wgt::Features::POLYGON_MODE_POINT
),
mode @ (wgt::PolygonMode::Line | wgt::PolygonMode::Point) => {
panic!("{mode:?} is not enabled for this backend",)
}
}

mapped
Expand Down

0 comments on commit 16ff4df

Please sign in to comment.