[Piglit] [PATCH 1/3] Add eglut utility

Ian Romanick idr at freedesktop.org
Mon Nov 8 15:59:37 PST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/21/2010 07:30 PM, Kristian Høgsberg wrote:
> On Thu, Oct 21, 2010 at 9:54 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Shuang He wrote:
>>> These are directly copied from mesa/demos
>>> ---
>>>  tests/util/CMakeLists.txt       |    5 +
>>>  tests/util/eglut/CMakeLists.txt |   18 ++
>>>  tests/util/eglut/eglut.c        |  348 +++++++++++++++++++++++++++++++++++++++
>>>  tests/util/eglut/eglut.h        |   68 ++++++++
>>>  tests/util/eglut/eglut_x11.c    |  220 ++++++++++++++++++++++++
>>>  tests/util/eglut/eglutint.h     |   78 +++++++++
>>>  6 files changed, 737 insertions(+), 0 deletions(-)
>>>  create mode 100644 tests/util/eglut/CMakeLists.txt
>>>  create mode 100644 tests/util/eglut/eglut.c
>>>  create mode 100644 tests/util/eglut/eglut.h
>>>  create mode 100644 tests/util/eglut/eglut_x11.c
>>>  create mode 100644 tests/util/eglut/eglutint.h
>>
>> If this is just GLUT for EGL, the functions should keep their GLUT
>> names.  Changing the names means that we have to change all of the tests
>> (or add wrappers).  That's just silly.  GLUT is already a window system
>> abstraction layer that works on Windows, X, and Mac OS.  EGL is just
>> another possible target.
> 
> It's not, since EGL is already platform independent, eglut only
> abstracts out surface creation and window system things such as input
> events.  eglut also adds API to let the application specify which
> client API it wants to use.

EGL is already platform independent except for the things that EGL
doesn't do... but GLUT does.  What I want to avoid is a proliferation of
duplicated tests (i.e., one for eglut and one for GLUT).  As far as I
can tell, eglut implements, with the one exception you mentioned, a
subset of the GLUT API.  Since tests won't link with both eglut and
GLUT, I don't see a problem with giving the eglut functions the same
name as their GLUT counterparts.

By doing that we can easily hide API selection from most tests in the
piglit framework.  Then the EGL/OpenGL ES 2 version and the GLX/OpenGL
version differ only in the parts of the framework that they link with.

We need to run every OpenGL ES 2 test on every desktop OpenGL system
that supports GL_ARB_ES2_compatibility.  Making this work with the
minimum pain and maintenance burden is a good thing.  A lot of the
testing that we do involves comparing the results from multiple vendors,
so making something that just works with Mesa isn't good enough.

We have two variables that have two values, and we need to be able to
test all four combinations:

 - window system -> native vs. EGL
 - drawing API -> OpenGL ES vs. desktop OpenGL

The OpenGL ES + native window system API is the GL_ARB_ES2_compatibility
case.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzYjugACgkQX1gOwKyEAw/8xQCeKrF0wfa++m+zECoP6hzl6ZRN
oBUAn3CHywGbe7IhHttRPyL8Zr4n7hhz
=kfdR
-----END PGP SIGNATURE-----


More information about the Piglit mailing list