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

Paul Berry stereotype441 at gmail.com
Wed Mar 21 08:57:59 PDT 2012

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

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().

More information about the Piglit mailing list