diff --git a/CHANGELOG.md b/CHANGELOG.md index a275dbaf0e3..fd2a01b79cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,13 @@ Bottom level categories: ## Unreleased +### Bug Fixes + +#### GLES +- Reset all queue state between command buffers in a submit. By @jleibs [#3589](https://github.com/gfx-rs/wgpu/pull/3589) +- Reset the state of `SAMPLE_ALPHA_TO_COVERAGE` on queue reset. By @jleibs [#3589](https://github.com/gfx-rs/wgpu/pull/3589) + + ## wgpu-0.15.2 (2023-03-08) ### Bug Fixes diff --git a/wgpu-hal/src/gles/queue.rs b/wgpu-hal/src/gles/queue.rs index add1daeb749..12f975c600c 100644 --- a/wgpu-hal/src/gles/queue.rs +++ b/wgpu-hal/src/gles/queue.rs @@ -70,6 +70,7 @@ impl super::Queue { unsafe { gl.disable(glow::BLEND) }; unsafe { gl.disable(glow::CULL_FACE) }; unsafe { gl.disable(glow::POLYGON_OFFSET_FILL) }; + unsafe { gl.disable(glow::SAMPLE_ALPHA_TO_COVERAGE) }; if self.features.contains(wgt::Features::DEPTH_CLIP_CONTROL) { unsafe { gl.disable(glow::DEPTH_CLAMP) }; } @@ -1477,8 +1478,12 @@ impl crate::Queue for super::Queue { ) -> Result<(), crate::DeviceError> { let shared = Arc::clone(&self.shared); let gl = &shared.context.lock(); - unsafe { self.reset_state(gl) }; for cmd_buf in command_buffers.iter() { + // The command encoder assumes a default state when encoding the command buffer. + // Always reset the state between command_buffers to reflect this assumption. Do + // this at the beginning of the loop in case something outside of wgpu modified + // this state prior to commit. + unsafe { self.reset_state(gl) }; #[cfg(not(target_arch = "wasm32"))] if let Some(ref label) = cmd_buf.label { unsafe { gl.push_debug_group(glow::DEBUG_SOURCE_APPLICATION, DEBUG_ID, label) };