[Piglit] [PATCH 00/14] Add support for using Waffle in place of GLUT

Anuj Phogat anuj.phogat at gmail.com
Tue May 22 13:03:24 PDT 2012


On Mon, May 21, 2012 at 11:15 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> This series adds a new CMake option, USE_WAFFLE. If enabled, then Waffle will
> be used in place of GLUT, thus enabling Piglit on Linux to run all tests under
> GLX, X11/EGL, or Wayland. The platform is selected with environment variable
> PIGLIT_PLATFORM={glx,x11_egl,wayland}. (Support for Android, MacOS, and
> Windows are planned, in that order).
>
> If USE_WAFFLE is disabled, then no behavior is changed for GL tests. However,
> Waffle required for the GLES tests after this series. I don't think this is an
> issue, because the GLES tests only worked on Linux anyway.
>
> If you wish to test this series, you can find it on my waffle-v8 branch [1].
> It requires waffle-0.3 [2].
>
> [1] git://people.freedesktop.org/~chadversary/piglit.git ; waffle-v8
> [2] http://people.freedesktop.org/~chadversary/waffle/releases.html
>
> Getting Piglit to use Waffle is the first step in several goals:
>    - Making GLES tests first class citizens in Piglit.
>    - Adding tests for core profiles.
>    - Getting Piglit to run on Android.
> I discussed these goals in more detail in a thread [3] from April.
>
> [3] http://lists.freedesktop.org/archives/piglit/2012-April/002193.html
>
> How this replaces GLUT is that it defines a minimal GLUT clone, glut_waffle,
> that implements the subset of GLUT used by Piglit [see patch 11/14]. I intend
> for glut_waffle to be only transitionary. My hope is that once Waffle matures
> and gains support for all platforms, then libpiglitutil can stop pretending
> that it uses GLUT via glut_waffle and just use Waffle directly. Just a hope.
>
> To test for regressesion, I did a full test run on Sandybridge 1) before this
> patch series, 2) after with USE_WAFFLE=0, and 3) after with USE_WAFFLE=1.
> I didn't find any regressions, but I did have to disable building several
> tests [see patch 07/14] that used quirky GLUT functions that are outside of
> Waffle's intended scope. Functions like glutBitmapCharacter and
> glutSolidSphere. There weren't many of such tests, less than 10, and we can
> repair those later.
>
> Using Waffle does remove an important feature from Piglit, and Waffle should
> remain an experimental build option until the issue is resolved: Waffle has no
> support yet for input. Running tests with -auto works great; non-auto, not so
> much. To workaround this, when a test is run with Waffle in non-auto mode,
> glutMainLoop() sleeps for 20 seconds after glutSwapBuffers in order to
> give the user ample time to view the window [see patch 11/14].
>
Tested this workaround. looks good to me.

> I fully intend to add basic input support to Waffle, but I felt that this
> patch series was mature enough to merge now.
>
> Also today, Pauli posted a patch series related to improving Piglit's GLES and
> EGL support. Our series are mostly independent, but be aware that there may be
> some conflicts.
>
There are conflicts while applying 04/14. I resolved the conflicts by
rebasing my piglit copy to match
your waffle-v8 branch.

