mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[WebGPU] validate polygon mode (#4196)
This commit is contained in:
@@ -161,6 +161,7 @@ By @teoxoy in [#4185](https://github.com/gfx-rs/wgpu/pull/4185)
|
||||
#### WebGPU
|
||||
|
||||
- Ensure that limit requests and reporting is done correctly. By @OptimisticPeach in [#4107](https://github.com/gfx-rs/wgpu/pull/4107)
|
||||
- Validate usage of polygon mode. By @teoxoy in [#4196](https://github.com/gfx-rs/wgpu/pull/4196)
|
||||
|
||||
#### Testing
|
||||
|
||||
|
||||
@@ -343,6 +343,18 @@ fn map_primitive_state(primitive: &wgt::PrimitiveState) -> web_sys::GpuPrimitive
|
||||
//TODO:
|
||||
//mapped.unclipped_depth(primitive.unclipped_depth);
|
||||
|
||||
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
|
||||
),
|
||||
}
|
||||
|
||||
mapped
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user