▲ | delta_p_delta_x a day ago | |||||||||||||
As a Windows dev... > but we got reports from users that Zed didn't run on their machines due to the Vulkan dependency This single sentence is abstracting a lot of detail. Vulkan runs on Windows, and quite well. Looking at the bug reports, especially the last one[1]... > Rejected for device extension "VK_KHR_dynamic_rendering" not supported Aha, ambitious devs >:) The dynamic rendering extension is pretty new, released with Vulkan 1.3. I suspect targeting Vulkan 1.1 or 1.2 might've been a little more straightforward than... rewriting everything to target DX11. Large games with custom engines (RDR2, Doom, Doom Eternal) were shipped before this was main-lined into Vulkan. But thinking about it a little more, I suspect switching out the back-end to a dynamic rendering-esque one (which is why D3D11 rather than D3D12) was easier than reverting their Rust code to pre-dynamic rendering Vulkan CPU calls; the Rust code changes are comparatively light and the biggest change is the shader. That being said, it's a bit annoying to manually write render-passes and subpasses, but it's not the worst thing, and more importantly extremely high performance is less critical here, as Zed is rendering text, not shading billions of triangles. The singular shader is also not necessarily the most complex[2]; a lot of it is window-clipping which Windows does for free. > we had two implementations of our GPU shaders: one MSL implementation for macOS, and one WGSL implementation for Vulkan. To use DirectX 11, we had to create a third implementation in HLSL. I wonder why HLSL wasn't adopted from the outset, given roughly 99.999% of shaders—which are mostly shipped with video games, which mostly target Windows—are written in HLSL, and then use dxc to target SPIR-V? HLSL is widely considered the best-specified, most feature-complete, and most documented shader language. I'm writing a Vulkan engine on Windows and Linux, and I only use HLSL. Additionally Vulkan runs on macOS with MoltenVK (and now 'KosmicKrisp'), but I suppose the Zed spirit is 'platform-native and nothing else'. > symbolicating stack traces requires a .pdb file that is too large to ship to users as part of the installer. Perhaps publishing a symbol server[3] is a good idea here, rather than users shipping dump files which may contain personally-identifiable information; users can then use WinDbg or Visual Studio to debug the release-mode Zed at their leisure. [1]: https://github.com/zed-industries/zed/issues/35205 [2]: https://github.com/zed-industries/zed/blob/c995dd2016a3d9f8b... [3]: https://randomascii.wordpress.com/2020/03/14/creating-a-publ... | ||||||||||||||
▲ | maxbrunsfeld a day ago | parent | next [-] | |||||||||||||
The Zed spirit is definitely to prefer a platform native solution. You're right that we may be able to get rid of our WGSL implementation, and instead use the HLSL one via SPIR-V. But also, at some point we plan to port Zed to run in a web browser, and will likely build on WebGPU, where WGSL is the native shading language. Honestly, we don't change our graphics primitives that frequently, so the cost of having the three implementations going forward isn't that terrible. We definitely would not use MoltenVK on macOS, vs just using Metal directly. Good point that we should publish a symbol server. | ||||||||||||||
| ||||||||||||||
▲ | mrpippy a day ago | parent | prev | next [-] | |||||||||||||
> Vulkan runs on Windows, and quite well. Not everywhere. See the middle bug report, "Zed does not work in Remote Desktop session on windows" (https://github.com/zed-industries/zed/issues/26692). Most Remote Desktop/Terminal Services environments won't have any Vulkan devices available, unless you ship your own software rendererer (like SwiftShader). Also, NVIDIA only supports Vulkan on Kepler (GTX 600 series), AMD on GCN 1.0 (Radeon HD 7000 series), and most importantly, Intel on Skylake (6000 series). Especially on the Intel side, there are plenty of old but still-supported Windows 10 machines that lack Vulkan support. For many applications that's ok, but IMO not for a text editor. | ||||||||||||||
▲ | andrewmcwatters a day ago | parent | prev | next [-] | |||||||||||||
Yeah, I maintain a Vulkan backend, and this immediately triggered my internal "what?" alarm. Modern Direct3D is almost indistinguishable from Vulkan, on the other hand. So it shouldn't be difficult for them to add. I also agree with your HLSL comment. It sounds like these guys don’t have much prior graphics or game development experience. | ||||||||||||||
| ||||||||||||||
▲ | shortrounddev2 a day ago | parent | prev | next [-] | |||||||||||||
> I wonder why HLSL wasn't adopted from the outset I suspect because a huge amount of software engineers develop on Macbooks and consider Linux second and Windows third. Culturally, I think there's a difference in tooling between Graphics developers (who would go straight for HLSL, cross-platform Vulkan, or even SDL3) and mac users (who reach for Apple tools first) | ||||||||||||||
▲ | TiredOfLife a day ago | parent | prev [-] | |||||||||||||
Zed spirit is Mac first and only. |