[Piglit] [PATCH 00/10] Allow building and running EGL+GLES tests without GLX

Chad Versace chad.versace at linux.intel.com
Sun Jan 19 12:47:08 PST 2014


On Wed, Jan 15, 2014 at 07:09:55PM +0800, Daniel Kurtz wrote:
> With the following patches I am able to build and run piglit tests on a system
> with no OpenGL and no GLX (ie, no glproto, no libGL.so and no /usr/include/GL).
> 
> The X11, GBM and wayland patches are really 'bug reports', it seems like they
> too should be probed rather than assumed.

I tested building and running this series (minus the last dlsym patch)
on a system with no libraries nor headers for X11 and OpenGL. Instead
the system had GLES1, GLES2, GLES3, Wayland and GBM. Unsurprisingly,
Piglit failed to build and the series needed a few touch-ups. Rather
than asking you to set up such a system, fix the bugs, and resubmit the
series, I went ahead and applied the fixes myself and committed the
series. It was painful enough for me to set up an X-free GL-free system
that I didn't want to make you go through the pain too :)

Thanks, really, thanks for getting the ball rolling on breaking Piglit's
dependency on X11.

About the fixes I applied...

Using my X-free GL-free test system, I discovered that, even with your
series, Piglit refused to build. I had to reorder a few of your patches
and add two more to get Piglit to work my test system. My extra two are:

    cmake: Fix libpiglitutil on systems without X11                                             
    egl_khr_create_context: Fix X11 and GL requirements in CMake                                

I fixed a bug in your patch "cmake: GLX is not always present on Linux".
The patch turned off PIGLIT_HAS_GLX too eagerly. PIGLIT_HAS_GLX doesn't
actually require glproto, but PIGLIT_BUILD_GLX_TESTS does.

Your bugreport patch about probing Wayland support, I completed it by
probing for wayland-client.pc and wayland-egl.pc.

I also expanded or clarified a few of the commit messages where you
stated questions or uncertainty in the message.

So... Patches 1-9 of your series are now committed to master. The few
fixes and expanded commit messages I did are documented with a v2 tag.

I successfully ran Piglit with PIGLIT_PLATFORM=gbm after applying the
fixes.  Honestly, I was surprised that it worked! The system had GBM,
GLES1, GLES2, and GLES3. The result summary is below. The full summary,
with all skipped tests removed, is attached.

    summary:
           pass: 106
           fail: 3
          crash: 1
           skip: 15455
           warn: 0
     dmesg-warn: 0
     dmesg-fail: 0
          total: 15565

I also did a regression test against Piglit master on Intel Sandybridge
system with GLX and OpenGL installed, as well as GLES1,2,3. There were
no *real* regressions; just the usual sporadic failures due to Python
bugs and whatnot.

> I'm really not sure about that last patch.  It works for my situation, since
> my libEGL.so, libGLESv2.so and libGLESv1_CM.so are all exactly the same library
> (they are all just symlinks to vendor .so).  But I don't think it will work in
> the general case where these are really separate libraries, with potentially
> conflicting core functions.

I'm also uncertain about your last patch.

Are you aware of any shipping EGL implementation that we wish to run
Piglit on in the short-term and where eglGetProcAddress to fails to work
for core functions?  Mesa doesn't suffer from that problem; it behaves
as if it supported EGL_KHR_get_all_proc_addresses even though it does
not yet expose the extension string.

If the problem is only theoretical, and Piglit will not encounter such
an implementation in the short-term, then I propose we drop the dlsym
patch. Otherwise, we need to design the patch to work reliably in the
general case where distinct EGL, GL, and GLES 1-3 libraries are
installed, which is the case for Mesa.

