如何加強 OpenGL 的繪圖效率


這篇文章是參考 Geeks3D 的《How to Increase the Number of Draw Calls in OpenGL》一文。

會有這篇文章,主要是因為 AMD 在日前推出了名為「AMD Mantle」(官網)的新的繪圖 API,他和一般普遍使用 Direct 3D、OpenGL 這類跨硬體的 API 不同的地方在於,AMD Mantle 是針對自家的 Radeon GPU 做設計的,所以在自家的顯示卡上,會有更好的效能(draw call 數目)!(參考《AMD Mantle: First Interesting Slides and Details, Target: 100K Draw Calls per Frame》)

而由於它號稱的效能增進相當地顯著,就有人提出來,其實透過 NVIDIA 的 OpenGL Extension,也可以到達類似的效能增進!NVIDIA 的這份投影片標題是《Beyond porting》,作者是 NVIDIA 的 John McDonald 和 Cass Everitt 在 slide share 上可以看到(連結),內容重點,就是「新的 OpenGL 如何減少驅動程式的 overhead」(How modern OpenGL can radically reduce driver overhead)下面就是投影片的內容:

投影片的內容主要分成三部分,包括了「Dynamic Buffer Generation」、「Efficient Texture Management」和「Increasing Draw Call Count」。

而 Geeks3D 整理的簡單結論,就是:

the combined use of GL_ARB_buffer_storage + Bindless / sparse textures + shared UBOs (uniform buffer object) + GL_ARB_multi_draw_indirect can help to increase the draw call count

如果有在寫 OpenGL 程式的話,這個應該是值得參考看看的。

對「如何加強 OpenGL 的繪圖效率」的想法

發表留言

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料