On 21 March 2012 08:57, Paul Berry <span dir="ltr">&lt;<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is version 3 (hopefully the final version) of my attempt to<br>
replace Piglit&#39;s use of GLEW with a home-spun dispatch layer that will<br>
work with GLES, Wayland, and forward compatible contexts.  (Version 2<br>
can be found in the email &quot;[PATCH v2 00/13] Replace glew with a custom<br>
Piglit dispatch mechanism&quot;).<br>
<br>
I now believe everything works as well as it did before on Linux,<br>
Windows, and Mac (with the exception of one minor regression on Mac<br>
that I think is worth deferring--see below).  I have not yet<br>
implemented support for GLES or Wayland; I&#39;m planning to wait for a<br>
later patch series to do those.<br>
<br>
As with the previous patch series, a few of the patches are too large<br>
for the mailing list, so I&#39;ve omitted them.  You can see the whole<br>
series by pulling from branch &quot;dispatch3&quot; of<br>
git://<a href="http://github.com/stereotype441/piglit.git" target="_blank">github.com/stereotype441/piglit.git</a>.<br>
<br>
Note that some of the commits have already been code reviewed, so I&#39;m<br>
including the &quot;Reviewed-by&quot; comments in the patch emails.<br>
<br>
Changes since version 2:<br>
<br>
- Code now builds and runs correctly on Windows.  This required<br>
  carefully choosing the right calling conventions for all the<br>
  functions.  It also required distinguishing between core GL<br>
  functions that were introduced in GL 1.0 or GL 1.1 and core<br>
  functions that were introduced later.  (Only the latter set can be<br>
  obtained using wglGetProcAddress(); the former set need to be looked<br>
  up directly in OPENGL32.dll).<br>
<br>
- By popular demand, the generated code is no longer checked into git.<br>
  This patch series now includes the necessary modifications to cmake<br>
  to ensure that all tests are rebuilt if the generated code ever<br>
  changes (thanks to Chad Versace for helping me to get this working).<br>
