The main problem with Vulkan isn't the programming model or the lack of features. These are tackled by Khronos. The problem is with coverage and update distribution. It's all over the place! If you develop general purpose software (like Zed), you can't assume that even the basic things like dynamic rendering are supported uniformly. There are always weird systems with old drivers (looking at Ubuntu 22 LTS), hardware vendors abandoning and forcefully deprecating the working hardware, and of course driver bugs...
So, by the time I'm going to be able to rely on the new shiny descriptor heap/buffer features, I'll have more gray hair and other things on the horizon.
> Ubuntu LTS<p>This is why I try to encourage new Linux users away from Ubuntu: it's a laggard with, often important, functionality. It is now an enterprise OS (where durability is more important than functionality), it's not really suitable for a power user (like someone who would use Zed).
My understanding with Mesa is that it has very few dependencies and is ABI stable, so freezing Mesa updates is counterproductive. I'm not sure about Snaps, but Flatpak ships as it's own system managing Mesa versions.
> Flatpak ships as it's own system managing Mesa versions.<p>Mixing and matching the kernel and userspace mesa components is subject to limitations. However it will transparently fall back to software rendering so you might not notice if you aren't doing anything intensive.<p>Related, being a container flatpak has no choice but to ship the mesa userspace component. If it didn't nothing would work.
> My understanding with Mesa is that it has very few dependencies<p>Some of the shader compilers require LLVM which is a giant dependency to say the least. But with Valve's ACO for RADV I think that could technically be omitted.
" It is now an enterprise OS"<p>You really want enterprise standards support for your graphics API.<p>Bleeding edge ...is not nice in graphics. Especially the more complex the systems get, so do the edge cases.<p>I mean in general. If you are writing a high end game engine don't listen to me, you know better. But if you are a mid-tier graphics wonk like myself 20 year old concepts are usually quite pareto-optimal for _lots_ of stuff and should be robustly covered by most apis.<p>If I could give one advice for myself 20 years ago.<p>For anything practical - focus on the platform native graphics API. Windows - DirectX. Mac - OpenGL (20 years ago! Predates metal!. Today ofc would be metal).<p>I don't think that advice would be much different today (apart from Metal) IF you don't know what to do and just want to start on doing graphics. For senior peeps who know the field do whatever rights for you of course.<p>Linux - good luck. Find the API that has best support for your card & driver combo - meaning likely the most stabilized with most users.
You don't have to run LTS. There is a new release every 6 months.
Especially a 4 year old LTS. But I guess the point was that you will run into some users that do when you ship to the general audience.<p>You run into the same problem on other platforms too of course (eg Android)
I've been running Linux for a very long time.<p>Ubuntu has never ever been the most stable or useful distro. What it did have was apt and more up to date stuff than debian.<p>I would never willingly choose Ubuntu if allowed other options (Fedora, Debian, maybe CoreOS, etc)
I have a lot of respect for Canonical for driving a distro that was very "noob friendly" in an ecosystem where that's genuinely hard.<p>But I mostly agree with you. Once you get out of that phase, I don't really see much value in Ubuntu. I'd pick pretty much anything else for everything I do these days. Debian/Fedora/Alpine on the server. Arch on the desktop.
not to mention the OP mentioned 22 LTS which isn't even the most current LTS
And this is a prime example of development-centric thinking prioritizing developer comfort over the capabilities and usability of the actual software. Rather than targeting stable older feature sets it's always targeting the bleeding edge and then being confused that this doesn't work on machines that aren't their own and then blaming everyone else for their decision. 4 years is <i>not</i> a long time (LTS). 4 years is the minimum that software should be able to live.
Ubuntu's perfectly fine if you avoid LTS versions.
Which one would you recommend for regular users and power users?
If you want something relatively uninteresting: Fedora or Debian (honestly, stable is fine).<p>If you want something extremely reliable, more modern, but may require some learning to tweak: Silverblue or Kinoite.
Not joking, Arch. Pick Gnome/KDE/Sway as you please.<p>Arch is a <i>wonderful</i> daily driver distro for folks who can deal with even a small amount of configuration.<p>Excellent software availability through AUR, excellent update times (pretty much immediate).<p>The only downside is there's not a ton of direct commercial software packaged for it by default (ex - most companies they care give a .deb or a .rpm) but that's easily made up for by the rest of AUR.<p>It's not even particularly hard to install anymore - run `archinstall` <a href="https://wiki.archlinux.org/title/Archinstall" rel="nofollow">https://wiki.archlinux.org/title/Archinstall</a> make some choices, get a decent distro.<p>Throw in that steam support is pretty great... and it's generally one of the best distros available right now for general use by even a moderate user.<p>Also fine as a daily driver for kids/spouses as long as there's someone in the house to run pacman every now and then, or help install new stuff.
Arch or Endeavour
Debian/testing, with stable pinned on at low priority.<p>It slows down for a couple months around release, but generally provides pretty reliable & up to date experience with a very good OS.<p>Dance dance the red spiral.
I encourage them away from Ubuntu because of the Snaps. If people want an enterprise distro that lags upstreams by a lot they should go with Debian.
Yes, this is the problem. They tout this new latest and greatest extension that fixes and simplifies a lot, yet you go look up the extension on vulkan.gpuinfo.org and see ... currently 0.3% of all devices support it. Which means you can't in any way use it. So you wait 5 years, and now maybe 20% of devices support it. Then you wait another 5 years, and maybe 75% of devices support it. And maybe you can get away with limiting your code to running on 75% of devices. Or, you wait another 5 years to get into the 90s.
> There are always weird systems with old drivers (looking at Ubuntu 22 LTS)<p>While I agree with your general point, RHEL stands out way, way more to me. Ubuntu 22.04 and RHEL 9 were both released in 2022. Where Ubuntu 22.04 has general support until mid-2027 and security support until mid-2032, RHEL 9 has "production" support through mid-2032 and extended support until mid-2034.<p>Wikipedia sources for ubuntu[0] and RHEL [1]:<p>[0] <a href="https://en.wikipedia.org/wiki/Ubuntu#Releases" rel="nofollow">https://en.wikipedia.org/wiki/Ubuntu#Releases</a><p>[1] <a href="https://upload.wikimedia.org/wikipedia/en/timeline/fcppf7prx10mvntfzjdz2pa83g48ile.png" rel="nofollow">https://upload.wikimedia.org/wikipedia/en/timeline/fcppf7prx...</a>
Tbh, we should more readily abandon GPU vendors that refuse to go with the times. If we cater to them for too long, they have no reason to adapt.
I had a relatively recent graphics card (5 years old perhaps?). I don't care about 3D or games, or whatever.<p>So I was sad not to be able to run a text editor (let's be honest, Zed is nice but it's just displaying text). And somehow the non-accelerated version is eating 24 cores. Just for text.<p><a href="https://github.com/zed-industries/zed/discussions/23623" rel="nofollow">https://github.com/zed-industries/zed/discussions/23623</a><p>I ended up buying a new graphics card in the end.<p>I just wish everyone could get along somehow.
No. I remember a phone app ( Whatsapp?) doggedly supporting every godforsaken phone, even the nokias with the zillion incompatible Java versions. A developer should go where the customers are.<p>What does help is an industry accepted benchmark, easily ran by everyone. I remember browser css being all over the place, until that whatsitsname benchmark (with the smiley face) demonstrated which emperors had no clothes. Everyone could surf to the test and check how well their favorite browser did. Scores went up quickly, and today, css is in a lot better shape.
> we should more readily abandon GPU vendors<p>This was so much more practical before the market coalesced to just 3 players. Matrox, it's time for your comeback arc! and maybe a desktop pcie packaging for mali?
The market is not just 3 players. These days we have these things called smartphones, and they all include a variety of different graphics cards on them. And even more devices than just those include decently powerful GPUs as well. If you look at the Contributors section of the extension in the post, and look at all the companies involved, you'll have a better idea.
NVidia says no new gamer GPUs in 2026, and increasing prices through 2030. They're too focused on enterprise AI machines.
I wish they would just allow us to push everything to GPU as buffer pointers, like buffer_device address extension allows you to, and then reconstruct the data to your required format via shaders.<p>The GPU programming seems to be both super low level, but also high level, cause textures and descriptors need these ultra specific data format's, and then the way you construct and upload those formats are very complicated and change all the time.<p>Is there really no way to simplify this ?<p>Regular vertex data was supposed to be strictly pre formatted in pipeline too, util it was not suddenly, and now we can just give the shader a `device_address`extension memory pointer and construct the data from that.
I also want what you're describing. It seems like the ideal "data-in-out" pipeline for purely compute based shaders.<p>I've brought it up several times when talking with folks who work down in the chip level for optimizing these operations and all I can say is, there are a lot of unforeseen complications to what we're suggesting.<p>It's not that we can't have a GPU that does these things, it's apparently more of a combination of previous and current architectural decisions that don't want that. For instance, an nVidia GPU is focused on providing the hardware optimizations necessary to do either LLM compute or graphics acceleration, both essentially proprietary technologies.<p>The proprietariness isn't why it's obtuse though, you can make a chip go super-duper fast for specific tasks, or more general for all kinds of tasks. Somewhere, folks are making a tradeoff of backwards compatibility and supporting new hardware accelerated tasks.<p>Neither of these are "general purpose compute and data flow" focuses. As such, you get the GPU that only sorta is configurable for what you want to do. Which in my opinion explains your "GPU programming seems to be both super low level, but also high level" comment.<p>That's been my experience. I still think what you're suggesting is a great idea and would make GPU's a more open compute platform for a wider variety of tasks, while also simplifying things a lot.
This is true, but what the parent comment is getting at is we really just want to be able to address graphics memory the same way it's exposed in CUDA for example. Where you can just have pointers to GPU memory in structures visible to the CPU, without this song and dance with descriptor set bindings.
If you got what you're asking for you'd presumably lose access to any fixed function hardware. RE your example, knowing the data format permits automagic hardware accelerated translations between image formats.<p>You're free to do what you're asking after by simply performing all operations manually in a compute shader. You can manually clip, transform, rasterize, and even sample textures. But you'll lose the implicit use of various fixed function hardware that you currently benefit from.
> If you got what you're asking for you'd presumably lose access to any fixed function hardware.<p>Are there any fixed functions left that aren't just being implemented by the general compute shader hardware?<p>I guess the ray tracing stuff would qualify, but that isn't what people are complaining about here.
Relevant: <i>Descriptors are Hard</i> from XDC 2025 - <a href="https://www.youtube.com/watch?v=TpwjJdkg2RE" rel="nofollow">https://www.youtube.com/watch?v=TpwjJdkg2RE</a><p>Even on modern hardware there's still a lot of architectural differences to reconcile at the API level.
I’m not watching Rust as closely as I once did, but it seems like buffer ownership is something it should be leaning on more fully.<p>There’s an old concurrency pattern where a producer and consumer tag team on two sets of buffers to speed up throughput. Producer fills a buffer, transfers ownership to the consumer, and is given the previous buffer in return.<p>It is structurally similar to double buffered video, but for any sort of data.<p>It seems like Rust would be good for proving the soundness. And it should be a library now rather than a roll your own.
> There’s an old concurrency pattern where a producer and consumer tag team on two sets of buffers to speed up throughput. Producer fills a buffer, transfers ownership to the consumer, and is given the previous buffer in return.<p>Isn't this just called a swapchain?
At least they are making an effort to correct the extension spaghetti, already worse than OpenGL.<p>Addiitionally most of these fixes aren't coming into Android, now getting WebGPU for Java/Kotlin[0] after so many refused to move away from OpenGL ES, and naturally any card not lucky to get new driver releases.<p>Still, better now than never.<p>[0] - <a href="https://developer.android.com/jetpack/androidx/releases/webgpu" rel="nofollow">https://developer.android.com/jetpack/androidx/releases/webg...</a>
As someone from game development, not supporting Vulkan on Android and sticking with OpenGL ES instead is a safer bet. There is always some device(s) that bug out on Vulkan badly. Nobody wants to sit and find workarounds for that obscure vendor.
Bizarre take. Notice how that WebGPU is an AndroidX library? That means WebGPU API support is built into apps via that library and runs on top of the system's Vulkan or OpenGL ES API.<p>Do you work for Google or an Android OEM? If not, you have no basis to make the claim that Android will cease updating Vulkan API support.
I did not do such claim.<p>WebGPU on Android runs on top of Vulkan.<p>If you knew about 3D programming on Android, you would know that there are ongoing efforts to have only Vulkan, with OpenGL ES on top.<p>However Java and Kotlin devs refuse to bother with the NDK for Vulkan, and keep reaching for OpenGL ES instead.<p>Please refer to Google talks on Vulkanised conferences.
> ...efforts to have only Vulkan, with OpenGL ES on top...<p>Ok this made me laugh given that Vulkan support on Android is so bad that WebGPU needs a fallback mode to GLES ;)<p><a href="https://github.com/gpuweb/gpuweb/issues/4266" rel="nofollow">https://github.com/gpuweb/gpuweb/issues/4266</a>
Agreed, which is Google's motivation for doing that.<p>The argument being that if Android only does Vulkan, that OEMs will be forced to care about their drivers.<p>There are talks done by Google on this, either Vulkanised, Google IO, or GDC, can't remember now the exact one.
Is it possible to support OpenGL on top of Vulkan well? It has been pointed out that Vulkan requires you to completely freeze and compile a graphics pipeline before using it, while OpenGL's state machine is more flexible, and the underlying hardware is somewhat more amenable to these state transitions at runtime, than the Vulkan API would suggest.<p>Don't these compatibility layers run into issues with constant pipeline recompilation related performance issues, when emulating OpenGL?
Vulkan is awful to work with and the drivers are buggy. Google's own phones are the worst for it. I have an app with a compute only vulkan pipeline and on the Google Pixel 10 the whole screen becomes corrupted with some fairly basic shaders.
> Addiitionally most of these fixes aren't coming into Android<p>The fuck are you talking about? Of course they'll come to Android
I'm really enjoying these changes. Going from render passes to dynamic rendering really simplified my code. I wonder how this new feature compares to existing bindless rendering.<p>From the linked video, "Feature parity with OpenCL" is the thing I'm most looking forward to.
You can use descriptor heaps with existing bindless shaders if you configure the optional "root signature".<p>However it looks like it's simpler to change your shaders (if you can) to use the new GLSL/SPIR-V functionality (or Slang) and don't specify the root signature at all (it's complex and verbose).<p>Descriptor heaps really reduce the amount of setup code needed, with pipeline layouts gone you can drop like third of the code needed to get started.<p>Similar in magnitude to dynamic rendering.
Having quite recently written a (still experimental) Vulkan backend for sokol_gfx.h, my impression is that starting with `VK_EXT_descriptor_buffer` (soon-ish to be replaced with `VK_EXT_descriptor_heap`), the "core API" is in pretty good shape now (with the remaining problem that all the outdated and depreciated sediment layers are still part of the core API, this should really be kicked out - e.g. when I explicitly request a specific API version like 1.4 I don't care about any features that have been deprecated in versions up to 1.4 and I don't care about any extensions that have been incorporated into the core API up until 1.4, so I'd really like to have them at least not show up in the Vulkan header so that code completion cannot sneak in outdated code (like EXT/KHR postfixes for things that have been moved into core).<p>The current OpenGL-like sediment-layer-model (e.g. never remove old stuff) is extremely confusing when not following Vulkan development very closely since 2016, since there's often 5 ways to do the same thing, 3 of which are deprecated - but finding out whether a feature is deprecated is its own sidequest.<p>What I actually wrestled with most was getting the outer frame-loop right without validation layer errors. I feel like this should be the next thing which the "Eye of Khronos" should focus on.<p>All official tutorial/example code I've tried doesn't run without swapchain-sync-related validation errors on one or another configuration. Even this 'best practices' example code which demonstrates how to do the frame-loop scaffolding correctly produces valiation layer errors, so it's also quite useless:<p><a href="https://docs.vulkan.org/guide/latest/swapchain_semaphore_reuse.html" rel="nofollow">https://docs.vulkan.org/guide/latest/swapchain_semaphore_reu...</a><p>What's worse: different hardware/driver combos produce different validation layer errors (even in the swapchain-code which really shouldn't have different implementations across GPU vendors - e.g. shouldn't Khronos provide common reference code for those GPU-independent parts of drivers?). I wonder if there is actually <i>any</i> Vulkan code out there which is completely validation-layer-clean across all possible configs (I seriously doubt it).<p>Also the VK_[EXT/KHR]_swapchain_maintenance1 extension which is supposed to fix all those little warts has such a low coverage that it's not worth supporting (but it should really be part of the core API by now - the extension is from 2019).<p>Anyway... baby steps into the right direction, only a shame that it took a decade ;)
Are there any good Vulkan tutorials that are continuously updated to reflect these advancement and ease of use improvements?<p>It's a similar challenge to the many different historical strata of C++ resources.
<a href="https://howtovulkan.com" rel="nofollow">https://howtovulkan.com</a> is a recent one which targets the modern flavour of Vulkan that everything supports today.<p>Well, all desktop hardware and drivers at least. God help you if you want to ship on Android.
The one on Vulkan.org recently got updated to use dynamic rendering and a bunch of the newest features (plus modern C++, Slang instead of glsl, etc...).<p><a href="https://docs.vulkan.org/tutorial/latest/00_Introduction.html" rel="nofollow">https://docs.vulkan.org/tutorial/latest/00_Introduction.html</a>
Finding the optimal sub-language is about API coupling with client code, making a moving sweet spot for where bread & butter techniques live.
I suspect we are only 5-10 years away until Vulkan is finaly usable. There are so many completely needlessly complex things, or things that should have an easy-path for the common case.<p>BDA, dynamic rendering and shader objects almost make Vulkan bearable. What's still sorely missing is a single-line device malloc, a default queue that can be used without ever touching the queue family API, and an entirely descriptor-free code path. The latter would involve making the NV bindless extension the standard which simply gives you handles to textures, without making you manage descriptor buffers/sets/heaps. Maybe also put an easy-path for synchronization on that list and making the explicit API optional.<p>Until then I'll keep enjoying OpenGL 4.6, which already had BDA with c-style pointer syntax in glsl shaders since 2010 (NV_shader_buffer_load), and which allows hassle-free buffer allocation and descriptor-set-free bindless textures.
I would like to / am "supposed to" use Vulkan but it's a massive pain coming from OpenCL, with all kinds of issues that need safe handling which simply don't come from OpenCL workloads.<p>Everyone keeps telling me OpenCL is deprecated (which is true, although it's also true that it continues to work superbly in 2026) but there isn't a good / official OpenCL to Vulkan wrapper out there to justify it for what I do.
Not sure if this is an "oh, no" event.<p>So this goes into Vulkan. Then it has to ship with the OS. Then it has to go into intermediate layers such as WGPU. Which will probably have to support both old and new mode. Then it has to go into renderers. Which will probably have to support both old and new mode. Maybe at the top of the renderer you can't tell if you're in old or new mode, but it will probably leak through. In that case game engines have to know about this. Which will cause churn in game code.<p>And Apple will do something different, in Metal.<p>Unreal Engine and Unity have the staffs to handle this, but few others do.
The Vulkan-based renderers which use Vulkan concurrency to get performance OpenGL can't deliver are few. Probably only Unreal Engine and Unity really exploit Vulkan properly.<p>Here's the top level of the Vulkan changes.[1] It doesn't look simple.<p>(I'm mostly grumbling because the difficulty and churn in Vulkan/WGPU has resulted in three abandoned renderers in Rust land through developer burnout. I'm a user of renderers, and would like them to Just Work.)<p>[1] <a href="https://docs.vulkan.org/refpages/latest/refpages/source/VK_EXT_descriptor_heap.html" rel="nofollow">https://docs.vulkan.org/refpages/latest/refpages/source/VK_E...</a>
> Not sure if this is an "oh, no" event.<p>it's not.<p>descriptor sets are realistically never getting deprecated. old code doesn't have to be rewritten if it works. there's no point.<p>if you're doing bindless (which you most certainly arent if you're still stuck with descriptor sets) this offers a better way of handling that.<p>if you care to upgrade your descriptor set based path to use heaps, this extension offers a very nice pathway to doing so _without having to even recompile shaders_.<p>for new/future code, this is a solid improvement.<p>if you're happy where you are with your renderer, there isn't a need to do anything.
Does this evolution of the Vulkan API get closer to the model explained in <a href="https://www.sebastianaaltonen.com/blog/no-graphics-api" rel="nofollow">https://www.sebastianaaltonen.com/blog/no-graphics-api</a> which we discussed in <a href="https://news.ycombinator.com/item?id=46293062">https://news.ycombinator.com/item?id=46293062</a> ?
Yes, you can get very close to that API with this extension + existing Vulkan extensions. The main difference is that you still kind of need opaque buffer and texture objects instead of raw pointers, but you can get GPU pointers for them and still work with those. In theory I think you could do the malloc API design there but it's fairly unintuitive in Vulkan and you'd still need VkBuffers internally even if you didn't expose them in a wrapper layer.
I've got a (not yet ready for public) wrapper on Vulkan that mostly matches this blog post, and so far it's been a really lovely way to do graphics programming.<p>The main thing that's not possible at all on top of Vulkan is his signals API, which I would enjoy seeing - it could be done if timeline semaphores could be waited on/signalled inside a command buffer, rather than just on submission boundaries. Not sure how feasible that is with existing hardware though.
It's a baby-step in this direction, e.g. from Seb's article:<p>> Vulkan’s VK_EXT_descriptor_buffer (<a href="https://www.khronos.org/blog/vk-ext-descriptor-buffer" rel="nofollow">https://www.khronos.org/blog/vk-ext-descriptor-buffer</a>) extension (2022) is similar to my proposal, allowing direct CPU and GPU write. It is supported by most vendors, but unfortunately is not part of the Vulkan 1.4 core spec.<p>The new `VK_EXT_descriptor_heap` extension described in the Khronos post is a replacement for `VK_EXT_descriptor_buffer` which fixes some problems but otherwise is the same basic idea (e.g. "descriptors are just memory").
I personally just switched to using push descriptors everywhere. On desktops, the real world limits are high enough that it end up working out fine and you get a nice immediate mode API like OpenGL.
Vulkan takes like 600+ lines to do what Metal does in 50.<p>I'm sure the comments will be all excuses and whys but they're all nonsense. It's just a poorly thought out API.
My understanding of API standards that need to be implemented by multiple vendors is that there's a tradeoff between having something that's easy for the programmer to use and something that's easy for vendors to implement.<p>A big complaint I hear about OpenGL is that it has inconsistent behavior across drivers, which you could argue is because of the amount of driver code that needs to be written to support its high-level nature. A lower-level API can require less driver code to implement, effectively moving all of that complexity into the open source libraries that eventually get written to wrap it. As a graphics programmer you can then just vendor one of those libraries and win better cross-platform support for free.<p>For example: I've never used Vulkan personally, but I still benefit from it in my OpenGL programs thanks to ANGLE.
Agreed. It has way too much completely unnecessary verbosity. Like, why the hell does it take 30 lines to allocate memory rather than one single malloc.
Same with DirectX, if only COM actually had better tooling, instead of pick your adventure C++ framework, or first class support for .NET.
How are folks feeling about WebGPU these days?<p>Once Vulkan is finally in good order, descriptor_heap and others, I really really hope we can get a WebGPU.next.<p>Where are we at with the "what's next for webgpu" post, from 5 quarters ago?
<a href="https://developer.chrome.com/blog/next-for-webgpu" rel="nofollow">https://developer.chrome.com/blog/next-for-webgpu</a> <a href="https://news.ycombinator.com/item?id=42209272">https://news.ycombinator.com/item?id=42209272</a>
This is my point of view as someone who learned WebGPU as a precursor to learning Vulkan, and who is definitely not a graphics programming expert:<p>My personal experience with WebGPU wasn't the best. One of my dislikes was pipelines, which is something that other people also discuss in this comment thread. Pipeline state objects are awkward to use without an extension like dynamic rendering. You get a combinatorial explosion of pipelines and usually end up storing them in a hash map.<p>In my opinion, pipelines state objects are a leaky abstraction that exposes the way that GPUs work: namely that some state changes may require some GPUs to recompile the shader, so all of the state should be bundled together. In my opinion, an API for the web should be concerned with abstractions from the point of view of the programmer designing the application: which state logically acts as a single unit, and which state may change frequently?<p>It seems that many modern APIs have gone with the pipeline abstraction; for example, SDL_GPU also has pipelines. I'm still not sure what the "best practices" are supposed to be for modern graphics programming regarding how to structure your program around pipelines.<p>I also wish that WebGPU had push constants, so that I do not have to use a bind group for certain data such as transformation matrices.<p>Because WebGPU is design-by-committee and must support the lowest common denominator hardware, I'm worried whether it will evolve too slowly to reflect whatever the best practices are in "modern" Vulkan. I hope that WebGPU could be a cross-platform API similar to Vulkan, but less verbose. However, it seems to me that by using WebGPU instead of Vulkan, you currently lose out on a lot of features. Since I'm still a beginner, I could have misconceptions that I hope other people will correct.
WebGPU is kinda meh, a 2010s graphic programmers vision of a modern API. It follows Vulkan 1.0, and while Vulkan is finally getting rid of most of the mess like pipelines, WebGPU went all in. It's surprisingly cumbersome to bind stuff to shaders, and everything is static and has to be hashed&cached, which sucks for streaming/LOD systems. Nowadays you can easily pass arbitrary amounts of buffers and entire scene descriptions via GPU memory pointers to OpenGL, Vulkan, CUDA, etc. with BDA and change them dynamically each frame. But not in WebGPU which does not support BDA und is unlikely to support it anytime soon.<p>It's also disappointing that OpenGL 4.6, released in 2017, is a decade ahead of WebGPU.
WebGPU has the problem of needing to handle the lowest common denominator (so GLES 3 if not GLES 2 because of low end mobile), and also needing to deal with Apple's refusal to do anything with even a hint of Khronos (hence why no SPIR-V even though literally everything else <i>including DirectX</i> has adopted it)<p>Web graphics have never and will never be cutting edge, they can't as they have to sit on top of browsers that have to already have those features available to it. It can only ever build on top of something lower level. That's not inherently bad, not everything needs cutting edge, but "it's outdated" is also just inherently going to be always true.
I understand not being cutting-edge. But having a feature-set from 2010 is...not great.<p>Also, some things could have easily be done different and then be implemented as efficient as a particular backend allows. Like pipelines. Just don't do pipelines at all. A web graphics API does not need them, WebGL worked perfectly fine without them. The WebGPU backends can use them if necessary, or not use them if more modern systems don't require them anymore. But now we're locked-in to a needlessly cumbersome and outdated way of doing things in WebGPU.<p>Similarly, WebGPU could have done without that static binding mess. Just do something like commandBuffer.draw(shader, vertexBuffer, indexBuffer, texture, ...) and automatically connect the call with the shader arguments, like CUDA does. The backend can then create all that binding nonsense if necessary, or not if a newer backend does not need it anymore.
> WebGL worked perfectly fine without them<p>Except it didn't. In the GL programming model it's trivial to accidentially leak the wrong granular render state into the next draw call, unless you always reconfigure all states anyway (and in that case PSOs are strictly better, they just include <i>too much</i> state).<p>The basic idea of immutable state group objects is a good one, Vulkan 1.0 and D3D12 just went too far (while the state group granularity of D3D11 and Metal is just about right).<p>> Similarly, WebGPU could have done without that static binding mess.<p>This I agree with, pre-baked BindGroup objects were just a terrible idea right from the start, and AFAIK they are not even strictly necessary when targeting Vulkan 1.0.
There should be a better abstraction to solve the GL state leakage problem than PSOs. We end up with a combinatory explosion of PSOs when some states they abstract are essentially toggling some bits in a GPU register in no way coupled with the rest of the pipeline state.
That abstraction exists in D3D11 and to a lesser extent in Metal via smaller state-group-objects (for instance D3D11 splits the rende state into immutable objects for rasterizer-state, depth-stencil-state, blend-state and (vertex-)input-layout-state (not even needed anymore with vertex pulling).<p>Even if those state group objects don't match the underlying hardware directly they still reign in the combinatorial explosion dramatically and are more robust than the GL-style state soup.<p>AFAIK the main problem is state which needs to be compiled into the shader on some GPUs while other GPUs only have fixed-function hardware for the same state (for instance blend state).
> Except it didn't. In the GL programming model it's trivial to accidentially leak the wrong granular render state into the next draw call<p>This is where I think Vulkan and WebGPU are chasing the wrong goal: To make draw calls faster. What's even faster, however, is making fewer draw calls and that's something graphics devs can easily do when you provide them with tools like multi-draw. Preferably multi-draw that allows multiple different buffers. Doing so will naturally reduce costly state changes with little effort.
I think in the end it all depends on Android. Average Vulkan driver quality on Android doesn't seem to be great in the first place, getting uptodate Vulkan API support, and in high quality and high enough performance for a modernized WebGPU version to build on might be too much to ask of the Android ecosystem for the next one or two decades.
As always, the only two positive things about WebGL and WebGPU, are being available on browsers, and having been designed for managed languages.<p>They lag behind modern hardware, and after almost 15 years, there are zero developer tools to debug from browser vendors, other than the oldie SpectorJS that hardly counts.
This is kind of ridiculous take<p>You can use wgpu or dawn in a native app and use native tools for GPU debugging if that's what you want<p>You can then take that and also run it in the browser, and, you can debug the browser in the same tools. Google it for instructions<p>The positive things about WebGPU is it's actually portable, unlike Vulkan. And, it's easy to use, unlike Vulkan.
I try my best to push ML things into WebGPU and I think it has a future, but performance is not there yet. I have little experience with Vulkan except toy projects, but WebGPU and Vulkan seem very similar
WebGPU is kinda meh. It's when you need to do do something on browser that you can't with WebGL. GLES is the compatibility king and runs pretty much everywhere, if not natively then through a compatibility layer like ANGLE. I'm sad that WebGPU killed WebGL 3 which was supposed to add compute shaders. Maybe WebGPU would've been more interesting if it wasn't made to replace WebGL but instead be a non-compatibility API targetting modern rendering and actually supporting Spir-V.
[dead]
[dead]
[flagged]
Uuugh, graphics. So many smart people expending great energy to look busy while doing nothing particularly profound.<p>Graphics people, here is what you need to do.<p>1) Figure out a machine abstraction.<p>2) Figure out an abstraction for how these machines communicate with each other and the cpu on a shared memory bus.<p>3) Write a binary spec for code for this abstract machine.<p>4) Compilers target this abstract machine.<p>5) Programs submit code to driver for AoT compilation, and cache results.<p>6) Driver has some linker and dynamic module loading/unloading capability.<p>7) Signal the driver to start that code.<p>AMD64, ARM, and RISC-V are all basically differing binary specs for a C-machine+MMU+MMIO compute abstraction.<p>Figure out your machine abstraction and let us normies write code that’s accelerated without having to throw the baby out with the bathwater ever few years.<p>Oh yes, give us timing information so we can adapt workload as necessary to achieve soft real-time scheduling on hardware with differing performance.
I don’t know which of my detractors to respond to, so I’ll respond here.<p>It should be clear that I’m only interested in compute and <i>not</i> a GPU expert.<p>GPUs, from my understanding, have lost the majority of fixed-function units as they’ve become more programmable. Furthermore, GPUs clearly have a hidden scheduler and this is not fully exposed by vendors. In other words we have no control over what is being run on a GPU at any given instant, we simply queue work for it.<p>Given all these contrivances, why should not the interface exposed to the user be absolutely simple. It should then be up to vendors to produce hardware (and co-designed compilers) to run our software as fast as possible.<p>Graphics developers need to develop a narrow-waist abstraction for wide, latency-hiding, SIMD compute. On top of this Vulkan, or OpenGL, or ML inference, or whatever can be done. The memory space should also be fully unified.<p>This is what needs to be worked on. If you don’t agree, that’s fine, but don’t pretend that you’re not protecting entrenched interests from the likes of Microsoft, Nvidia, Epic Games, Valve and others.<p>Telling people to just use Unreal engine, or Unity, or even Godot, it just like telling people to just use Python, or Typescript, or Go to get their sequential compute done.<p>Expose the compute!
They have done it. The current modern abstraction is called Vulkan, and the binary spec code for this machine is called SPIR-V.
Wow, you should get NVIDIA, AMD and Intel on the phone ASAP! Really strange that they didn't come up with such a simple and straightforward idea in the last 3 decades ;)
It sounds like webgl + wasm.
some of this is what's khronos standards are theoretically supposed to achieve.<p>surprise, it's very difficult to do across many hw vendors and classes of devices. it's not a coincidence that metal is much easier to program for.<p>maybe consider joining khronos since you apparently know exactly how to achieve this very simple goal...