Update to softbuffer 0.3, tracking up to age sets of primitives#2190
Update to softbuffer 0.3, tracking up to age sets of primitives#2190ids1024 wants to merge 1 commit intoiced-rs:masterfrom
softbuffer 0.3, tracking up to age sets of primitives#2190Conversation
|
Well, it crashes when I try to run on macOS, but I guess #2113 is the issue there. |
|
MacOS can be tested with softbuffer 0.4 in #2191, since winit 0.29 fixes that issue.
It seems I was misremembering. It's a bit awkward to implement buffer swapping with how the macOS backend works, so Softbuffer could internally copy from a buffer, but I guess that would add unnecessary overhead for applications not using incremental rendering. That may be fine for now though. In previous discussion it was noted that Metal and thus wgpu should be pretty widely supported on macOS, so the software rendering fallback isn't as important there. It it also still performs pretty well, on an M1 Mac at least. |
cacdcec to
ecd3717
Compare
|
I've released softbuffer 0.4.1 and 0.3.4 with that fix. This seems to work correctly across platforms. Other than that limitation on macOS, I think this is an overall improvement. Having Iced updated here should also be handy for testing relevant improvements in softbuffer. |
ecd3717 to
ff268c8
Compare
This should perform better on Windows, Wayland, and X11, and the same of macOS. (rust-windowing/softbuffer#95 would allow macOS to also perform better here.)
I've done basic testing on Wayland and Windows. I haven't tested X11 or macOS yet. I'm not sure how best to check the profile the performance impact.
The latest version of softbuffer is 0.4, which uses raw-window-handle 0.6. That probably will need #2169, and maybe an update to wgpu (which has updated to raw-window-handle 0.6, but hasn't released a change with that yet).
It should also be possible to make use of Softbuffer's
present_with_damage, if we can get damage regions relative to the last present (not necessarily the same buffer). Some backends can benefit from that.I did run into an issue with buffer age in softbuffer, which I seem to have made a small mistake in the Wayland implementation of (rust-windowing/softbuffer#191). If everything else is fine, I can probably do a patch release with that for both Softbuffer 0.3 and 0.4. But currently this uses a git dependency with that patch.