egui/crates/egui-wgpu/src
Andreas Reich b1f837ca2f
[egui-wgpu] Do vertex & index buffer in a single copy each (#2820)
* [egui-wgpu] Do vertex & index buffer in a single copy each
Also, copy uniform buffer only if necessary.
Previously, we did hundreds of small copies via queue.write_buffer which would create a new buffer for each of these copies. Now, there are only two gpu sided copy operations and the memory goes directly to the staging buffer.
In a quick debug test on Rerun this decreased time for the `update_buffer` method from about 0.87ms to 0.37ms!

* fix comparing padding on UniformBuffer in wgpu renderer

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-03-29 19:30:18 +02:00
..
egui.wgsl Improve text redering and do all color operation in gamma space (#2071) 2022-09-24 17:53:11 +02:00
lib.rs format: add some blank lines where it was needed 2023-02-10 18:03:46 +01:00
renderer.rs [egui-wgpu] Do vertex & index buffer in a single copy each (#2820) 2023-03-29 19:30:18 +02:00
winit.rs eframe: capture a screenshot using `Frame::request_screenshot` 2023-03-29 16:34:22 +02:00