From c91a660ec5e8ac5b03d506bf706b37f75d2ff53f Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Thu, 18 May 2023 23:40:35 +0100 Subject: [PATCH] Fix order of arguments to glPolygonOffset. (#3783) --- CHANGELOG.md | 2 ++ wgpu-hal/src/gles/queue.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba8660e40..ff157c507e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,8 @@ Bottom level categories: ### Bug Fixes +- Fix order of arguments to glPolygonOffset by @komadori in [#3783](https://github.com/gfx-rs/wgpu/pull/3783). + #### General - Fix crash on dropping `wgpu::CommandBuffer`. By @wumpf in [#3726](https://github.com/gfx-rs/wgpu/pull/3726). diff --git a/wgpu-hal/src/gles/queue.rs b/wgpu-hal/src/gles/queue.rs index 87a82524fc..7e5143501c 100644 --- a/wgpu-hal/src/gles/queue.rs +++ b/wgpu-hal/src/gles/queue.rs @@ -1186,7 +1186,7 @@ impl super::Queue { C::SetDepthBias(bias) => { if bias.is_enabled() { unsafe { gl.enable(glow::POLYGON_OFFSET_FILL) }; - unsafe { gl.polygon_offset(bias.constant as f32, bias.slope_scale) }; + unsafe { gl.polygon_offset(bias.slope_scale, bias.constant as f32) }; } else { unsafe { gl.disable(glow::POLYGON_OFFSET_FILL) }; }