diff --git a/Cargo.toml b/Cargo.toml index a281ddae1..5bed8a9fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,20 +28,20 @@ cross = ["wgc/cross"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "c0478c707d35c6b459a7f0cb42ab75d768677e1b" +rev = "6a6a9a4aedbbf7c8cc6b11a4b0c42341ac50a798" features = ["raw-window-handle"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "c0478c707d35c6b459a7f0cb42ab75d768677e1b" +rev = "6a6a9a4aedbbf7c8cc6b11a4b0c42341ac50a798" features = ["raw-window-handle"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "c0478c707d35c6b459a7f0cb42ab75d768677e1b" +rev = "6a6a9a4aedbbf7c8cc6b11a4b0c42341ac50a798" [dependencies] arrayvec = "0.5" diff --git a/src/backend/direct.rs b/src/backend/direct.rs index 068a9e993..52f673b77 100644 --- a/src/backend/direct.rs +++ b/src/backend/direct.rs @@ -336,8 +336,8 @@ mod pass_impl { } impl crate::RenderPassInner for wgc::command::RenderPass { - fn set_blend_color(&mut self, color: wgt::Color) { - wgpu_render_pass_set_blend_color(self, &color) + fn set_blend_constant(&mut self, color: wgt::Color) { + wgpu_render_pass_set_blend_constant(self, &color) } fn set_scissor_rect(&mut self, x: u32, y: u32, width: u32, height: u32) { wgpu_render_pass_set_scissor_rect(self, x, y, width, height) diff --git a/src/backend/error.rs b/src/backend/error.rs index df4ac0e03..556e42fbf 100644 --- a/src/backend/error.rs +++ b/src/backend/error.rs @@ -179,6 +179,7 @@ impl PrettyError for wgc::command::ExecutionError { let name = wgc::gfx_select!(id => global.buffer_label(id)); ret.push_str(&format_label_line("buffer", &name)); } + Self::Unimplemented(_reason) => {} }; ret } diff --git a/src/backend/web.rs b/src/backend/web.rs index e2d696feb..7855a4505 100644 --- a/src/backend/web.rs +++ b/src/backend/web.rs @@ -395,7 +395,7 @@ impl crate::RenderInner for RenderBundleEncoder { } impl crate::RenderPassInner for RenderPass { - fn set_blend_color(&mut self, color: wgt::Color) { + fn set_blend_constant(&mut self, color: wgt::Color) { self.0 .set_blend_color_with_gpu_color_dict(&map_color(color)); } @@ -675,17 +675,17 @@ fn map_blend_factor(factor: wgt::BlendFactor) -> web_sys::GpuBlendFactor { match factor { BlendFactor::Zero => bf::Zero, BlendFactor::One => bf::One, - BlendFactor::SrcColor => bf::SrcColor, - BlendFactor::OneMinusSrcColor => bf::OneMinusSrcColor, + BlendFactor::Src => bf::SrcColor, + BlendFactor::OneMinusSrc => bf::OneMinusSrcColor, BlendFactor::SrcAlpha => bf::SrcAlpha, BlendFactor::OneMinusSrcAlpha => bf::OneMinusSrcAlpha, - BlendFactor::DstColor => bf::DstColor, - BlendFactor::OneMinusDstColor => bf::OneMinusDstColor, + BlendFactor::Dst => bf::DstColor, + BlendFactor::OneMinusDst => bf::OneMinusDstColor, BlendFactor::DstAlpha => bf::DstAlpha, BlendFactor::OneMinusDstAlpha => bf::OneMinusDstAlpha, BlendFactor::SrcAlphaSaturated => bf::SrcAlphaSaturated, - BlendFactor::BlendColor => bf::BlendColor, - BlendFactor::OneMinusBlendColor => bf::OneMinusBlendColor, + BlendFactor::Constant => bf::BlendColor, + BlendFactor::OneMinusConstant => bf::OneMinusBlendColor, } } diff --git a/src/lib.rs b/src/lib.rs index 075045920..fd88466a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,7 +128,7 @@ trait RenderInner { } trait RenderPassInner: RenderInner { - fn set_blend_color(&mut self, color: Color); + fn set_blend_constant(&mut self, color: Color); fn set_scissor_rect(&mut self, x: u32, y: u32, width: u32, height: u32); fn set_viewport( &mut self, @@ -2183,8 +2183,8 @@ impl<'a> RenderPass<'a> { /// Sets the blend color as used by some of the blending modes. /// /// Subsequent blending tests will test against this value. - pub fn set_blend_color(&mut self, color: Color) { - self.id.set_blend_color(color) + pub fn set_blend_constant(&mut self, color: Color) { + self.id.set_blend_constant(color) } /// Sets the active index buffer.