Top
Best
New

Posted by jpeeler 10 hours ago

Zed editor switching graphics lib from blade to wgpu(github.com)
272 points | 245 commentspage 2
createaccount99 6 hours ago|
Clean change, all things considered. But, like, what? What's to say you won't run into a billion problems here, too?
g947o 9 hours ago||
Will this help running Zed in environments with no GPU/old GPUs? There have been some complaints about not being able to run Zed on Ivy Bridge or in VMs, even though browsers and other applications work perfectly fine
andsoitis 10 hours ago||
(for the linux renderer only)
athrowaway3z 9 hours ago||
A bit of a tangent, but I wish the makepad project would get more traction in rust. Their cross-platform approach is extremely ambitious.
throwup238 10 hours ago||
Oh sweet! I threw out GPUI completely from one of my projects because of Blade. I needed headless with rendering to image for e2e testing and gave up on GPUI after trying to mess with Blade. It’s definitely a mess and moving to egui has only shuffled the deck chairs around.
amelius 9 hours ago||
Will this make Zed slower, since Wgpu is just a compatibility layer, adding more code?
tracker1 6 hours ago|
Depends on all implementation, environment and hardware details.
Muromec 9 hours ago||
Oh, this is nice. Latest builds stopped working on panfrost because it does not announce the sufrace capabilities or something like that. Maybe I can have it back to working on the orange pi
skerit 10 hours ago||
Why was Blade ever decided upon? Is it older than wgpu?
suby 9 hours ago|
I don't know why Blade was decided on, but it was started by Kvark who worked on WGPU for Mozilla for some time. I assumed it would be a good library on that basis.
gpm 7 hours ago||
kvark was also involved in the initial implementation of zed's blade backend... which probably contributed.
conorbergin 10 hours ago||
Is webgpu a good standard at this point? I am learning vulkan atm and 1.3 is significantly different to the previous APIs, and apparently webgpu is closer in behavior to 1.0. I am by no means an authority on the topic, I just see a lack of interest in targeting webgpu from people in game engines and scientific computing.
flohofwoe 9 hours ago||
For a text editor it's definitely good enough if not extreme overkill.

Other then that the one big downside of WebGPU is the rigid binding model via baked BindGroup objects. This is both inflexible and slow when any sort of 'dynamism' is needed because you end up creating and destroying BindGroup objects in the hot path.

Vulkan's binding model will really only be fixed properly with the very new VK_EXT_descriptor_heap extension (https://docs.vulkan.org/features/latest/features/proposals/V...).

conorbergin 4 hours ago|||
Do you think Vulkan will become "nice" to use, could it ever be as ergonomic as Metal is supposed to be?
xyzsparetimexyz 5 hours ago|||
The modern Vulkan binding model is relatively fine. Your entire program has a single descriptor set containing an array of images that you reference by index. Buffers are never bound and instead referenced by device address.
pornel 9 hours ago|||
Bevy engine uses wgpu and supports both native and WebGPU browser targets through it.

The WebGPU API gets you to rendering your first triangle quicker and without thinking about vendor-specific APIs and histories of their extensions. It's designed to be fully checkable in browsers, so if you mess up you generally get errors caught before they crash your GPU drivers :)

The downside is that it's the lowest common denominator, so it always lags behind what you can do directly in DX or VK. It was late to get subgroups, and now it's late to get bindless resources. When you target desktops, wgpu can cheat and expose more features that haven't landed in browsers yet, but of course that takes you back to the vendor API fragmentation.

swiftcoder 9 hours ago||
It's a good standard if you want a sort of lowest-common-denominator that is still about a decade newer than GLES 3 / WebGL 2.

The scientific folks don't have all that much reason to upgrade from OpenGL (it still works, after all), and the games folks are often targeting even newer DX/Vulkan/Metal features that aren't supported by WebGPU yet (for example, hardware-accelerated raytracing)

pjmlp 8 hours ago||
Khronos is trying to entice scientific folks with ANARI, because there was zero interest to move from OpenGL as you mention.

https://www.khronos.org/anari/

flohofwoe 9 hours ago|
Seeing that the author of Blade (kvark) isn't exactly a 3D API newbie and also worked on WebGPU I really wonder if a switch to wgpu will actually have the desired long term effect. A WebGPU implementation isn't exactly slim either, especially when all is needed is just a very small 3D API wrapper specialized for text rendering.
xyzsparetimexyz 5 hours ago||
Cross API graphics abstractions are almost always a bad idea even if its just wrapping modern DX12 and Vulkan, and always always are when Metal comes into the mix.
littlestymaar 7 hours ago||
Kvark was leading the engineering effort for wgpu while he was at Mozilla.

But he was doing that on his work time and did so collaborating with other Mozilla engineers, whereas AFAIK blade has been more of a personal side project.

More comments...