[Piglit] [PATCH 00/29] Dispatch support for EGL and GLES

Pauli Nieminen pauli.nieminen at linux.intel.com
Mon May 21 11:08:35 PDT 2012

Following changes make it possible to use dispatch based function resolving
for GLES and EGL core and extensions functions.

The function prototypes and defines are parsed from system headers if they are
present during compilation. Because data is parsed using regular expressions
from C header fails it is possible that special cases like eglGetProcAddress
might be missed by generalized regular expression. Those special cases will
require custom parsing if we find any more of problematic lines.

There is also some minor improvements to egl and gles utility functions to help
runtime detection of supported features in tests.

The patches are "waffle ready" meaning that there is some differences what is done if piglit is compiled using waffle to support runtime selection of EGL/GLX and GL api.

I did run quick tests set on i965 to check for regressions. To bad it appears
that piglit can hit random failures before and after. I tried to reproduce
random failures manually but failed so far.

I already saw once random failure when I was running bisectability tests on
small set of tests. In that case it appeared like some rendering didn't hit the
target memory before glReadPixels. But I couldn't reproduce the issues with
while <test>; do sleep 0; done.

Uploaded results are in:

The branch ontop of piglit/master:

The branch on top of Chad's waffle-v3.

Pauli Nieminen (29):
  texline: Replace glut with piglit-util and glut_wrap.h
  EXT_unpack_subimage: Remove unnecessary egl.h include
  tests: Replace gl.h with piglit-util.h
  util: Add ifdef quards around redefined macros
  util: Add egl version and extension helpers
  util: Check that glx is supported in the selected platform
  util: Check that egl is supported in the selected platform
  glapi: Refactor parser parameter passing
  glapi: Make function category list
  glapi: Read list of core extensions
  glapi: Split enum value parsing to help function
  glapi: Make json enums have complete name
  glapi: Make non integer enums to have zero int value
  util: Fix GLES 1.x version string parsing
  tests: Include glu.h where glu is used
  dispatch: Use GetProcAddress from the platform
  util: Break some util function to core header
  dispatch: Simplify function resolving
  dispatch: Add support for GLES and EGL dispatch categories
  dispatch: Add support for array parameters
  dispatch: Allow calling egl without initializing
  dispatch: Don't assume that 1.0 version is present
  glapi: Add parsing support for GLES and EGL headers
  dispatch: Add support for GLES and EGL stub functions
  tests/egl: Add missing type cast
  tests/egl: Make test appear to be running from glut_waffle
  dispatch: Switch to use dispatch for EGL and GLES
  oes_draw_texture: Use dispatch to resolve extension functions
  util: Support FBOs also with GLES1 and GL1

 cmake/piglit_glapi.cmake                           |   16 +-
 glapi/parse_glspec.py                              |  275 ++++++++++++++++++--
 src/piglit/gl_wrap.h                               |   20 +--
 tests/egl/egl-query-surface.c                      |    2 +-
 tests/egl/egl-util.c                               |   12 +-
 tests/egl/egl-util.h                               |    5 +-
 tests/mesa/tests/texline.c                         |    3 +-
 tests/mesa/util/readtex.c                          |    1 -
 tests/mesa/util/readtex.h                          |    2 +-
 tests/mesa/util/writeimg.c                         |    2 +-
 .../arb_shader_texture_lod/execution/texgrad.c     |    1 +
 .../spec/ext_unpack_subimage/ext_unpack_subimage.c |    2 -
 tests/spec/gl-2.0/api/clip-flag-behavior.c         |    1 +
 tests/spec/oes_draw_texture/oes_draw_texture.c     |   20 +-
 tests/texturing/1-1-linear-texture.c               |   11 +-
 tests/texturing/teximage-errors.c                  |    1 +
 tests/texturing/texture-integer.c                  |    1 +
 tests/util/CMakeLists.gl.txt                       |    1 +
 tests/util/CMakeLists.txt                          |    3 +
 tests/util/gen_dispatch.py                         |   48 +++--
 tests/util/piglit-dispatch-init.c                  |   82 +++++--
 tests/util/piglit-dispatch.c                       |   88 ++++---
 tests/util/piglit-dispatch.h                       |   89 ++++---
 tests/util/piglit-framework.c                      |   12 +-
 tests/util/piglit-glx-util.c                       |   22 ++
 tests/util/piglit-util-core.h                      |   75 ++++++
 tests/util/piglit-util-egl.c                       |   76 ++++++
 tests/util/piglit-util-egl.h                       |   17 +-
 tests/util/piglit-util.c                           |   27 ++-
 tests/util/piglit-util.h                           |   33 +---
 30 files changed, 718 insertions(+), 230 deletions(-)
 create mode 100644 tests/util/piglit-util-core.h


More information about the Piglit mailing list