Remix.run Logo
shmerl 2 days ago

Because it won't tax developers with the need to learn yet another NIH. Same reason any standard exists and makes things easier for those who use it.

Honestly any idea that defends NIH like this belongs with dinosaurs. NIH is a stupid meme, not the opposite of it.

pjmlp 2 days ago | parent | next [-]

Vulkan is a mess as bad as OpenGL, to the point Khronos has been forced to public admit it didn't went out as planned, is yet again an extension spaghetti, and they are now trying to clean the house with the Vulkan Roadmap introduced at Vulkanised 2025.

That is how good Khronos "design by commitee APIs" end up being.

MindSpunk 2 days ago | parent | next [-]

Vulkan's extension story is a mess. Not surprising from the people that brought you OpenGL.

However please don't undersell what they got right. Because what they got right, they got _very_ right.

Barriers. Vulkan got barriers so absolutely right that every competing API has now adopted a clone of Vulkan's barrier API. The API is cumbersome but brutally unambiguous compared to DirectX's resource states or Metal's hazard tracking. DirectX has a rats nest of special cases in the resource state API because of how inexpressive it is, and just straight up forgot to consider COPY->COPY barriers.

We also have SPIR-V. Again, D3D12 plans to dump DXIL and adopt SPIR-V.

The fundamentals Vulkan got very right IMO. It's a shame it gets shackled to the extension mess.

pjmlp 2 days ago | parent [-]

SPIR-V only exists to reaction of Khronos losing to CUDA and PTX, it is the evolution of SPIR, created when they realised industry didn't really want to write OpenCL in a textual form of C99 dialect, rather bytecode formats targeted by multiple compiler backends, including Fortran ignored by Khronos.

Microsoft adopting SPIR-V as DXIL replacement is most likely a matter of convenience, the format got messy to maintain, is tied to an old fork of LLVM, and HLSL has gotten the industy weight, even favoured over GLSL for Vulkan (which Khronos acknowledge at Vulkanised 2024 not doing any work at all, zero, nada), so why redo DXIL from scratch, when they could capitalize on existing work to target SPIR-V from HLSL.

MindSpunk 2 days ago | parent [-]

DXIL has other issues beyond being an orphaned fork of LLVM-IR. LLVM is ill-equipped to represents shaders, and there have been real bugs in the wild because of how not-a-shader-language LLVM-IR is. See this [0] post under the 'The classic subgroup breakage – maximal convergence gone awry' section. Read the whole series really if you haven't, it's a fantastic dive into how awful this stuff is.

DXIL is also a useless intermediate representation because parsing it is so bloody difficult nobody could actually do anything with it. DXIL was, and still is, functionally opaque bytes. You can't introspect it, you can't modify it or do anything of use with it. SPIR-V is dead-simple to parse and has an array of tools built around it because it's so easy to work with.

I don't really see how the OpenCL history is relevant to Vulkan either. Khronos losing the OpenCL game to Nvidia, certainly no thanks to Nvidia's sabotage either, doesn't change that SPIR-V is a much more successful format.

[0] https://themaister.net/blog/2022/04/24/my-personal-hell-of-t...

webdevver a day ago | parent | next [-]

> Khronos losing the OpenCL game to Nvidia, certainly no thanks to Nvidia's sabotage either, doesn't change that SPIR-V is a much more successful format.

could you elaborate more on this? sounds interesting

pjmlp 2 days ago | parent | prev [-]

DXIL has the DirectX SDK tooling.

OpenCL history is more than relevant, without SPIR, there would not exist SPIR-V.

People love to blame NVidia for AMD and Intel failures pushing OpenCL into the industry, and Google completly ignoring it for mobile devices, pushing their own RenderScript dialect instead, even if Apple would have behave differently regarding their platforms, the other 80% market has completly ignored it.

shmerl 2 days ago | parent | prev [-]

This comment is just a bunch of bunk, but regardless, Vulkan is the only thing that's a collaborative effort, whether it's a mess or not. NIH proponents have nothing to offer as an alternative.

pjmlp 2 days ago | parent [-]

Market and tooling, industry has usually ignored Khronos APIs when multiple APIs are available to chose from, e.g. Nintendo Switch.

soulbadguy 2 days ago | parent | prev [-]

And most of the standard we have now starts with something similar to NIH. Vulkan itself is an offshoot of mantel from AMD. There are valid reason to have a custom api. Especially in domain like game console with hardware with long release cycle, tight performance requirement and legacy (ps4) code to support.

shmerl 2 days ago | parent [-]

Good, but if it's actually a standard - that's the benefit. If it's not - it's just NIH as in lock-in.