> Chad Versace (14):
>  cmake: Add options BUILD_GLES{1,2} tests
>  cmake: Clean up gles{1,2}/CMakeLists.txt
>  cmake: Relocate all GLUT directives into single location
>  tests: Remove glutExtensionSupported
>  cmake: Add module FindWaffle
>  cmake: Add option USE_WAFFLE
>  cmake: If USE_WAFFLE, disable tests that use quirky GLUT functions
>  util: Disable piglit_glx_window_set_no_input when using Waffle
>  util: Factor piglit_framework_fbo code into its own file
>  util: Add a Waffle backend for piglit-framework-fbo.c
>  glut_waffle: Add libglut_waffle
>  piglit: Include glut_waffle.h if USE_WAFFLE is enabled
>  cmake: Use glut_waffle if USE_WAFFLE is enabled
>  util: Fix piglit_glutInit to initilialize GLUT with GL API
>
>  CMakeLists.txt                                     |   14 +
>  cmake/Modules/FindWaffle.cmake                     |   43 ++
>  cmake/target_api/CMakeLists.txt                    |   20 +-
>  cmake/target_api/gl/CMakeLists.txt                 |   14 +-
>  cmake/target_api/gles1/CMakeLists.txt              |   16 +-
>  cmake/target_api/gles2/CMakeLists.txt              |   16 +-
>  src/CMakeLists.txt                                 |    4 +
>  src/glut_waffle/CMakeLists.no_api.txt              |    6 +
>  src/glut_waffle/CMakeLists.txt                     |    1 +
>  src/glut_waffle/README.txt                         |    5 +
>  src/glut_waffle/TODO.txt                           |    2 +
>  src/glut_waffle/glut_waffle.c                      |  436 ++++++++++++++++++++
>  src/glut_waffle/glut_waffle.h                      |   87 ++++
>  src/piglit/glut_wrap.h                             |    8 +-
>  tests/asmparsertest/CMakeLists.gl.txt              |    2 -
>  tests/asmparsertest/asmparsertest.c                |    9 +-
>  tests/bugs/CMakeLists.gl.txt                       |    2 -
>  tests/bugs/crash-texparameter-before-teximage.c    |    4 +-
>  tests/bugs/tex1d-2dborder.c                        |    2 +-
>  tests/egl/CMakeLists.gl.txt                        |    2 -
>  tests/fbo/CMakeLists.gl.txt                        |    8 +-
>  tests/fbo/fbo-3d.c                                 |    2 +-
>  tests/fbo/fbo-formats.h                            |    2 +-
>  tests/fbo/fbo-storage-completeness.c               |    6 +-
>  tests/fbo/fbo-storage-formats.c                    |    6 +-
>  tests/general/CMakeLists.gl.txt                    |    8 +-
>  tests/general/framebuffer-srgb.c                   |    2 +-
>  tests/general/isbufferobj.c                        |    2 +-
>  tests/general/texunits.c                           |    6 +-
>  tests/glean/CMakeLists.gl.txt                      |    2 -
>  tests/glslparsertest/CMakeLists.gl.txt             |    2 -
>  tests/glx/CMakeLists.gl.txt                        |    2 -
>  tests/hiz/CMakeLists.gl.txt                        |    2 -
>  tests/mesa/tests/CMakeLists.gl.txt                 |    2 -
>  tests/mesa/util/CMakeLists.gl.txt                  |    2 -
>  tests/shaders/CMakeLists.gl.txt                    |    2 -
>  tests/shaders/vp-address-02.c                      |    2 +-
>  tests/shaders/vp-address-04.c                      |    2 +-
>  .../CMakeLists.gl.txt                              |    2 -
>  .../arb_blend_func_extended/api/CMakeLists.gl.txt  |    2 -
>  .../execution/CMakeLists.gl.txt                    |    2 -
>  .../spec/arb_color_buffer_float/CMakeLists.gl.txt  |    2 -
>  tests/spec/arb_copy_buffer/CMakeLists.gl.txt       |    2 -
>  tests/spec/arb_debug_output/CMakeLists.gl.txt      |    2 -
>  tests/spec/arb_draw_buffers/CMakeLists.gl.txt      |    2 -
>  .../CMakeLists.gl.txt                              |    2 -
>  .../arb_draw_instanced/execution/CMakeLists.gl.txt |    2 -
>  tests/spec/arb_es2_compatibility/CMakeLists.gl.txt |    2 -
>  tests/spec/arb_fragment_program/CMakeLists.gl.txt  |    2 -
>  .../spec/arb_framebuffer_object/CMakeLists.gl.txt  |    2 -
>  tests/spec/arb_instanced_arrays/CMakeLists.gl.txt  |    2 -
>  tests/spec/arb_map_buffer_range/CMakeLists.gl.txt  |    2 -
>  tests/spec/arb_multisample/CMakeLists.gl.txt       |    2 -
>  tests/spec/arb_robustness/CMakeLists.gl.txt        |    2 -
>  tests/spec/arb_sampler_objects/CMakeLists.gl.txt   |    2 -
>  tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt |    2 -
>  tests/spec/arb_shader_objects/CMakeLists.gl.txt    |    2 -
>  .../execution/CMakeLists.gl.txt                    |    2 -
>  .../arb_texture_buffer_object/CMakeLists.gl.txt    |    2 -
>  .../spec/arb_texture_compression/CMakeLists.gl.txt |    2 -
>  tests/spec/arb_texture_float/CMakeLists.gl.txt     |    2 -
>  tests/spec/arb_texture_storage/CMakeLists.gl.txt   |    2 -
>  .../spec/arb_transform_feedback2/CMakeLists.gl.txt |    2 -
>  .../arb_uniform_buffer_object/CMakeLists.gl.txt    |    2 -
>  .../arb_vertex_buffer_object/CMakeLists.gl.txt     |    2 -
>  tests/spec/arb_vertex_program/CMakeLists.gl.txt    |    2 -
>  .../CMakeLists.gl.txt                              |    2 -
>  tests/spec/ati_draw_buffers/CMakeLists.gl.txt      |    2 -
>  tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt    |    2 -
>  tests/spec/ext_fog_coord/CMakeLists.gl.txt         |    2 -
>  .../ext_framebuffer_multisample/CMakeLists.gl.txt  |    2 -
>  .../ext_packed_depth_stencil/CMakeLists.gl.txt     |    2 -
>  tests/spec/ext_packed_float/CMakeLists.gl.txt      |    2 -
>  tests/spec/ext_texture_array/CMakeLists.gl.txt     |    2 -
>  tests/spec/ext_texture_integer/CMakeLists.gl.txt   |    2 -
>  tests/spec/ext_timer_query/CMakeLists.gl.txt       |    2 -
>  .../spec/ext_transform_feedback/CMakeLists.gl.txt  |    2 -
>  tests/spec/gl-2.0/CMakeLists.gl.txt                |    2 -
>  tests/spec/gl-2.0/api/CMakeLists.gl.txt            |    2 -
>  tests/spec/gl-2.1/CMakeLists.gl.txt                |    2 -
>  tests/spec/gl-3.0/CMakeLists.gl.txt                |    2 -
>  tests/spec/gl-3.0/api/CMakeLists.gl.txt            |    2 -
>  tests/spec/gl-3.1/CMakeLists.gl.txt                |    2 -
>  .../glsl-1.10/execution/clipping/CMakeLists.gl.txt |    2 -
>  tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt   |    2 -
>  tests/spec/glsl-1.30/CMakeLists.gl.txt             |    2 -
>  tests/spec/glsl-1.30/execution/CMakeLists.gl.txt   |    2 -
>  .../glsl-1.30/execution/clipping/CMakeLists.gl.txt |    2 -
>  .../glsl-1.30/linker/clipping/CMakeLists.gl.txt    |    2 -
>  tests/spec/glsl-1.40/CMakeLists.gl.txt             |    2 -
>  .../spec/glx_arb_create_context/CMakeLists.gl.txt  |    2 -
>  .../spec/glx_ext_import_context/CMakeLists.gl.txt  |    2 -
>  tests/spec/nv_conditional_render/CMakeLists.gl.txt |    2 -
>  tests/spec/nv_texture_barrier/CMakeLists.gl.txt    |    2 -
>  tests/texturing/CMakeLists.gl.txt                  |   12 +-
>  tests/texturing/array-texture.c                    |    2 +-
>  tests/texturing/crossbar.c                         |   10 +-
>  tests/texturing/shaders/CMakeLists.gl.txt          |    2 -
>  tests/texturing/tex-srgb.c                         |    2 +-
>  tests/texturing/texdepth.c                         |    6 +-
>  tests/util/CMakeLists.gl.txt                       |    5 +-
>  tests/util/CMakeLists.gles1.txt                    |    6 +
>  tests/util/CMakeLists.gles2.txt                    |    6 +
>  tests/util/CMakeLists.txt                          |    1 +
>  tests/util/piglit-framework-fbo.c                  |  331 +++++++++++++++
>  tests/util/piglit-framework-fbo.h                  |   29 ++
>  tests/util/piglit-framework.c                      |  130 +-----
>  tests/util/piglit-glx-util.c                       |    6 +
>  tests/util/piglit-util.c                           |   20 +-
>  109 files changed, 1085 insertions(+), 348 deletions(-)
>  create mode 100644 cmake/Modules/FindWaffle.cmake
>  create mode 100644 src/glut_waffle/CMakeLists.no_api.txt
>  create mode 100644 src/glut_waffle/CMakeLists.txt
>  create mode 100644 src/glut_waffle/README.txt
>  create mode 100644 src/glut_waffle/TODO.txt
>  create mode 100644 src/glut_waffle/glut_waffle.c
>  create mode 100644 src/glut_waffle/glut_waffle.h
>  create mode 100644 tests/util/piglit-framework-fbo.c
>  create mode 100644 tests/util/piglit-framework-fbo.h
>
> --
> 1.7.10.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

I have the same comment in patch 01 as made by Jordan.
Otherwise this series is Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list