gallium3d
play

Gallium3D Graphics Done Right Zack Rusin zack@tungstengraphics.com - PowerPoint PPT Presentation

Gallium3D Graphics Done Right Zack Rusin zack@tungstengraphics.com Contents Recap Gallium3D General summary Why would you want to use it. Gallium3D latest changes T aking request (no singing) Zack Rusin


  1. Gallium3D Graphics Done Right Zack Rusin zack@tungstengraphics.com

  2. Contents ● Recap – Gallium3D ● General summary ● Why would you want to use it. ● Gallium3D latest changes ● T aking request (no singing) Zack Rusin zack@tungstengraphics.com

  3. DRI Driver Model drm App Mesa DRI Driver DRI ● Drivers were tied to OS, API, window system. ● EG, dealing with DRI cliprects in DrawArrays. ● Driver interface becoming unmanageable. Zack Rusin zack@tungstengraphics.com

  4. DRI Driver Model Zack Rusin zack@tungstengraphics.com

  5. Graphics Pipeline ● Essentially the same for all modern API's Zack Rusin zack@tungstengraphics.com

  6. Impose new interfaces drm App Mesa DRI Driver DRI ● Isolate interactions with API, OS, HW. ● Identify new interfaces. ● Split the driver. Zack Rusin zack@tungstengraphics.com

  7. Gallium in 2007 drm Gallium State OS, App Mesa HW tracker Winsys Driver DRI ● The original plan for Gallium3D. ● Still more or less correct. Zack Rusin zack@tungstengraphics.com

  8. Since then... ● Rapid interface evolution ● Hopefully starting to stabilize, but there are still some minor issues outstanding. ● On the horizon: simplify TGSI shader representation ● Changes in the draw module ● New insights into fallbacks, driver structure. ● New utility code Zack Rusin zack@tungstengraphics.com

  9. Since then... ● Got some hardware drivers working – I915 (updated to head) – softpipe – Cell driver – i965 ● External driver projects: – Nouveau – R300 work Zack Rusin zack@tungstengraphics.com

  10. Building blocks ● Gallium3D at its core is just an interface ● The actual functionality is split across different modules – Those modules can be mix-and-matched to produce a complete solution Zack Rusin zack@tungstengraphics.com

  11. Building blocks ● Important modules within the framework include: – State trackers ● Implement API on top of Gallium3D – Winsys ● Integration with a windowing system, low level management (surfaces, buffers and fencing) – Gallium3D driver ● Implements the Gallium3D interface Zack Rusin zack@tungstengraphics.com

  12. Building blocks ● Important modules within the framework include: – Draw ● Software vertex paths – CSO ● constant state objects management – Buffers management code – TGSI code – LLVM integration – A few others (sct, util) Zack Rusin zack@tungstengraphics.com

  13. Software Rasterizer State any App Mesa softpipe tracker winsys X ● Codegen through LLVM and simple rtasm. ● A fairly clear path to performance. ● A good project for someone? Zack Rusin zack@tungstengraphics.com

  14. Hardware: i915 i915 drm State intel App Mesa i915 tracker winsys DRI ● Updated to the latest DRM changes. ● Near term goal: Rebase to X, DRM head. ● Later: DRI2, Polish, Performance... Zack Rusin zack@tungstengraphics.com

  15. It works on Windows DD DX9 XP/DX9 XP App State i915 Runtime winsys tracker HW ● This is actually working. ● Validates the portability claims for Gallium. Zack Rusin zack@tungstengraphics.com

  16. ...It'll work anywhere Your OS Your Your Graphics App i915 Winsys API HERE HERE Your WM ● DirectFB, VxWorks, Kdrive, GLES, Cellphones, Robots, FreeBSD, MiniGLX, EGL, Clusters, etc. ● Wider audience --> better drivers. Zack Rusin zack@tungstengraphics.com

  17. You don't even need hardware... State Simulator App Mesa i965simple a file tracker Winsys ● A nice way to work on hardware you don't actually have available. ● Easy to capture, analyze dumps offline. ● TODO: Replay Zack Rusin zack@tungstengraphics.com

  18. Shaders ● At the very core of Gallium3D ● TGSI used throughout – Drivers can either: ● Use TGSI directly ● Employ LLVM code-generation facilities Zack Rusin zack@tungstengraphics.com

  19. LLVM ● TGSI compiled into LLVM IR ● LLVM optimization passes used ● Drivers implement LLVM code-generator Zack Rusin zack@tungstengraphics.com

  20. Winsys issues i915 drm State intel App Mesa i915 tracker winsys DRI ● GLX implemented by DRI + the Winsys layer ● Swapbuffers, create surface, etc, seem to bypass this nice stack. Zack Rusin zack@tungstengraphics.com

  21. Winsys issues ● Neat diagram above ignores non-drawing aspects of the driver. ● There is real complexity here: – Surface allocation – happens before context creation – GL extensions – need to know (approximately) before context creation. – Swapbuffers ● Currently winsys is splitting into two entities: per-screen and per-context. ● May end up with a parallel stack, ie: Zack Rusin zack@tungstengraphics.com

  22. What's in a winsys? HW State GL Context context tracker App i915 drm HW info GLX Screen DRI ● Orange components... A lot of interfaces... ● Small piece of code, but complex. ● SOON: Split it up for a clearer stack. Zack Rusin zack@tungstengraphics.com

  23. New diagram Zack Rusin zack@tungstengraphics.com

  24. Summary ● We're getting there. ● Interface churn should start to slow down, but some pain still to come. ● Focus to shift: – Performance – Conformance & correctness – Stabilization Zack Rusin zack@tungstengraphics.com

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend