[Piglit] [PATCH v3 00/19] Replace glew with a custom Piglit dispatch mechanism

Paul Berry stereotype441 at gmail.com
Wed Mar 21 09:04:50 PDT 2012


On 21 March 2012 08:57, Paul Berry <stereotype441 at gmail.com> wrote:

> This is version 3 (hopefully the final version) of my attempt to
> replace Piglit's use of GLEW with a home-spun dispatch layer that will
> work with GLES, Wayland, and forward compatible contexts.  (Version 2
> can be found in the email "[PATCH v2 00/13] Replace glew with a custom
> Piglit dispatch mechanism").
>
> I now believe everything works as well as it did before on Linux,
> Windows, and Mac (with the exception of one minor regression on Mac
> that I think is worth deferring--see below).  I have not yet
> implemented support for GLES or Wayland; I'm planning to wait for a
> later patch series to do those.
>
> As with the previous patch series, a few of the patches are too large
> for the mailing list, so I've omitted them.  You can see the whole
> series by pulling from branch "dispatch3" of
> git://github.com/stereotype441/piglit.git.
>
> Note that some of the commits have already been code reviewed, so I'm
> including the "Reviewed-by" comments in the patch emails.
>
> Changes since version 2:
>
> - Code now builds and runs correctly on Windows.  This required
>  carefully choosing the right calling conventions for all the
>  functions.  It also required distinguishing between core GL
>  functions that were introduced in GL 1.0 or GL 1.1 and core
>  functions that were introduced later.  (Only the latter set can be
>  obtained using wglGetProcAddress(); the former set need to be looked
>  up directly in OPENGL32.dll).
>
> - By popular demand, the generated code is no longer checked into git.
>  This patch series now includes the necessary modifications to cmake
>  to ensure that all tests are rebuilt if the generated code ever
>  changes (thanks to Chad Versace for helping me to get this working).
>
> The one minor regression on Mac is that the test
> shaders/gpu_shader4_attribs skips when it should run.  This happens
> because the functions tested by shaders/gpu_shader4_attribs are
> defined in both EXT_gpu_shader4 and NV_vertex_program4 extensions.
> Piglit-dispatch is not yet capable of understanding that a function
> might be defined with the same name in multiple extension specs
> (because it is based on the gl.spec file from www.opengl.org, which
> fails to encode this information).  Fixing this problem should be
> fairly straightforward, but it will take some time, so in the interest
> of forward progress I'd prefer to address it in a future patch series.
>
> Thanks for your patience in reviewing this long-running patch series.
> I believe we are on the home stretch--assuming all goes well, I'm
> hoping to push these patches by the end of the day Friday.
>
> [PATCH v3 01/19] Only define bool in non-C++ builds.
> [PATCH v3 02/19] glean: use piglit-util and initialize GLEW.
> [PATCH v3 03/19] Add glewInit() calls to glx tests.
> [PATCH v3 04/19] Add glewInit() calls to GLX_ARB_create_context tests.
> [PATCH v3 05/19] Fixup APIENTRY macro on Apple
> [PATCH v3 06/19] Remove NVX_gpu_memory_info enums from piglit-util-enum.c
> [PATCH v3 07/19] piglit-dispatch: Introduce OpenGL API spec files.
> [PATCH v3 08/19] piglit-dispatch: Corrections to OpenGL API spec files.
> [PATCH v3 09/19] piglit-dispatch: Additions to OpenGL API spec files.
> [PATCH v3 10/19] piglit-dispatch: Code generation scripts.
> [PATCH v3 11/19] cmake: Move utility functions into piglit_util.cmake
> [PATCH v3 12/19] cmake: Define wrapper functions
> piglit_add_{executable,library}
> [PATCH v3 13/19] cmake: Replace calls to add_{executable,library}
> [PATCH v3 14/19] cmake: Make each *.o depend on generated piglit_dispatch
> headers
> [PATCH v3 15/19] piglit-dispatch: Remaining infrastructure.
> [PATCH v3 16/19] piglit-dispatch: Switch to using piglit-dispatch instead
> of GLEW.
> [PATCH v3 17/19] piglit-dispatch: Remove GLEW.
> [PATCH v3 18/19] Remove GLEW workarounds.
> [PATCH v3 19/19] glean: use piglit_get_proc_address().
>

Argh, patch 13/19 was too large for the mailing list, and bounced.  Here's
the commit message and diffstat:

From: Chad Versace <chad.versace at linux.intel.com>
Date: Tue, 21 Feb 2012 18:23:56 -0800
Subject: [PATCH v3 13/19] cmake: Replace calls to add_{executable,library}
 with wrappers

Replace
    add_executable -> piglit_add_executable
    add_library -> piglit_add_library

For now, each wrapper function trivially wraps the function it replaces,
and so this patch changes no behavior.

This commit was created using the command:

   sed -i -e "s/add_executable/piglit_add_executable/" -e
"s/add_library/piglit_add_library/" $(find src/ tests/ -name "*CMakeLists*")

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 src/glut_egl/CMakeLists.no_api.txt                 |    2 +-
 tests/asmparsertest/CMakeLists.gl.txt              |    2 +-
 tests/bugs/CMakeLists.gl.txt                       |   40 ++--
 tests/egl/CMakeLists.gl.txt                        |    8 +-
 tests/fbo/CMakeLists.gl.txt                        |  140 +++++-----
 tests/general/CMakeLists.gl.txt                    |  188 +++++++-------
 tests/glean/CMakeLists.gl.txt                      |    2 +-
 tests/gles2/CMakeLists.gles2.txt                   |    2 +-
 tests/glslparsertest/CMakeLists.gl.txt             |    2 +-
 tests/glslparsertest/CMakeLists.gles2.txt          |    2 +-
 tests/glx/CMakeLists.gl.txt                        |   60 ++--
 tests/hiz/CMakeLists.gl.txt                        |   50 ++--
 tests/mesa/tests/CMakeLists.gl.txt                 |    2 +-
 tests/mesa/util/CMakeLists.gl.txt                  |    2 +-
 tests/shaders/CMakeLists.gl.txt                    |  286
++++++++++----------
 .../CMakeLists.gl.txt                              |    2 +-
 .../arb_blend_func_extended/api/CMakeLists.gl.txt  |    6 +-
 .../spec/arb_color_buffer_float/CMakeLists.gl.txt  |   16 +-
 tests/spec/arb_copy_buffer/CMakeLists.gl.txt       |   18 +-
 tests/spec/arb_debug_output/CMakeLists.gl.txt      |    2 +-
 tests/spec/arb_draw_buffers/CMakeLists.gl.txt      |    2 +-
 .../CMakeLists.gl.txt                              |    4 +-
 .../arb_draw_instanced/execution/CMakeLists.gl.txt |    8 +-
 tests/spec/arb_es2_compatibility/CMakeLists.gl.txt |   18 +-
 tests/spec/arb_fragment_program/CMakeLists.gl.txt  |    2 +-
 .../spec/arb_framebuffer_object/CMakeLists.gl.txt  |    4 +-
 tests/spec/arb_instanced_arrays/CMakeLists.gl.txt  |    2 +-
 tests/spec/arb_map_buffer_range/CMakeLists.gl.txt  |    4 +-
 tests/spec/arb_multisample/CMakeLists.gl.txt       |    4 +-
 tests/spec/arb_robustness/CMakeLists.gl.txt        |    4 +-
 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    |   10 +-
 .../execution/CMakeLists.gl.txt                    |    2 +-
 .../arb_texture_buffer_object/CMakeLists.gl.txt    |    8 +-
 .../spec/arb_texture_compression/CMakeLists.gl.txt |    4 +-
 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_vertex_buffer_object/CMakeLists.gl.txt     |    4 +-
 tests/spec/arb_vertex_program/CMakeLists.gl.txt    |    6 +-
 .../CMakeLists.gl.txt                              |    2 +-
 tests/spec/ati_draw_buffers/CMakeLists.gl.txt      |    6 +-
 tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt    |    2 +-
 tests/spec/ext_fog_coord/CMakeLists.gl.txt         |    2 +-
 .../ext_framebuffer_multisample/CMakeLists.gl.txt  |   20 +-
 .../ext_packed_depth_stencil/CMakeLists.gl.txt     |    2 +-
 tests/spec/ext_packed_float/CMakeLists.gl.txt      |    4 +-
 tests/spec/ext_texture_array/CMakeLists.gl.txt     |    2 +-
 tests/spec/ext_texture_integer/CMakeLists.gl.txt   |   16 +-
 tests/spec/ext_timer_query/CMakeLists.gl.txt       |    2 +-
 .../spec/ext_transform_feedback/CMakeLists.gl.txt  |   44 ++--
 tests/spec/gl-2.0/CMakeLists.gl.txt                |    2 +-
 tests/spec/gl-2.0/api/CMakeLists.gl.txt            |    4 +-
 tests/spec/gl-2.1/CMakeLists.gl.txt                |    2 +-
 tests/spec/gl-3.0/CMakeLists.gl.txt                |    8 +-
 tests/spec/gl-3.0/api/CMakeLists.gl.txt            |   22 +-
 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   |   12 +-
 .../glsl-1.30/execution/clipping/CMakeLists.gl.txt |    2 +-
 .../glsl-1.30/linker/clipping/CMakeLists.gl.txt    |    2 +-
 .../spec/glx_arb_create_context/CMakeLists.gl.txt  |   22 +-
 .../spec/glx_ext_import_context/CMakeLists.gl.txt  |   18 +-
 tests/spec/nv_conditional_render/CMakeLists.gl.txt |   24 +-
 tests/spec/nv_texture_barrier/CMakeLists.gl.txt    |    2 +-
 .../CMakeLists.gles1.txt                           |    2 +-
 .../CMakeLists.gles1.txt                           |    2 +-
 tests/spec/oes_draw_texture/CMakeLists.gles1.txt   |    2 +-
 tests/texturing/CMakeLists.gl.txt                  |  120 ++++----
 tests/texturing/shaders/CMakeLists.gl.txt          |    4 +-
 tests/util/CMakeLists.gl.txt                       |    4 +-
 tests/util/CMakeLists.gles1.txt                    |    2 +-
 tests/util/CMakeLists.gles2.txt                    |    2 +-
 76 files changed, 648 insertions(+), 648 deletions(-)


Please see commit 940592c5abfa18b0586a3aef3ca095647430d4b7 on git://
github.com/stereotype441/piglit.git if you want to look at the whole patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120321/9c939a0c/attachment.htm>


More information about the Piglit mailing list