1. 08 Nov, 2018 1 commit
  2. 04 Aug, 2018 1 commit
  3. 17 Jul, 2018 1 commit
  4. 16 Mar, 2018 1 commit
  5. 07 Aug, 2017 1 commit
  6. 06 Aug, 2017 1 commit
  7. 28 Aug, 2016 1 commit
  8. 18 Jun, 2016 1 commit
  9. 04 Apr, 2016 1 commit
  10. 08 Feb, 2016 2 commits
    • Dylan Baker's avatar
      framework,unittests: use __future__ unicode_literals · 60d848ed
      Dylan Baker authored
      Use unicode_literals from __future__. This makes undecorated strings
      (those not using and b or u prefix) into unicode instead of bytes in
      python 2. This means that bytes strings need to have a b prefix now.
      
      This also fixes a couple of unittests that broke during the transition.
      Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
      Acked-by: Jose Fonseca's avatarJose Fonseca <jfonseca@vmware.com>
      60d848ed
    • Dylan Baker's avatar
      python: use future print, division, and absolute_import · f4115891
      Dylan Baker authored
      These are the three python3 like behaviors that piglit should rely on.
      The only other applicable future import is unicode_literals. Although my
      plan is to use unicode_literals, that will actually cause behavioral
      changes in some cases, where these cause minimal changes to the code.
      
      Piglit will not be targeting < 3.2, they are old, unsupported, and have
      fewer features than 2.7.
      
      Piglit now has division (using / as floating division, and // as integer
      division), print as a function (rather than a statement), and
      absolute import, which changes the way import works when there's a
      conflict between a local import and a system wide one. Absolute import
      makes more sense, and copies the behavior of python 3
      Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
      Acked-by: Jose Fonseca's avatarJose Fonseca <jfonseca@vmware.com>
      f4115891
  11. 02 Nov, 2015 1 commit
  12. 14 Mar, 2015 1 commit
  13. 23 Feb, 2015 4 commits
  14. 28 Jan, 2015 7 commits
  15. 12 Nov, 2014 1 commit
  16. 27 Jun, 2014 1 commit
  17. 23 Jun, 2014 2 commits
    • Chad Versace's avatar
      dispatch: Generate piglit-dispatch from Khronos XML · ac1f382d
      Chad Versace authored
      Khronos now generates its headers from XML and no longer maintains the
      old, crufty *.spec files. Piglit should do the same. Otherwise,
      piglit-dispatch won't be able to pick up new extension functions.
      
      As a really really big bonus, after Piglit starts generating its GL
      dispatch code from gl.xml, it will be a small step to start generating
      EGL and GLX dispatch from egl.xml and glx.xml.
      
      This patch imports 'gl.xml' into a new toplevel "registry" directory, to
      follow the precedent of libepoxy.
      
      This patch follows the precedent of libepoxy by importing "gl.xml" into
      a new toplevel "registry" directory.
      
      I did *not* try to redesign piglit-dispatch in this patch. To the
      contrary, I attempted to keep the newly generated dispatch code to be as
      similar as possible as the old generated code. Despite wanting to clean
      up piglit-dispatch's design, I refrained because "a patch should do one
      thing, and do it well".
      
      I strove to keep separate concerns in separate files. File
      "registry/gl.py" parses "registry/gl.xml". File
      "tests/util/gen_dispatch.py" generates code from the that parsed result.
      This decision kept gen_dispatch.py small and focused.
      
      I hope everyone finds the rewritten gen_dispatch.py more maintainable
      and easy to read.
      
      The generated code has changed as following:
      
        - It now contains the GLES1 API, because gl.xml contains information
          on all OpenGL APIs.
      
        - The comment block for each function alias set now contains more
          information. For each function in the set, it now lists the
          complete set of providers.
      
          For example:
            /* glActiveTexture (GL_VERSION_1_3) (GL_VERSION_ES_CM_1_0) (GL_ES_VERSION_2_0) */
            /* glActiveTextureARB (GL_ARB_multitexture) */
            extern PFNGLACTIVETEXTUREPROC piglit_dispatch_glActiveTexture;
            #define glActiveTexture piglit_dispatch_glActiveTexture
            #define glActiveTextureARB piglit_dispatch_glActiveTexture
      
        - Enums are sorted by group then by value. Old dispatch sorted only by
          value.
      
          For example:
            /* Enum Group MapBufferUsageMask */
            #define GL_MAP_READ_BIT 0x0001
            #define GL_MAP_READ_BIT_EXT 0x0001
            #define GL_MAP_WRITE_BIT 0x0002
            #define GL_MAP_WRITE_BIT_EXT 0x0002
            ...
      
      Tested for regressions with:
          piglit run -p x11_egl -x glx -x glean
          Mesa 10.2.1
          Intel Ivybridge
          Fedora 20
      
      v3, for Dylan:
        - Replace ElementTree with cElementTree, for speed.
        - Each method $foo in KeyedOrderedSet that returns
          a generator, rename it to iter${foo} to follow Python2 (not 3)
          naming conventions.
        - Python 2.6 lacks OrderedDict, so don't use it.
        - Remove unused import 'dedent'.
        - Python 2.6 does not recognize the syntax for set literals, so
          replace each set literal with a list literal or generator literal.
        - Replace sys.stderr.write with print(file=sys.stderr).
        - Remove hand-coded OrderedKeyedSet.copy and instead use copy module.
        - Prefer the 'lxml' module (it uses libxml2) over Python's builtin 'xml' module.
        - Replace methods ``def foo(x, y):`` with ``def foo(self, other):``.
        - Replace lists with generators in methods Command.c_*_param_list.
        - PEP8: Separate all toplevel items with 2 newlines.
        - PEP8: Fix minor whitespace issues.
        - PEP8: Replace some ``== None`` with ``is None``.
        - Replace None-check for --out-dir with add_argument(..., required=True)
        - Remove 'prog' assignment when calling ArgumentParser(prog=PROG_NAME).
          Instead, use default value
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      ac1f382d
    • Chad Versace's avatar
      registry: Import gl.xml from Khronos registry · 443acc4d
      Chad Versace authored
      Import revision 26792 on 2014-05-22 from
      (https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml).
      
      I'm importing the Khronos XML because I want to generate piglit-dispatch
      code from it rather than scraping GL headers and unmaintained *.spec
      files.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      443acc4d