waffle

Waffle
Chad Versace
XDC 2012, 

- Problems in testing Mesa

    - Piglit is Mesa's testsuite for OpenGL, OpenCL, EGL, and GLX.

    - (We'll restrict our attention to the GL tests in this talk).

    - Problem Descriptions

        - GLUT

            - (We'll mainly focus on fixing the GLUT problem in this talk).

            - Piglit uses GLUT for GL tests.

            - GLUT is no longer sufficient.

            - On Linux, GLUT supports only GLX and legacy GL contexts.

            - Unwelcome consequences:

                ! Impossible to write Piglit tests for GL core profile.

                ! Piglit contains nearly no GLES tests.

                - Piglit GL tests do not run on X/EGL, Wayland, Android.

        - GLEW

            - Piglit uses GLEW for wrangling GL extensions and dynamic function resolution (dlsym, glXGetProcAddress).

            - GLEW is no longer sufficient.

            - GLEW does not manage GL >= 3.0 well.

            ! GLEW does not support GLES, and cannot easily be extended.
            

    - Solution

        - Qualities of an ideal solution:

            1. Able to build each test once, then run it on any Linux window
               system (GLX, X/EGL, Wayland).

            2. Able to multiplex some tests over GL API's.

                - That is, for a subset of tests, build each test once, then run
                  it under each of GL, GLES2, GLES3, etc.

                - I'm not aware of anyone attemtping this before.

            3. Beneficial to projects other than Piglit.

                - Requires implementing the solution in a Piglit-independent library.

    - Status

        - Solution for #1 is complete, uses libwaffle.

        - Solution for #2 is under development.

        - Support for GL core profile tests arriving before mid-October.

- Waffle

    - Description (What does it do today?)

        - A cross-platform C library that allows GL applications to defer choice
          of window system until runtime.

        - Its API closely resembles EGL.

        - Contains additional functions...

            - for window creation.

            - for dlsym'ing libGL, libGLES1, libGLES2 in a cross-platform way.

            - for getting at the underlying native objects.

                - This allows clients to implement behavior, such as input, that
                  is outside of Waffle's scope.

    - Supported platforms:

        - Linux: GLX, X/EGL, Wayland (complete)
        - Android (experimental)
        - Apple (experimental)
        - No MS Windows yet

    - Demo

    - Focus and Purpose

        - Waffle is not GLUT, is not SDL.

        - (see video)

    - Examples

        - Simple GL rendering:

            - http://people.freedesktop.org/~chadversary/waffle/examples/simple-x11-egl.html
    
        - Getting at native objects:

            // Assume we've initialized the Waffle with X/EGL.
            struct waffle_window *window = waffle_window_create(...);
            struct waffle_x11_egl_window *n_window = waffle_window_get_native(window)->x11_egl;

            Display *xlib_dpy = n_window->display.xlib_display;
            EGLDisplay *egl_dpy = n_window->display.egl_display;
            Window xlib_window = n_window->xlib_window;
            EGLSurface egl_surface = n_window->egl_surface;

    - Future Direction

        - KMS backend with libgbm.

            - Will allow testing Piglit on headless servers in QA infrastructure.

            - On new Intel hardware, will allow Intel Linux OpenGL team to
              test GL drivers on new hardware before the display is fully
              working.

        - GL dispatch

            - A dynamic dispatch mechanism for all GL API's that handles GL extensions.

            - A modern replacement for GLEW.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值