diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index b26beb9b7..17f558829 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,20 +26,20 @@ webgl = ["wgc"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" +rev = "05a531191d4ce2927f2157e5dd54b7aa5d779406" features = ["raw-window-handle"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" +rev = "05a531191d4ce2927f2157e5dd54b7aa5d779406" features = ["raw-window-handle"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" +rev = "05a531191d4ce2927f2157e5dd54b7aa5d779406" [dependencies] arrayvec = "0.5" diff --git a/wgpu/examples/cube/main.rs b/wgpu/examples/cube/main.rs index e0e42c857..a61d968ca 100644 --- a/wgpu/examples/cube/main.rs +++ b/wgpu/examples/cube/main.rs @@ -292,7 +292,7 @@ impl framework::Example for Example { targets: &[sc_desc.format.into()], }), primitive: wgpu::PrimitiveState { - cull_mode: wgpu::CullMode::Back, + cull_mode: Some(wgpu::Face::Back), ..Default::default() }, depth_stencil: None, @@ -327,7 +327,7 @@ impl framework::Example for Example { }), primitive: wgpu::PrimitiveState { front_face: wgpu::FrontFace::Ccw, - cull_mode: wgpu::CullMode::Back, + cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Line, ..Default::default() }, diff --git a/wgpu/examples/mipmap/main.rs b/wgpu/examples/mipmap/main.rs index 9a81e242d..0071709e5 100644 --- a/wgpu/examples/mipmap/main.rs +++ b/wgpu/examples/mipmap/main.rs @@ -344,7 +344,7 @@ impl framework::Example for Example { primitive: wgpu::PrimitiveState { topology: wgpu::PrimitiveTopology::TriangleStrip, front_face: wgpu::FrontFace::Ccw, - cull_mode: wgpu::CullMode::Back, + cull_mode: Some(wgpu::Face::Back), ..Default::default() }, depth_stencil: None, diff --git a/wgpu/examples/shadow/main.rs b/wgpu/examples/shadow/main.rs index e3d082e16..73d6879ad 100644 --- a/wgpu/examples/shadow/main.rs +++ b/wgpu/examples/shadow/main.rs @@ -485,7 +485,7 @@ impl framework::Example for Example { primitive: wgpu::PrimitiveState { topology: wgpu::PrimitiveTopology::TriangleList, front_face: wgpu::FrontFace::Ccw, - cull_mode: wgpu::CullMode::Back, + cull_mode: Some(wgpu::Face::Back), ..Default::default() }, depth_stencil: Some(wgpu::DepthStencilState { @@ -616,7 +616,7 @@ impl framework::Example for Example { }), primitive: wgpu::PrimitiveState { front_face: wgpu::FrontFace::Ccw, - cull_mode: wgpu::CullMode::Back, + cull_mode: Some(wgpu::Face::Back), ..Default::default() }, depth_stencil: Some(wgpu::DepthStencilState { diff --git a/wgpu/examples/water/main.rs b/wgpu/examples/water/main.rs index 720d04fc2..d50a10c27 100644 --- a/wgpu/examples/water/main.rs +++ b/wgpu/examples/water/main.rs @@ -585,7 +585,7 @@ impl framework::Example for Example { }), primitive: wgpu::PrimitiveState { front_face: wgpu::FrontFace::Ccw, - cull_mode: wgpu::CullMode::Front, + cull_mode: Some(wgpu::Face::Front), ..Default::default() }, depth_stencil: Some(wgpu::DepthStencilState { diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 9c39d1b63..6ee0cdf2a 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -507,13 +507,13 @@ fn map_texture_component_type( } } -fn map_cull_mode(cull_mode: wgt::CullMode) -> web_sys::GpuCullMode { +fn map_cull_mode(cull_mode: Option) -> web_sys::GpuCullMode { use web_sys::GpuCullMode as cm; - use wgt::CullMode; + use wgt::Face; match cull_mode { - CullMode::None => cm::None, - CullMode::Front => cm::Front, - CullMode::Back => cm::Back, + None => cm::None, + Some(Face::Front) => cm::Front, + Some(Face::Back) => cm::Back, } } diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index e078dfd2b..75c68794c 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -27,7 +27,7 @@ use parking_lot::Mutex; pub use wgt::{ AdapterInfo, AddressMode, Backend, BackendBit, BindGroupLayoutEntry, BindingType, BlendFactor, BlendOperation, BlendState, BufferAddress, BufferBindingType, BufferSize, BufferUsage, Color, - ColorTargetState, ColorWrite, CommandBufferDescriptor, CompareFunction, CullMode, + ColorTargetState, ColorWrite, CommandBufferDescriptor, CompareFunction, Face, DepthBiasState, DepthStencilState, DeviceType, DynamicOffset, Extent3d, Features, FilterMode, FrontFace, IndexFormat, InputStepMode, Limits, MultisampleState, Origin3d, PipelineStatisticsTypes, PolygonMode, PowerPreference, PresentMode, PrimitiveState,