Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hal/gles: fix index buffer state not being reset in reset_state #2391

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix index buffer state not being reset in reset_state
rparrett committed Jan 13, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
commit 94e4e411dbf33f8cbd2cde639d10d44106ece178
5 changes: 4 additions & 1 deletion wgpu-hal/src/gles/queue.rs
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ impl super::Queue {
}
}

unsafe fn reset_state(&self, gl: &glow::Context) {
unsafe fn reset_state(&mut self, gl: &glow::Context) {
gl.use_program(None);
gl.bind_framebuffer(glow::FRAMEBUFFER, None);
gl.disable(glow::DEPTH_TEST);
@@ -71,6 +71,9 @@ impl super::Queue {
if self.features.contains(wgt::Features::DEPTH_CLIP_CONTROL) {
gl.disable(glow::DEPTH_CLAMP);
}

gl.bind_buffer(glow::ELEMENT_ARRAY_BUFFER, None);
self.current_index_buffer = None;
}

unsafe fn set_attachment(