<br>
The one minor regression on Mac is that the test<br>
shaders/gpu_shader4_attribs skips when it should run.  This happens<br>
because the functions tested by shaders/gpu_shader4_attribs are<br>
defined in both EXT_gpu_shader4 and NV_vertex_program4 extensions.<br>
Piglit-dispatch is not yet capable of understanding that a function<br>
might be defined with the same name in multiple extension specs<br>
(because it is based on the gl.spec file from <a href="http://www.opengl.org" target="_blank">www.opengl.org</a>, which<br>
fails to encode this information).  Fixing this problem should be<br>
fairly straightforward, but it will take some time, so in the interest<br>
of forward progress I&#39;d prefer to address it in a future patch series.<br>
<br>
Thanks for your patience in reviewing this long-running patch series.<br>
I believe we are on the home stretch--assuming all goes well, I&#39;m<br>
hoping to push these patches by the end of the day Friday.<br>
<br>
[PATCH v3 01/19] Only define bool in non-C++ builds.<br>
[PATCH v3 02/19] glean: use piglit-util and initialize GLEW.<br>
[PATCH v3 03/19] Add glewInit() calls to glx tests.<br>
[PATCH v3 04/19] Add glewInit() calls to GLX_ARB_create_context tests.<br>
[PATCH v3 05/19] Fixup APIENTRY macro on Apple<br>
[PATCH v3 06/19] Remove NVX_gpu_memory_info enums from piglit-util-enum.c<br>
[PATCH v3 07/19] piglit-dispatch: Introduce OpenGL API spec files.<br>
[PATCH v3 08/19] piglit-dispatch: Corrections to OpenGL API spec files.<br>
[PATCH v3 09/19] piglit-dispatch: Additions to OpenGL API spec files.<br>
[PATCH v3 10/19] piglit-dispatch: Code generation scripts.<br>
[PATCH v3 11/19] cmake: Move utility functions into piglit_util.cmake<br>
[PATCH v3 12/19] cmake: Define wrapper functions piglit_add_{executable,library}<br>
[PATCH v3 13/19] cmake: Replace calls to add_{executable,library}<br>
[PATCH v3 14/19] cmake: Make each *.o depend on generated piglit_dispatch headers<br>
[PATCH v3 15/19] piglit-dispatch: Remaining infrastructure.<br>
[PATCH v3 16/19] piglit-dispatch: Switch to using piglit-dispatch instead of GLEW.<br>
[PATCH v3 17/19] piglit-dispatch: Remove GLEW.<br>
[PATCH v3 18/19] Remove GLEW workarounds.<br>
[PATCH v3 19/19] glean: use piglit_get_proc_address().<br>
</blockquote></div><br>Argh, patch 13/19 was too large for the mailing list, and bounced.  Here&#39;s the commit message and diffstat:<br><br>From: Chad Versace &lt;<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>&gt;<br>
Date: Tue, 21 Feb 2012 18:23:56 -0800<br>Subject: [PATCH v3 13/19] cmake: Replace calls to add_{executable,library}<br> with wrappers<br><br>Replace<br>    add_executable -&gt; piglit_add_executable<br>    add_library -&gt; piglit_add_library<br>
<br>For now, each wrapper function trivially wraps the function it replaces,<br>and so this patch changes no behavior.<br><br>This commit was created using the command:<br><br>   sed -i -e &quot;s/add_executable/piglit_add_executable/&quot; -e &quot;s/add_library/piglit_add_library/&quot; $(find src/ tests/ -name &quot;*CMakeLists*&quot;)<br>
<br>Signed-off-by: Chad Versace &lt;<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>&gt;<br>---<br> src/glut_egl/CMakeLists.no_api.txt                 |    2 +-<br> tests/asmparsertest/CMakeLists.gl.txt              |    2 +-<br>
 tests/bugs/CMakeLists.gl.txt                       |   40 ++--<br> tests/egl/CMakeLists.gl.txt                        |    8 +-<br> tests/fbo/CMakeLists.gl.txt                        |  140 +++++-----<br> tests/general/CMakeLists.gl.txt                    |  188 +++++++-------<br>
 tests/glean/CMakeLists.gl.txt                      |    2 +-<br> tests/gles2/CMakeLists.gles2.txt                   |    2 +-<br> tests/glslparsertest/CMakeLists.gl.txt             |    2 +-<br> tests/glslparsertest/CMakeLists.gles2.txt          |    2 +-<br>
 tests/glx/CMakeLists.gl.txt                        |   60 ++--<br> tests/hiz/CMakeLists.gl.txt                        |   50 ++--<br> tests/mesa/tests/CMakeLists.gl.txt                 |    2 +-<br> tests/mesa/util/CMakeLists.gl.txt                  |    2 +-<br>
 tests/shaders/CMakeLists.gl.txt                    |  286 ++++++++++----------<br> .../CMakeLists.gl.txt                              |    2 +-<br> .../arb_blend_func_extended/api/CMakeLists.gl.txt  |    6 +-<br> .../spec/arb_color_buffer_float/CMakeLists.gl.txt  |   16 +-<br>
 tests/spec/arb_copy_buffer/CMakeLists.gl.txt       |   18 +-<br> tests/spec/arb_debug_output/CMakeLists.gl.txt      |    2 +-<br> tests/spec/arb_draw_buffers/CMakeLists.gl.txt      |    2 +-<br> .../CMakeLists.gl.txt                              |    4 +-<br>
 .../arb_draw_instanced/execution/CMakeLists.gl.txt |    8 +-<br> tests/spec/arb_es2_compatibility/CMakeLists.gl.txt |   18 +-<br> tests/spec/arb_fragment_program/CMakeLists.gl.txt  |    2 +-<br> .../spec/arb_framebuffer_object/CMakeLists.gl.txt  |    4 +-<br>
 tests/spec/arb_instanced_arrays/CMakeLists.gl.txt  |    2 +-<br> tests/spec/arb_map_buffer_range/CMakeLists.gl.txt  |    4 +-<br> tests/spec/arb_multisample/CMakeLists.gl.txt       |    4 +-<br> tests/spec/arb_robustness/CMakeLists.gl.txt        |    4 +-<br>
 tests/spec/arb_sampler_objects/CMakeLists.gl.txt   |    2 +-<br> tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt |    2 +-<br> tests/spec/arb_shader_objects/CMakeLists.gl.txt    |   10 +-<br> .../execution/CMakeLists.gl.txt                    |    2 +-<br>
 .../arb_texture_buffer_object/CMakeLists.gl.txt    |    8 +-<br> .../spec/arb_texture_compression/CMakeLists.gl.txt |    4 +-<br> tests/spec/arb_texture_float/CMakeLists.gl.txt     |    2 +-<br> tests/spec/arb_texture_storage/CMakeLists.gl.txt   |    2 +-<br>
 .../spec/arb_transform_feedback2/CMakeLists.gl.txt |    2 +-<br> .../arb_vertex_buffer_object/CMakeLists.gl.txt     |    4 +-<br> tests/spec/arb_vertex_program/CMakeLists.gl.txt    |    6 +-<br> .../CMakeLists.gl.txt                              |    2 +-<br>
 tests/spec/ati_draw_buffers/CMakeLists.gl.txt      |    6 +-<br> tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt    |    2 +-<br> tests/spec/ext_fog_coord/CMakeLists.gl.txt         |    2 +-<br> .../ext_framebuffer_multisample/CMakeLists.gl.txt  |   20 +-<br>
 .../ext_packed_depth_stencil/CMakeLists.gl.txt     |    2 +-<br> tests/spec/ext_packed_float/CMakeLists.gl.txt      |    4 +-<br> tests/spec/ext_texture_array/CMakeLists.gl.txt     |    2 +-<br> tests/spec/ext_texture_integer/CMakeLists.gl.txt   |   16 +-<br>
 tests/spec/ext_timer_query/CMakeLists.gl.txt       |    2 +-<br> .../spec/ext_transform_feedback/CMakeLists.gl.txt  |   44 ++--<br> tests/spec/gl-2.0/CMakeLists.gl.txt                |    2 +-<br> tests/spec/gl-2.0/api/CMakeLists.gl.txt            |    4 +-<br>
 tests/spec/gl-2.1/CMakeLists.gl.txt                |    2 +-<br> tests/spec/gl-3.0/CMakeLists.gl.txt                |    8 +-<br> tests/spec/gl-3.0/api/CMakeLists.gl.txt            |   22 +-<br> tests/spec/gl-3.1/CMakeLists.gl.txt                |    2 +-<br>
 .../glsl-1.10/execution/clipping/CMakeLists.gl.txt |    2 +-<br> tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt   |    2 +-<br> tests/spec/glsl-1.30/CMakeLists.gl.txt             |    2 +-<br> tests/spec/glsl-1.30/execution/CMakeLists.gl.txt   |   12 +-<br>
 .../glsl-1.30/execution/clipping/CMakeLists.gl.txt |    2 +-<br> .../glsl-1.30/linker/clipping/CMakeLists.gl.txt    |    2 +-<br> .../spec/glx_arb_create_context/CMakeLists.gl.txt  |   22 +-<br> .../spec/glx_ext_import_context/CMakeLists.gl.txt  |   18 +-<br>
 tests/spec/nv_conditional_render/CMakeLists.gl.txt |   24 +-<br> tests/spec/nv_texture_barrier/CMakeLists.gl.txt    |    2 +-<br> .../CMakeLists.gles1.txt                           |    2 +-<br> .../CMakeLists.gles1.txt                           |    2 +-<br>
 tests/spec/oes_draw_texture/CMakeLists.gles1.txt   |    2 +-<br> tests/texturing/CMakeLists.gl.txt                  |  120 ++++----<br> tests/texturing/shaders/CMakeLists.gl.txt          |    4 +-<br> tests/util/CMakeLists.gl.txt                       |    4 +-<br>
 tests/util/CMakeLists.gles1.txt                    |    2 +-<br> tests/util/CMakeLists.gles2.txt                    |    2 +-<br> 76 files changed, 648 insertions(+), 648 deletions(-)<br><br><br>Please see commit 940592c5abfa18b0586a3aef3ca095647430d4b7 on git://<a href="http://github.com/stereotype441/piglit.git">github.com/stereotype441/piglit.git</a> if you want to look at the whole patch.<br>