1. 10 Nov, 2017 1 commit
  2. 31 Oct, 2017 1 commit
    • Brian Paul's avatar
      cmake: create Win10 manifest files for particular executables · 5087aa3f
      Brian Paul authored
      On Windows10 (and possibly older versions), UAC (User Account Control)
      intervenes when starting an executables with "patch", "update" or "setup"
      in their name.  This requires the user to approve execution by clicking
      in a dialog window (and even then, causes test failures).  With Cygwin,
      you simply get "Permission Denied".
      
      Currently, there are four Piglit tests which need this special treatment:
      bin/arb_compute_shader-zero-dispatch-size
      bin/arb_tessellation_shader-invalid-patch-vertices-range
      bin/glsl-uniform-update
      bin/mipmap-setup
      
      A work-around is to create a manifest file for each effected executable.
      This patch creates a <foo>.exe.manifest file if "foo" contains any of
      the above strings.  There's no effect on non-Windows platforms.
      
      Note: this solution uses the cmake file(GENERATE ...) function.  I think
      add_custom_command() is probably the proper approach, but I've been
      unsuccessful in getting that to work.
      Reviewed-by: Charmaine Lee's avatarCharmaine Lee <charmainel@vmware.com>
      5087aa3f
  3. 23 Feb, 2015 1 commit
    • Dylan Baker's avatar
      Add dependency on Python six · 3780c734
      Dylan Baker authored
      Six is a module that provides a clean, standardized interface for
      handling python2 and python3 from the same code base. This adds a
      requirement on six as a build-time dependency, the plan is to use it
      only for python generators (those called during build time)
      
      While it certainly is possible to reimplement much of what six does
      scratch and not add another python dependency, I think it's better to
      just use six. For one thing a large number of python modules already
      depend on six, so the chances are good that most people already have it
      installed. Second, it's the de facto standard for supporting complex
      code bases in 2 and 3, so it's familiar and many of the corner cases
      have already been addressed.
      
      This adds the necessary cmake boilerplate to ensure that six is
      available. At this time I don't know of a specific version being
      required, but I am currently using 1.9.0
      
      v2: - update README with six dependency (Jordan)
      Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
      Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
      3780c734
  4. 19 Jan, 2015 2 commits
  5. 21 Oct, 2014 1 commit
  6. 27 Sep, 2014 1 commit
  7. 05 Jul, 2014 1 commit
  8. 27 Jun, 2014 1 commit
  9. 23 Jun, 2014 4 commits
    • Chad Versace's avatar
      util: Generate piglit_get_gl_enum_name() and friends · e31de330
      Chad Versace authored
      This patch removes the files "piglit-util-gl*-enum.c" and replaces them
      with a single file "piglit-util-gl-enum-gen.c" generated from the
      Khronos XML.
      
      The two functions now generated are:
          piglit_get_gl_enum_name(GLenum param)
          piglit_get_prim_name(GLenum prim)
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      e31de330
    • Chad Versace's avatar
      glapi: Remove the glapi directory · 0caf33e1
      Chad Versace authored
      Piglit no longer uses the directory because it now generates
      piglit-dispatch from the Khronos XML.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      0caf33e1
    • 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
      util: Rename generated dispatch files · def993a7
      Chad Versace authored
      Rename the files "generated_dispatch.[ch]" to
      "piglit-dispatch-gen.[ch]".  They now follow the same filename
      convention ("piglit-*.[ch]") used by most other files in tests/util.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      def993a7
  10. 10 Jun, 2014 1 commit
  11. 03 May, 2014 1 commit
  12. 17 Jun, 2013 2 commits
  13. 05 Jun, 2013 1 commit
    • Eric Anholt's avatar
      Include enum.spec along with enumext.spec for piglit-dispatch. · 1c64319e
      Eric Anholt authored
      There are three differences between the two (as verified by sort, sed,
      uniq, and diff):
      
      - enum.spec includes GLES extension enums (since it's used for
        maintaining uniqueness of enums in the registry), which we want to
        include for cross-API compatibility.
      - enum.spec includes some entries for known GL versions and GL extensions.
      - enumext.spec has a few more synonyms for enums (since it's the
        file used for generating the official glext.h for desktop).
      
      This change only introduces new #define lines to generated-dispatch.h.
      
      v2: Make the statement about "only introduces new #define lines"
          actually true by continuing to emit based on the categories we
          collected during parsing, except with them defined to '1' instead
          of '', to match actual glext definitions and what gets
          autogenerated from enum.ext.
      Reviewed-by: default avatarChad Versace <chad.versace@linux.intel.com>
      1c64319e
  14. 18 May, 2013 1 commit
  15. 06 Feb, 2013 2 commits
    • Jose Fonseca's avatar
      cmake: Ensure we use static libraries on Windows. · a8de09b4
      Jose Fonseca authored
      It would be nice to eventually get dynamic link libraries working with
      WGL too, but for now ensure that we always do static as intended.
      
      This might fix fdo bug 60352.
      a8de09b4
    • Jose Fonseca's avatar
      cmake: Allow to generate a tarball/zip with the binaries, scripts, data. · f232fa4d
      Jose Fonseca authored
      It doesn't make much sense to package piglit or install on machines, due
      to the frequency piglit tests are added/changed.
      
      However, binary packages are still useful for distributed testing where
      the binaries are built on one machine, and then passed to (sometimes
      other teams) for the actual testing.
      
      This patch allows one to conveniently generate such packages, simply by
      doing
      
        make package
      
      Then one can run piglit by unpacking the package elsewhere, set the
      PIGLIT_SOURCE_DIR and LD_LIBRARY_PATH accordingly, and run piglit scripts
      as usual.
      Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
      f232fa4d
  16. 30 Nov, 2012 1 commit
    • Chad Versace's avatar
      cmake: Support CMakeLists.gles3.txt · 2f142949
      Chad Versace authored
      Add "gles3" as a new api in PIGLIT_TOP/cmake/target_api. Now, you can
      build GLES3 tests and libraries by placing the build rules in files named
      CMakeLists.gles3.txt.
      
      I dislike the CMake hackery of havining multiple builds for each target
      api. But, because GLES2 and GLES3 use different headers (gl2.h vs
      gl3.h), until piglit-dispatch gains support for GLES the most sensible way
      to add GLES3 support to piglit is to continue the tradition of adding
      a new target api into PIGLIT_TOP/cmake/target_api.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      2f142949
  17. 16 Nov, 2012 1 commit
  18. 22 Oct, 2012 1 commit
  19. 10 Oct, 2012 2 commits
  20. 05 Sep, 2012 1 commit
  21. 23 Aug, 2012 1 commit
  22. 04 Jun, 2012 1 commit
  23. 24 May, 2012 2 commits
  24. 23 May, 2012 3 commits
  25. 23 Mar, 2012 4 commits
    • Chad Versace's avatar
      cmake: Make each *.o depend on generated piglit_dispatch headers · bb3916c3
      Chad Versace authored
      Alter the wrapper functions `piglit_add_executable` and
      `piglit_add_library` to add to each object file a dependency on
      piglit_dispatch's generated files. This requires that a top-level custom
      target be created, `piglit_dispatch_gen`, to track that dependency.
      
      The result is that updating any files in `piglit_dispatch_gen_inputs` (for
      example, gl_API.xml) triggers a recompile of all objects.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      bb3916c3
    • Chad Versace's avatar
      cmake: Define wrapper functions piglit_add_{executable,library} · 1416f985
      Chad Versace authored
      For now, `piglit_add_executable` is a trivial wrapper around
      `add_executable`.  Ditto for `piglit_add_library`.
      
      A subsequent commit will leverage the wrappers to add to each object file
      an explicit dependency on the header files generated by piglit_dispatch.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      1416f985
    • Chad Versace's avatar
      cmake: Move utility functions into piglit_util.cmake · e5056341
      Chad Versace authored
      Currently there is only one utility function, piglit_include_target_api.
      However, subsequent commits will add several more.
      
      I'm choosing to define all the utility functions in their own file,
      piglit_util.cmake, in order to keep things organized and the top
      CMakeLists uncluttered.
      Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
      e5056341
    • Paul Berry's avatar
      piglit-dispatch: Code generation scripts. · 6fe17bb7
      Paul Berry authored
      This patch contains the code generation scripts that convert the files
      gl.spec, gl.tm, and enumext.spec into C code, as well as the CMake
      directives to run the scripts.
      
      Code generation occurs in two phases: first the script
      glapi/parse_glspec.py converts the .spec and .tm files into an
      intermediate JSON format, which is stored in glapi/glapi.json.  Then,
      the script tests/util/gen_dispatch.py converts the JSON file into two
      files, tests/util/generated_dispatch.c and
      tests/util/generated_dispatch.h.
      
      There are two motivations for breaking code generation into two phases:
      (1) there are other code generation tasks we may add in the future
      (e.g. generating the tests/util/piglit-util-enum.c file), and it would
      be nice not to have to rewrite any parsing code when we do so.  (2) if
      the GL consortium ever decides to change the format of gl.spec, gl.tm,
      and enumext.spec, then we only have to change parse_glspec.py.
      
      These code generation scripts can be run by invoking "make
      piglit_dispatch_gen" from the toplevel source directory.
      
      v2: Add clarifying comments, remove a bogus "print" statement, and
      raise an exception if an unrecognized multiplicity is encountered.
      Also, handle "reference" multiplicity.
      
      v3: Add APIENTRY to stub functions.  Rename "near" and "far" to avoid
      problems on MSVC.  Get rid of "__" in function names.  Rename
      initialize_dispatch_pointers => reset_dispatch_pointers.  Add
      gl_10x_version parameter to get_core_proc().  Output generated code
      relative to CMAKE_BINARY_DIR so that it won't pollute source
      directories when building out of tree.  Add .gitignore so that
      generated files are ignored when building in tree.  Add GL_VERSION_*
      defines.
      6fe17bb7
  26. 09 Sep, 2011 1 commit
  27. 26 Feb, 2011 1 commit