top | item 42509831

(no title)

dylanowen | 1 year ago

People have already mentioned Metal, but if you want cross platform, https://github.com/gfx-rs/wgpu has a vulkan-like API and cross compiles to all the various GPU frameworks. I believe it uses https://github.com/KhronosGroup/MoltenVK to run on Macs. You can also see the metal shader transpilation results for debugging.

discuss

order

rudedogg|1 year ago

With what the OP asked for, I don't think wgpu is the right choice. They want to push the limits of Apple Silicon, or do Apple platform specific work, so an abstraction layer like wgpu is going in the opposite direction in my opinion.

Metal, and Apple's docs are the place to start.

PittleyDunkin|1 year ago

Indeed. I'm curious how much overhead there is in practice given the fact that the hardware wasn't designed to provide vulkan support. I honestly have no clue what to expect.

grovesNL|1 year ago

wgpu has its own Metal backend that most people use by default (not MoltenVK).

There is also a Vulkan backend if you want to run Vulkan through MoltenVK though.

dylanowen|1 year ago

Oh good to know! It's been a while since I've looked at the osx implementation

tehsauce|1 year ago

the metal backend does currently generate quite a lot of unnecessary command buffers, but in general performance seems solid.