learn-wgpu icon indicating copy to clipboard operation
learn-wgpu copied to clipboard

why is display of the surface so slow?

Open LollipopFt opened this issue 2 years ago • 3 comments

i am currently on the 2nd tutorial where i make the surface. I realised that the time between the white window appearing and the blue surface being applied is about 1 second even on --release. is this intended?

LollipopFt avatar Jul 04 '22 11:07 LollipopFt

Looks like it's general behaviour caused by Winit/WGPU because even bevy or any other library seems to have even longer loading time... there is tiny hack where you set window visibility to false ny default and then make it visible on MainEventsCleared (or similiar) event from winit. You can now see window with blue surface by default.

heavyrain266 avatar Jul 04 '22 12:07 heavyrain266

however, running the vulkano-rs triangle example shows that it runs much faster - it's about 5x as fast.

LollipopFt avatar Jul 04 '22 15:07 LollipopFt

however, running the vulkano-rs triangle example shows that it runs much faster - it's about 5x as fast.

Vulkano is safe vulkan abstraction while wgpu implements still evolving and incomplete graphics API on top of vulkan, directx, metal, gles and webgl, there always will be worse performance than pure bindings to given API, I expect that ash is even faster because it doesn't contains layers of safe abstractions like both wgpu and vulkano.

heavyrain266 avatar Jul 04 '22 15:07 heavyrain266

Seems like discussion has stopped here, so I'm going to close this for now.

sotrh avatar Mar 25 '23 23:03 sotrh