1. 24 Feb, 2017 1 commit
  2. 06 Jul, 2016 1 commit
  3. 25 Feb, 2016 1 commit
  4. 23 Feb, 2015 4 commits
  5. 19 Dec, 2014 1 commit
  6. 13 Dec, 2014 1 commit
    • Dylan Baker's avatar
      generated_tests: Except error for os.makedirs · b59ff71e
      Dylan Baker authored
      Currently we check for the existence of a directory, and if it doesn't
      exist we create it. This would be fine, except that multiple generators
      can create the same directory trees. When os.makedirs tries to create a
      tree that already exists it raises and OSError exception, with the errno
      set to 17 (the File Exists Error). Since between the time that a check
      is made and the time the os.makedirs completes a second generator can
      create the directory tree we can have exceptions raised sporadically,
      especially as the number of threads being used to generate goes up.
      
      We maintain the check for existence before trying to create the
      directories because os.makedirs is slow, so not even trying is better
      than trying in vain.
      Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
      b59ff71e
  7. 16 Jun, 2014 1 commit
    • Dylan Baker's avatar
      python: remove all tabs · 8bb10bce
      Dylan Baker authored
      Python doesn't really support mixed spaces and tabs well, and in python3
      upstream finally did the sensible thing and made mixed tab and space
      indents a runtime error.
      
      This patch was generated with the following command on Linux:
      find . -name '*py' | xargs sed -i -e 's@\t@        @g'
      
      It was then hand edited to fix whitespace errors introduced by tabs not
      being 8 spaces.
      Signed-off-by: Dylan Baker's avatarDylan Baker <baker.dylan.c@gmail.com>
      8bb10bce
  8. 02 Jun, 2014 1 commit
  9. 22 May, 2014 1 commit
  10. 18 Feb, 2014 1 commit
  11. 01 Aug, 2013 1 commit
  12. 29 Jul, 2013 1 commit
  13. 15 Feb, 2013 1 commit
    • Paul Berry's avatar
      Add geometry testing to code-generated tests. · ff315ae8
      Paul Berry authored
      This patch adds geometry shader variants to the code-generated
      built-in function tests produced by gen_builtin_uniform_tests.py and
      gen_constant_array_size_tests.py.
      
      Note that there are two ways in which an implementation may expose
      geometry shader support: via GLSL 1.50 or via ARB_geometry_shader4.
      After some discussion on IRC, I've provisionally decided to write most
      of the geometry shader tests using ARB_geometry_shader4, and then only
      supply GLSL-1.50-based tests for basic santy testing and to cover the
      cases where GLSL 1.50 and ARB_geometry_shader4 differ.
      
      Rationale: (a) Mesa is likely to implement ARB_geometry_shader4
      support before GLSL 1.50 support (since Bryan Cain already has some
      work-in-progress geometry shader patches that use
      ARB_geometry_shader4).  (b) there are likely to be some
      implementations that support geometry shaders but not GLSL 1.50
      (e.g. Mesa softpipe, or i965 Gen5); writing most of the tests for
      ARB_geometry_shader4 ensures that those implementations are
      well-covered.
      
      Accordingly, these code-generated tests are written entirely using
      ARB_geometry_shader4.
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      ff315ae8
  14. 31 May, 2012 1 commit
  15. 22 May, 2012 1 commit
  16. 18 Aug, 2011 1 commit
  17. 15 Aug, 2011 1 commit
    • Paul Berry's avatar
      Add operator tests to auto-generated built-in function tests. · 62f30256
      Paul Berry authored
      This patch adds tests for the following built-in GLSL operators:
      
      - op-add, op-sub, op-mult, op-div: binary arithemetic operators on
        floats, vecs, mats, ints, and ivecs.
      
      - op-uplus, op-neg: unary arithmetic operators on floats, vecs, mats,
        ints, and ivecs.
      
      - op-gt, op-lt, op-ge, op-le: comparison operators on ints and floats.
      
      - op-eq, op-ne: equality and inequality comparison on any GLSL 1.20 type.
      
      - op-and, op-or, op-xor: logical operations on bools.
      
      - op-not: unary logical not on bools.
      
      - op-selection: trinary selection operator (x?y:z), where the first
        argument is a bool and the second and third arguments are any GLSL
        1.20 type.
      
      Note that implicit type conversions are not tested.  So, for instance,
      int * ivec is tested, but float * ivec is not.  This was in an effort
      to avoid generating an outrageous number of tests.
      
      Note also that the "shortcut" behavior of logical and/or and trinary
      selection is not tested.
      
      These tests leverage the same test generation framework used to test
      built-in functions, so the tests exercise vertex shaders, fragment
      shaders, and constant folding.
      
      All in all 1332 tests are added, in the subtrees
      spec/glsl-1.{10,20}/{compiler,execution}/built-in-functions.
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      62f30256
  18. 11 Aug, 2011 1 commit
    • Paul Berry's avatar
      Add constant array size builtin tests. · 8a3e129c
      Paul Berry authored
      This patch adds a new set of generated tests which parallels those
      introduced by commt cccc419e (Add comprehensive tests of builtin
      functions with uniform input.)
      
      The new tests validate the correctness of built-in functions when used
      to compute array sizes.  The tests work by creating arrays whose size
      is 1 if the result of applying the built-in function is within
      tolerance of the correct answer, and -1 if not.  Since negative array
      sizes are prohibited, any improperly computed values will generate a
      compile error.
      
      Though it may seem absurd to compute an array size based on the result
      of calling a built-in function, it's worth testing for two reasons:
      
      (1) It is explicitly allowed in GLSL versions since 1.20.
      
      (2) Since array sizes need to be computed at compile time, this is a
      convenient way of testing that the GLSL compiler properly implements
      constant folding of built-in functions.  Indeed, the original
      motivation for these tests was to validate bug fixes to Mesa's
      constant folding logic.
      
      Here is an example of one of the generated tests (this test is
      exp2-vec2.vert):
      
      /* [config]
       * expect_result: pass
       * glsl_version: 1.20
       * [end config]
       *
       * Check that the following test vectors are constant folded correctly:
       * exp2(vec2(-2.0, -0.66666669)) => vec2(0.25, 0.62996054)
       * exp2(vec2(0.66666669, 2.0)) => vec2(1.587401, 4.0)
       */
      
      void main()
      {
        float[distance(exp2(vec2(-2.0, -0.66666669)), vec2(0.25, 0.62996054)) <= 6.7775386e-06 ? 1 : -1] array0;
        float[distance(exp2(vec2(0.66666669, 2.0)), vec2(1.587401, 4.0)) <= 4.3034684e-05 ? 1 : -1] array1;
        gl_Position = vec4(array0.length() + array1.length());
      }
      8a3e129c