Skip to content

Commit

Permalink
Create gles buffers with DYNAMIC_DRAW instead of STATIC_DRAW
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jan 17, 2023
1 parent 48fbb92 commit 676db0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wgpu-hal/src/gles/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,10 @@ impl crate::Device<super::Api> for super::Device {
glow::DYNAMIC_DRAW
}
} else {
glow::STATIC_DRAW
// Even if the usage doesn't contain SRC_READ, we update it internally at least once
// Some vendors take usage very literally and STATIC_DRAW will freeze us with an empty buffer
// https://github.com/gfx-rs/wgpu/issues/3371
glow::DYNAMIC_DRAW
};
unsafe { gl.buffer_data_size(target, raw_size, usage) };
}
Expand Down

0 comments on commit 676db0a

Please sign in to comment.