3 ms·
If you want to implement an OpenFX [1] effect properly you have to write its core four times: - A CUDA implementation, if the host uses CUDA - A Metal impleme
by formerly_proven 6y ago
If you want to implement an OpenFX [1] effect properly you have to write its core four times:
- A CUDA implementation, if the host uses CUDA
- A Metal implementation, for Apple
- An OpenCL implementation
- A fallback CPU-based implementation
- You don't need a DirectCompute implementation, because thankfully no one is idiotic enough to use it.
- You don't need a Vulkan implementation, because no one is doing compute on Vulkan (afaik).
The state of graphics and compute APIs is utter insanity. Especially Apple can go fuck off and die with their extremely moronic move of introducing OpenCL as an open standard in '09 and then presenting Metal as their closed API in '14, moving against OpenCL, OpenGL and Vulkan. nVidia at least has the excuse they were first to market with CUDA (and it's easier to program), and they stuck to it.
[1] THE standard for video effects, think "VST, but better and for video".
- zozbot234 6y ago> The state of graphics and compute APIs is utter insanity. It looks like Vulkan is going to be the best-supported common platform for compute, at least for modern hardware. They need compute in the standard to support the core graphics use case anyway, so we might as well use that same support for general-purpose tasks. On Apple platforms, MoltenVk can implement Vulkan support on top of Metal
- quikoa 6y agoYes, a common GPU compute platform would be great! Even if Apple isn't going to support it being able to handle all of it in Vulkan would be nice. Maybe OpenCL can be implemented on top of that.
- pjmlp 6y agoThat would be SYSCL with pluggable backends, as they also decided to move beyond OpenCL.
- pjmlp 6y agoBecause Khronos did not want to move OpenCL beyond an anemic C API, it was only the beating taken from CUDA that made them come up with SPIR, and for what OpenCL 3.0 is the admission of defeat. By the way, Google also completely ignored OpenCL and came up with its own Renderscript dialect instead.
- Const-me 6y agoHave you seen this? http://diligentgraphics.com/diligent-engine/ http://diligentgraphics.com/diligent-engine/ I have not tested on Apple, but I did on ARM Linux. Their HLSL to GLES GLSL translation worked OK for my purposes. In the documentation they say they support most of them for both graphics and compute, VK and Metal included.
- dagmx 6y agoOpenCL was also killed off by fractured support among vendors, especially nVidia who wanted to push CUDA. Now arguably CUDA is the better API/platform but so too is Metal versus OpenCL WebGPU has compute I believe (or hopefully will) so could theoretically act as a good common API that isn’t controlled by a single vendors whims
- pjmlp 6y agoAMD and Intel also don't have much love for it, as they rather push their own stacks that build on top of it, or complement it in some way.