← Back to context

Comment by dagmx

8 days ago

The point of the graphics APIs is to be as close to the metal as possible. It’s a balancing act between portability and hardware design/performance. I really don’t think it’s as trivial as non-graphics engineers make it out to be to make something universal.

But even when it existed in the form of OpenGL , or now WebGPU, people complain about the performance overhead. So you end up back here.

Vulkan isnt close to the metal, though. It's a high-level wrapper around all the quirks and differences of ancient mobile to modern desktop GPUs. Render passes, for example, are entirely irrelevant for desktop GPUs. They are not close to metal, but add needless complexity. Recently, a Vulkan driver engineer even told me that they are not necessary for tile-based mobile GPUs for which they were intended, since they can figure the necessary things out by themselves. And I would guess they need to, since they became optional in Vulkan, so they cant relly on them anymore. They are still mandatory in WebGPU, for no good reason.

And there are so many pointless things that are no longer relevant, or should at best be optional so that devs can get things done before optimizing.

  • I said as close to it as possible.

    Yes they’re abstractions, because nobody really wants anyone to be writing directly against the ISA either since the vendors need the ability to change things over time.

    Again, to my point, it’s about balancing portability and power/perf.

    • Yet they ended up creating something that makes OpenGL still an attractive choice. That excessive complexity certainly wasnt necessary.

      Personally, I'll sit this generation out and wait dor whatever comes after. I ended up switching to doing software rasterization in Cuda because that's easier than drawing a triangle in Vulkan. Cuda has shown me how insane Vulkan is. Like, why even have descriptir sets, bindings, etc? In cuda you simply call a kernel and provide the data (e.g. vertex or storage buffer) as a pointer argument.

      1 reply →

These metal implementations are constructs, and they are constructed differently for no good reason. Is there any benefit to anyone with all these proprietary implementations? Maybe, but if so, the beneficiary isn’t the consumer and it isn’t the game developer.

So who is the graphics hardware built for? Again, not the consumer and not the game developer.

It is in the interests of these hardware manufacturers to make performance as easy as possible but none of them do. They write their own drivers which implement DirectX 12 or Vulcan or Metal or OpenGL.

So now as a game developer, if I want my game to perform on all platforms, I have to write my shaders natively for Metal, Vulcan, and DirectX 12, at least. Cross-compilers exist but they don’t do their job as well as a human can, so they’re simply not options for some.

All of this is harder for no good reason. And no one cares. No one wants to see things improve. They just make excuses for the hardware manufacturers and kill conversations which explain how things currently suck for a lot of people.