Given the comparable performance of OpenGL and Metal on the same hardware I was under the impression that is how Apple had been implementing OpenGL for quite a while.
OpenGL on Apple GPUs is implemented on top of Metal with some private extensions to be closer to OpenGL behaviour. Making things work performantly on top of regular Metal is quite a bit harder.
> Comparing traces, the render pass "OpenGL mode" sets an unknown bit in this kernel-processed block. If we set the same bit in our OpenGL driver, we find the clip space changes to -1/1.
In practice this is sufficient for the overwhelming majority of apps. Apple never went past GL 4.1 on the desktop side, and doesn't support most of the interesting desktop-only features (tessellation and geometry shaders, mostly), so ES 3.1 targets desktop macOS fairly cleanly.
Given the comparable performance of OpenGL and Metal on the same hardware I was under the impression that is how Apple had been implementing OpenGL for quite a while.
OpenGL on Apple GPUs is implemented on top of Metal with some private extensions to be closer to OpenGL behaviour. Making things work performantly on top of regular Metal is quite a bit harder.
Not sure why this is downvoted, it's true: https://rosenzweig.io/blog/asahi-gpu-part-6.html
> Comparing traces, the render pass "OpenGL mode" sets an unknown bit in this kernel-processed block. If we set the same bit in our OpenGL driver, we find the clip space changes to -1/1.
ANGLE already does that: https://chromium.googlesource.com/angle/angle
Isn't https://github.com/google/angle just that?
Edit: I guess no, Angle is OpenGL ES. My bad.
> Angle is OpenGL ES
In practice this is sufficient for the overwhelming majority of apps. Apple never went past GL 4.1 on the desktop side, and doesn't support most of the interesting desktop-only features (tessellation and geometry shaders, mostly), so ES 3.1 targets desktop macOS fairly cleanly.