I have an multiple render-backend application on MacOS,so I can compare the performance between Metal and OpenGL about OffscreenRender.
I found that, when I do not use MSAA,metal perform better.But when I open MSAA,especially at Large-texture,such as 3840x1920, metal seems slower.
Then I simplify the render-pass, no draw call, seems it's the clear of texture was the difference of Metal and OpenGL, I'm not sure.
-
in OpenGL,I use
glClearBufferfv; -
in Metal, I set
colorAttachments.loadAction=MTLLoadActionClear(I tried enalbe or disable tripple-buffering); -
Then I close the clear-action both on OpenGL and Metal,render-pass time of openGL reduce about 3ms ,Metal reduce about 8ms, Is that mean Metal take more time to clear texture?
-
How can I resolve with such problem? (because I need clear-action) @Apple
Device: Mac-mini-2018 Xcode: Xcode13.0
Here is the metal instrument screen-shot(idle of GPU seems too long,about 50ms):