A Little 3D -- Implement New Hardware Accelerated OpenGL for Android

3,788 views
3,673 views

Published on

(COSCUP 2009) olv talked about the internals inside Android OpenGL|ES stack and how to implement a new hardware accelerated GL|ES for Android. The reference hardware is Intel Integrated Graphics chip, and software stack is based on Mesa3D.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,788
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
213
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

A Little 3D -- Implement New Hardware Accelerated OpenGL for Android

  1. 1. 關於我 libEGL and libGLESv1 CM GEM and KMS Android Wave Is Not Google Wave A little 3D Chia-I Wu olv@0xlab.org Aug 16, 2009 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  2. 2. 關於我 libEGL and libGLESv1 CM GEM and KMS Outline 關於我 libEGL and libGLESv1 CM libagl libhgl GEM and KMS Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  3. 3. 關於我 libEGL and libGLESv1 CM GEM and KMS 3D and Me 不會OpenGL 不會演算法 不會硬體 不會驅動程式 沒有在玩3D 遊戲 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  4. 4. 關於我 libEGL and libGLESv1 CM GEM and KMS Who am I? 0xlab 成員 數學系畢業 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  5. 5. 關於我 libEGL and libGLESv1 CM GEM and KMS Hurry Porter 把Intel DRI 驅動程式移植到Android Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  6. 6. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS Outline 關於我 libEGL and libGLESv1 CM libagl libhgl GEM and KMS Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  7. 7. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS libGLESv1 CM frameworks/base/opengl/libs/GLES CM/ OpenGL ES API Entry points void glClear ( void ) { gl hooks t : : g l t const ∗ const c = &g e t G l T h r e a d S p e c i f i c ()−> g l ; r e t u r n c −>g l C l e a r ( ) ; } Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  8. 8. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS libEGL frameworks/base/opengl/libs/EGL/ dlopen libagl 跟libhgl libagl 提供軟體實作 libhgl 提供硬體實作 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  9. 9. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 身為libhgl Android 傳過來的是egl native window t Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  10. 10. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 身為libhgl Android 傳過來的是egl native window t egl native window t 是EGLNativeWindowSurface Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  11. 11. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 身為libhgl Android 傳過來的是egl native window t egl native window t 是EGLNativeWindowSurface EGLNativeWindowSurface 是Surface Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  12. 12. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 身為libhgl Android 傳過來的是egl native window t egl native window t 是EGLNativeWindowSurface EGLNativeWindowSurface 是Surface Surface 是... Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  13. 13. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS Surface Surface 是buffer Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  14. 14. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  15. 15. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer 放座標 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  16. 16. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer 放座標 放材質 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  17. 17. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer 放座標 放材質 放shader Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  18. 18. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer 放座標 放材質 放shader 放硬體指令 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  19. 19. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體 硬體要的也是buffer 放座標 放材質 放shader 放硬體指令 但是... Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  20. 20. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS 硬體限制 硬體要的是它能存取的buffer Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  21. 21. 關於我 libagl libEGL and libGLESv1 CM libhgl GEM and KMS Intel a.k.a GEM Object 讓Android 產生GEM object based Surface Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  22. 22. 關於我 libEGL and libGLESv1 CM GEM and KMS Outline 關於我 libEGL and libGLESv1 CM libagl libhgl GEM and KMS Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  23. 23. 關於我 libEGL and libGLESv1 CM GEM and KMS GEM in CPU GEM object 只是shared memory (man shmget(2)) X server 配置 應用程式繪圖 compiz 合成 跨process! Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  24. 24. 關於我 libEGL and libGLESv1 CM GEM and KMS GEM in GPU 映射到AGP aperture CPU cache GPU cache Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  25. 25. 關於我 libEGL and libGLESv1 CM GEM and KMS KMS Kernel Mode Setting 叫kernel 做解晰度設定 Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  26. 26. 關於我 libEGL and libGLESv1 CM GEM and KMS KMS i n t drmModeSetCrtc ( i n t fd , uint32 t crtcId , uint32 t bufferId , uint32 t x , uint32 t y , u i n t 3 2 t ∗ c o n n e c t o r s , i n t count , drmModeModeInfoPtr mode ) ; Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  27. 27. 關於我 libEGL and libGLESv1 CM GEM and KMS gitorious http://gitorious.org/android-eeepc/pages/Home Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D
  28. 28. 關於我 libEGL and libGLESv1 CM GEM and KMS Q&A Questions? Chia-I Wu olv@0xlab.org Android Wave Is Not Google Wave A little 3D

×