4 ms·
> Tessellation enables games like The Witcher 3 to generate geometry. The M1 has hardware tessellation, but it is too limited for DirectX, Vulkan, or OpenGL. We
by Wowfunhappy 2y ago
> Tessellation enables games like The Witcher 3 to generate geometry. The M1 has hardware tessellation, but it is too limited for DirectX, Vulkan, or OpenGL. We must instead tessellate with arcane compute shaders
> Geometry shaders are an older, cruder method to generate geometry. Like tessellation, the M1 lacks geometry shader hardware so we emulate with compute.
Is this potentially a part of why Apple doesn't want to support Vulkan themselves? Because they don't want to implement common Vulkan features in hardware, which leads to less than ideal performance?
(I realize performance is still relatively fast in practice, which is awesome!)
- mandarax8 2y agoGeometry shaders are not part of base Vulkan. They're an extension.
- ornitorrincos 2y agothey are not an extension, they are part of core 1.0 vulkan. Although its true that they are an optional feature (as is tessellation).
- VHRanger 2y ago> Is this potentially a part of why Apple doesn't want to support Vulkan? Because they don't want to implement common Vulkan features in hardware, which leads to less than ideal performance? Yes, it's a big reason. I tried to port the yuzu switch emulator to macos a few years ago, and you end up having to write compute shaders that emulate the geometry shaders to make that work. Even fairly modern games like Mario Odyssey use geometry shaders. Needless to say, I was not enough of a wizard to make this happen!
- miohtama 2y agoWhy Apple does not just implement it? They have more resources than anyone in the world. Patents?
- kelnos 2y agoBecause they don't care. They've decided that Metal is The One True Way to write 3D-accelerated apps on macOS, so they only implement the things in hardware that Metal requires.
- Wowfunhappy 2y agoMaybe, but we got here because I asked "is it possible that Apple doesn't want to support Vulkan (in software) because they don't want to support the features it needs (in hardware)." If the reason they don't support it in hardware is because they don't want to support it in software, then the logic gets a bit circular. I'm interested in which came first, or if it's a little of both.
- p_l 2y agoVulkan very much is designed to give flexibility to hardware vendors. Where abstractions do paper over differences it's generally where it makes the abstraction cheap in runtime but you might take more code vs. less code but requiring a feature that would be otherwise optional (for example some of the complex pipeline manipulation Vs bindless)
- wtallis 2y agoThere are definitely some features omitted from Apple's GPU, but fairly early in the reverse engineering process, Alyssa Rosenzweig provided several examples of hardware features present in Apple's GPU that are not exposed by Metal: https://rosenzweig.io/blog/asahi-gpu-part-4.html https://rosenzweig.io/blog/asahi-gpu-part-4.html
- achandlerwhite 2y agoPerhaps, but also geometry shaders are generally losing popularity and on their way out. Per google ai search result (for what it is worth): Geometry shaders are generally considered less necessary in modern graphics pipelines due to the rise of more flexible and efficient alternatives like mesh shaders which can perform similar geometry manipulation tasks with often better performance and more streamlined workflows
- ronsor 2y agoWhy couldn't you just use MoltenVK?
- slimsag 2y agoMoltenVK doesn't support geometry shaders for ~3 years now[0] [0] https://github.com/KhronosGroup/MoltenVK/issues/1524 https://github.com/KhronosGroup/MoltenVK/issues/1524
- mrpippy 2y agoMetal 3 (in 2022) added mesh shaders, which can be used to emulate geometry shaders. We (CodeWeavers) are doing this in (a fork of) MoltenVK, and Apple’s D3DMetal is as well.
- achandlerwhite 2y agoHi, is there a plan to submit these changes back up to MoltenVK?
- mrpippy 2y agoWe would still like the changes to be upstream but they may need more polish, and it spawned a conversation about the division of responsibilities between SPIRV-Cross and MoltenVK: https://github.com/KhronosGroup/SPIRV-Cross/pull/2200 https://github.com/KhronosGroup/SPIRV-Cross/pull/2200 https://github.com/KhronosGroup/SPIRV-Cross/pull/2204 https://github.com/KhronosGroup/SPIRV-Cross/pull/2204
- pmarreck 2y agoThanks for your efforts in this space!
- ribit 2y agoApple not supporting Vulkan is a business decision. They wanted a lean and easy to learn API that they can quickly iterate upon, and they want you to optimize for their hardware. Vulkan does not cater to either of these goals. Interestingly, Apple was on the list of the initial Vulkan backers — but they pulled out at some point before the first version was released. I suppose they saw the API moving in the direction they were not interested in. So far, their strategy has been a mixed bag. They failed to attract substantial developer interest, at the same time they delivered what I consider to be the best general-purpose GPU API around. Regarding programmable tessellation, Apple's approach is mesh shaders. As far as I am aware, they are the only platform that offers standard mesh shader functionality across all devices.
- shmerl 2y agoThat might be an excuse, but that's hardly a reason. They are simply extreme lock-in proponents and don't want to support cross platform graphics API. That's the real reason.
- wtetzner 2y ago> They are simply extreme lock-in proponents and don't want to support cross platform graphics API. Which seems like an ineffective move when you have no market share.
- shmerl 2y agoThey don't seem to care. I'm sure that will bite them in the long term, but for now they are very intent on complete NIH and lock-in anywhere they can push it.