I965g

641 views
582 views

Published on

1 Comment
2 Likes
Statistics
Notes
  • Cute baby and awesome article .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
641
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
15
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

I965g

  1. 1. i965g - DRAFT Chia-I Wu olv@lunarg.com Feb 14, 2013Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 1 / 25
  2. 2. OverviewWhen is it developed? when the baby naps: 30 to 60 minutes a time, two times a day to work on something bigger: use the sleeping hours the progress is slow Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 2 / 25
  3. 3. OverviewWhen is it developed? Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 3 / 25
  4. 4. OverviewWhen is it developed? Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 4 / 25
  5. 5. OverviewHow is the quality? rely solely on Piglit for testing the skeleton is kept solid the details are ugly sometimes duplicated code long functions deep nested loops Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 5 / 25
  6. 6. OverviewCurrent Status at OpenGL 2.1 to have OpenGL 3.0, GL EXT transform feedback (almost done) MSAA OpenGL 3.1 (the latest version supported by Mesa) primitive restart instanced drawing texture buffer objects uniform buffer objects these are small in terms of changes needed in i965g pipe driver Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 6 / 25
  7. 7. Linux GraphicsGraphics Drivers on Linux DRM driver mode setting buffer allocation command submission synchronization ... a user space library to communicate with the DRM driver Xorg video driver OpenGL driver Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 7 / 25
  8. 8. Linux GraphicsOpenGL drivers GLX equivalent to WGL on Windows dlopen() DRI drivers the trend is to replace it with EGL glapi provide GL entrypoints that can jump into the DRI driver glXGetProcAddress() (or eglGetProcAddress()) DRI driver Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 8 / 25
  9. 9. Linux GraphicsDRI drivers core mesa common code shared by all drivers set GL error as required by the spec context state bookkeeping emulate non-HW features (display list, vertex specificaion, and etc.) many more GLSL frontend HW-specific driver code Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 9 / 25
  10. 10. Linux Graphicsi965g i965g replaces only the HW-specific driver code not the DRM driver not the Xorg video driver not the GLSL frontend nor mesa core in the DRI driver Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 10 / 25
  11. 11. Linux Graphicsi965g: components mesa state tracker translate OpenGL states/commands/shaders to pipe states, functions, and TGSI DRI state tracker implement DRI driver model i965g pipe driver and winsys Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 11 / 25
  12. 12. Linux Graphicsi965g: winsys and pipe driver winsys is the OS-dependent part pipe driver is the OS-independent part all window system dependencies are handled in GLX Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 12 / 25
  13. 13. i965gState TrackersA state tracker implements an well-defined API using a pipe driver. It tracks the statesdefined and manipulated by the API, and translates them to pipe states. mesa state tracker implements OpenGL 3.1 vega state tracker implements OpenVG 1.1 clover state tracker implements OpenCL 1.1 xorg state tracker implements Xorg video driver model Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 13 / 25
  14. 14. i965gPipe StatesState trackers translate API states to pipe states, which are defined by C structs. Forexample, the blend pipe state, Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 14 / 25
  15. 15. i965gPipe States, cont’d Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 15 / 25
  16. 16. i965gPipe States, cont’dSome translations are less trivial Each shader is translated into assembly-like TGSI instructions For each GL texture unit used in a shader, a pipe sampler state and a pipe sampler view are created Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 16 / 25
  17. 17. i965gPipe States, cont’dPipe states are defined in a way such that they are close to what the GPUs expect pipe drivers can handle them easily and efficiently pipe drivers do not need to know anything about state trackers and the APIs they support Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 17 / 25
  18. 18. i965gi965g pipe driver resource (texture/buffer) allocation sync/query objects blitter TGSI compiler state emissionMost functions are independent. The one that connects all together is how HW statesare emitted. Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 18 / 25
  19. 19. i965gState EmissionWhen a pipe state is changed, remember the new state (simple C struct) and mark itdirty. Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 19 / 25
  20. 20. i965gState Emission, cont’dJust before drawing anything, call i965 finalize states() to resolve non-orthogonal pipe states, potentially marking more pipe states dirty emit all HW states that are affected by the dirty pipe states Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 20 / 25
  21. 21. i965gState Emission, cont’di965 3d, the 3D pipeline, knows which pipe states affect which HW states. It checks thedirty flags and decide which HW states need to be emitted.For example, Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 21 / 25
  22. 22. i965gState Emission, cont’di965 gpe, the GPE (Graphics Processing Engine), is in charge of adding the HW state orcommand to the command parser. Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 22 / 25
  23. 23. i965gState Emission, cont’di965 cp, the command parser, will send the commands to GPU for execution when itsbuffer is full or when the state trackers ask the pipe driver to flush. Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 23 / 25
  24. 24. i965gFuture Directions GEN7+ support OpenCL 1.1 support support OpenGL 3.0 and 3.1 pick an application for performance tuning Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 24 / 25
  25. 25. i965gLinksFor i965g, https://github.com/olvaffe/mesa/tree/i965g-nextFor information about the kernel driver, http://blog.ffwll.ch/2012/10/i915gem-crashcourse.htmlFor information about the 2D driver, http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/ Chia-I Wu (olv@lunarg.com) i965g - DRAFT Feb 14, 2013 25 / 25

×