> Daniel Kurtz (10):
>   CMakeLists: indent spaces -> tabs
>   CMakeLists: do not unconditionally find OpenGL package
>   CMakeLists: only find GLEXT paths if OpenGL is also found
>   CMakeLists: GLX is not always present on Linux
>   piglit-dispatch: only use glXGetProcAddressARB if PIGLIT_HAS_GLX
>   piglit-dispatch: Use eglGetProcAddress if PIGLIT_HAS_EGL but not GLX
>   CMakeLists: only set HAS_X11 if X11_FOUND
>   CMakeLists: Only set HAS_GBM if pkgconfig finds gbm
>   CMakeLists: probe for wayland support instead of unconditionally
>     defining
>   piglit-dispatch-init: use dlsym to dispatch EGL core functions on
>     Linux
> 
>  CMakeLists.txt                                     | 71 ++++++++++++----------
>  tests/cl/CMakeLists.txt                            | 34 +++++------
>  tests/egl/CMakeLists.gl.txt                        |  2 +-
>  tests/egl/spec/egl-1.4/CMakeLists.gles2.txt        |  4 +-
>  tests/glx/CMakeLists.gl.txt                        |  6 +-
>  tests/spec/arb_timer_query/CMakeLists.gl.txt       |  2 +-
>  .../ext_framebuffer_multisample/CMakeLists.gl.txt  |  2 +-
>  tests/spec/ext_timer_query/CMakeLists.gl.txt       |  4 +-
>  .../spec/glx_arb_create_context/CMakeLists.gl.txt  |  6 +-
>  .../spec/glx_ext_import_context/CMakeLists.gl.txt  |  6 +-
>  .../spec/glx_mesa_query_renderer/CMakeLists.gl.txt |  6 +-
>  tests/spec/glx_oml_sync_control/CMakeLists.gl.txt  |  6 +-
>  .../CMakeLists.gles1.txt                           |  6 +-
>  .../CMakeLists.gles2.txt                           |  6 +-
>  .../CMakeLists.gles1.txt                           |  6 +-
>  tests/texturing/CMakeLists.gl.txt                  | 10 +--
>  tests/util/CMakeLists.txt                          |  6 +-
>  tests/util/piglit-dispatch-init.c                  | 44 +++++++++++++-
>  18 files changed, 137 insertions(+), 90 deletions(-)
> 
> -- 
> 1.8.5.2
> 
-------------- next part --------------
spec/EXT_transform_feedback/structs_gles3 struct-struct run-no-fs: pass
spec/glsl-es-1.00/built-in constants/gl_MaxVertexAttribs: pass
spec/glsl-es-3.00/execution/varying-struct-copy-out-vs: pass
spec/EGL_EXT_client_extensions/conformance test 2: pass
spec/EGL_EXT_client_extensions/conformance test 3: pass
spec/EGL_EXT_client_extensions/conformance test 1: pass
spec/EXT_transform_feedback/structs_gles3 struct-struct error: pass
spec/glsl-es-3.00/execution/varying-struct-interpolation: pass
spec/glsl-es-1.00/built-in constants/gl_MaxVertexTextureImageUnits: pass
spec/glsl-es-3.00/execution/sanity: pass
spec/EXT_transform_feedback/structs_gles3 array-struct run-no-fs: pass
spec/glsl-es-3.00/built-in constants/gl_MaxProgramTexelOffset: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 rgb8: pass
spec/EXT_transform_feedback/structs_gles3 array-struct run: pass
spec/glsl-es-3.00/built-in constants/gl_MaxVertexUniformVectors: pass
spec/glsl-es-3.00/built-in constants/gl_MaxVertexAttribs: pass
spec/EXT_unpack_subimage/basic: pass
spec/!OpenGL ES 3.0/minmax: pass
spec/OES_compressed_ETC1_RGB8_texture/miptree: pass
spec/EXT_transform_feedback/structs_gles3 struct-struct run: pass
spec/glsl-es-3.00/execution/varying-struct-copy-local-fs: pass
spec/!OpenGL ES 3.0/ext_texture_array-compressed_gles3 texsubimage: pass
spec/!OpenGL ES 2.0/minmax_gles2: pass
spec/glsl-es-1.00/built-in constants/gl_MaxCombinedTextureImageUnits: pass
spec/glsl-es-3.00/built-in constants/gl_MaxFragmentUniformVectors: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-struct get: pass
spec/OES_draw_texture/oes_draw_texture: pass
spec/glsl-es-3.00/execution/built-in-functions/const-packSnorm2x16: pass
spec/OES_compressed_ETC1_RGB8_texture/basic: fail
spec/EXT_transform_feedback/structs_gles3 array-struct-whole-array run: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-elem get: pass
spec/EXT_transform_feedback/structs_gles3 basic-struct run-no-fs: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-packUnorm2x16: pass
spec/glsl-es-1.00/built-in constants/gl_MaxDrawBuffers: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 srgb8-alpha8: pass
spec/!OpenGL ES 2.0/link-no-vsfs: pass
spec/glsl-es-3.00/execution/varying-struct-centroid_gles3: pass
spec/OES_compressed_paletted_texture/basic API: pass
spec/glsl-es-3.00/execution/varying-struct-copy-uniform-vs: pass
spec/EXT_transform_feedback/structs_gles3 struct-whole-array run-no-fs: pass
spec/glsl-es-3.00/execution/built-in-functions/fs-unpackUnorm2x16: pass
spec/glsl-es-3.00/execution/built-in-functions/fs-unpackHalf2x16: pass
spec/glsl-es-3.00/execution/varying-struct-copy-return-vs: pass
spec/glsl-es-3.00/execution/built-in-functions/fs-packSnorm2x16: pass
spec/glsl-es-3.00/built-in constants/gl_MaxDrawBuffers: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-packSnorm2x16: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 rgba8: pass
spec/glsl-es-3.00/built-in constants/gl_MaxCombinedTextureImageUnits: pass
spec/glsl-es-3.00/linker/interface-blocks-member-type-mismatch: pass
spec/glsl-es-3.00/execution/varying-struct-basic: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-whole-array get: pass
spec/!OpenGL ES 3.0/ext_texture_array-compressed_gles3 teximage: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-struct run-no-fs: pass
spec/glsl-es-1.00/built-in constants/gl_MaxTextureImageUnits: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-unpackHalf2x16: pass
spec/glsl-es-3.00/execution/built-in-functions/const-packUnorm2x16: pass
spec/glsl-es-3.00/built-in constants/gl_MaxFragmentInputVectors: pass
spec/glsl-es-3.00/execution/built-in-functions/fs-packUnorm2x16: pass
spec/!OpenGL ES 2.0/fbo_discard_gles2: pass
spec/EXT_transform_feedback/structs_gles3 basic-struct error: pass
spec/glsl-es-3.00/execution/built-in-functions/const-unpackSnorm2x16: pass
spec/glsl-es-3.00/execution/varying-struct-arrays: pass
spec/!OpenGL ES 2.0/multiple-shader-objects_gles2: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-elem run-no-fs: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 r11: pass
spec/!OpenGL ES 3.0/texture-immutable-levels: pass
spec/glsl-es-3.00/built-in constants/gl_MaxTextureImageUnits: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 rgb8-punchthrough-alpha1: pass
spec/EXT_transform_feedback/structs_gles3 basic-struct run: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-struct run: pass
spec/glsl-es-3.00/execution/built-in-functions/const-unpackHalf2x16: pass
spec/glsl-es-3.00/execution/built-in-functions/const-packHalf2x16: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-unpackSnorm2x16: pass
spec/!OpenGL ES 2.0/glsl-fs-pointcoord: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-whole-array error: pass
spec/EXT_transform_feedback/structs_gles3 struct-whole-array run: pass
spec/glsl-es-3.00/built-in constants/gl_MinProgramTexelOffset: pass
spec/ARB_transform_feedback2/Change objects while paused (GLES3): fail
spec/glsl-es-3.00/built-in constants/gl_MaxVertexOutputVectors: pass
spec/EXT_transform_feedback/structs_gles3 struct-struct get: pass
spec/glsl-es-1.00/built-in constants/gl_MaxFragmentUniformVectors: pass
spec/EXT_transform_feedback/structs_gles3 array-struct get: pass
spec/EXT_transform_feedback/structs_gles3 basic-struct get: pass
spec/EXT_transform_feedback/structs_gles3 struct-array-elem error: pass
spec/glsl-es-3.00/execution/varying-struct-copy-function-fs: pass
spec/glsl-es-3.00/built-in constants/gl_MaxVertexTextureImageUnits: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-unpackUnorm2x16: pass
spec/glsl-es-1.00/built-in constants/gl_MaxVertexUniformVectors: pass
spec/glsl-es-1.00/built-in constants/gl_MaxVaryingVectors: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 srgb8-punchthrough-alpha1: pass
spec/EXT_transform_feedback/structs_gles3 array-struct error: pass
spec/EXT_transform_feedback/structs_gles3 struct-array-elem run-no-fs: pass
spec/EXT_transform_feedback/structs_gles3 struct-array-elem get: pass
spec/glsl-es-3.00/execution/built-in-functions/vs-packHalf2x16: pass
spec/glsl-es-3.00/execution/varying-struct-copy-local-vs: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-struct error: pass
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 rg11: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-whole-array run-no-fs: pass
spec/EXT_transform_feedback/structs_gles3 struct-whole-array error: pass
spec/glsl-es-3.00/execution/built-in-functions/const-unpackUnorm2x16: pass
spec/EXT_transform_feedback/structs_gles3 struct-whole-array get: pass
spec/glsl-es-1.00/execution/sanity: pass
spec/glsl-es-3.00/execution/built-in-functions/fs-packHalf2x16: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-elem run: pass
spec/EXT_transform_feedback/structs_gles3 struct-array-elem run: pass
spec/EXT_transform_feedback/structs_gles3 array-struct-array-elem error: pass
spec/OES_fixed_point/attribute-arrays: fail
spec/glsl-es-3.00/execution/built-in-functions/fs-unpackSnorm2x16: pass
spec/EGL 1.4/eglTerminate then unbind context: crash
spec/!OpenGL ES 3.0/oes_compressed_etc2_texture-miptree_gles3 srgb8: pass
summary:
       pass: 106
       fail: 3
      crash: 1
       skip: 15455
       warn: 0
 dmesg-warn: 0
 dmesg-fail: 0
      total: 15565


More information about the Piglit mailing list