1. 08 Mar, 2019 1 commit
  2. 02 Mar, 2019 1 commit
  3. 01 Mar, 2019 1 commit
  4. 10 Oct, 2018 1 commit
    • Eric Engestrom's avatar
      run: simplify filename handling · cf466df6
      Eric Engestrom authored
      Compiler wasn't happy about strncpy() depending on the source's length and not
      the target's, but this whole thing can be simplified by simply using asprintf()
      (which is already used in this file, so no #include necessary).
      
      run.c: In function ‘main._omp_fn.0’:
      run.c:964:21: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
                           strncpy(out_filename, current_shader_name,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                   strlen(current_shader_name) + 1);
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@intel.com>
      Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      cf466df6
  5. 20 Jul, 2018 1 commit
    • Timothy Arceri's avatar
      shader-db: simplify and improve SSO handling · 372703f3
      Timothy Arceri authored
      This does two things:
      
      1. Allows cross shader optimisations to be preformed on SSO
         programs that contain more than one stage (seems like I
         don't have any of these in my shader-db collection).
      
      2. Allows us to write compilation errors to stderr. With this
         change I discovered a Deus Ex: MD shader was failing to
         compile (I've reported it to Feral).
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      372703f3
  6. 18 Jun, 2018 1 commit
    • Dongwon Kim's avatar
      run: handling binding of attribute variable name (v2) · 109520ba
      Dongwon Kim authored
      Optional binding of variables can be processed before linking shader
      objects for creating shader program. It is activated by adding lines
      with a keyword "BindAttribLoc" followed by name and index as,
      
      "BindAttribLoc name_str1 <index1>"
      
      For example,
      
      [require]
      ......
      BindAttrbLoc vertex 1
      BindAttrbLoc coord 2
      BindAttrbLoc col 3
      
      This makes the shader-db run
      
      glBindAttribLocation(p, 1, "vertex");
      glBindAttribLocation(p, 2, "coord");
      glBindAttribLocation(p, 3, "col");
      
      before glLinkProgram() to include these binding info in binary shader
      program.
      
      v2: get_shaders returns its own head of list for binding variables
          instead of using a global head to support parallel processing of
          multiple shader_tests
      Signed-off-by: default avatarDongwon Kim <dongwon.kim@intel.com>
      109520ba
  7. 23 May, 2018 1 commit
    • Dongwon Kim's avatar
      run: shader program file created via GetProgramBinary (v5) · 9f6dc480
      Dongwon Kim authored
      With option '-b', shader-db now generates a shader program binary file
      using GetProgramBinary(). This shader program binary can be loaded via
      ProgramBinary() to be executed by an application later.
      
      v2: 1. define MAX_LOG_LEN and use it as the size of gl log
          2. define MAX_PROG_SIZE and use it as the max size of extracted
             shader_program
          3. out_file is now pointer allocated by strdup for the file name
      
      v3: 1. automatically using original shader test file's name +  ".bin"
             as a filename for program binary - better way to cover the case
             with batch compilation of many shader test files in the same
             directory
          2. remove --out=<file name> since it is now unnecessary (due to v3-1.)
             to provide custom file name. Instead, option, "--bin", which is
             basically a flag that enables getting program binary as a file.
          3. Now it tries to get the length of binary by reading program's
             GL_PROGRAM_BINARY_LENGTH_OES parameter
      
      v4: 1. '--bin' -> '-b'
          2. stop generating binary program when failing to retrieve the binary
             size
          3. error checking after malloc for binary program
          4. changed some of variable names
          5. several consecutive fprintfs are consolidated
          6. removed MAX_LOG_LEN and MAX_PROG_SIZE
      
      v5: bug fix: +1 to the length of the output file to cover '\0'
      Signed-off-by: default avatarDongwon Kim <dongwon.kim@intel.com>
      9f6dc480
  8. 04 Apr, 2018 1 commit
  9. 06 Mar, 2018 1 commit
  10. 31 Jan, 2018 3 commits
  11. 13 Sep, 2017 1 commit
  12. 26 Aug, 2017 3 commits
  13. 20 May, 2017 1 commit
  14. 15 May, 2017 1 commit
  15. 15 Mar, 2017 1 commit
  16. 28 Feb, 2017 2 commits
  17. 17 Feb, 2017 2 commits
  18. 10 Dec, 2016 2 commits
  19. 05 Oct, 2016 1 commit
    • Samuel Pitoiset's avatar
      skip the 'GL >= x.y' line if present · 73217dee
      Samuel Pitoiset authored
      shaderdb runner fails at parsing shader_test files when the first
      line inside the require block is not 'GLSL >= x.y'. This just skips
      the GL version requirement which is actually unused and allows to
      compile +164 shaders from piglit.
      73217dee
  20. 13 Sep, 2016 1 commit
  21. 18 Aug, 2016 1 commit
  22. 15 Aug, 2016 1 commit
  23. 27 Jul, 2016 2 commits
    • Kenneth Graunke's avatar
      run: Mark shaders with only one stage as separable. · f7f9e22f
      Kenneth Graunke authored
      There are a couple cases where a single shader might happen:
      
      - compute shaders
        (only one stage, no inputs and outputs; separable shouldn't matter)
      - vertex shaders with transform feedback
        (we want to retain outputs, but transform feedback varyings are
         specified via the API, not the shader - setting SSO fixes this)
      - old shader_test files captured before we started adding "SSO ENABLED".
      
      In any case, it seems harmless or beneficial to enable SSO for all
      .shader_test files containing a single shader.
      
      Based on a patch by Marek.
      
      v2: Ignore VP/FP shaders.
      Acked-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
      Acked-by: default avatarTimothy Arceri <timothy.arceri@collabora.com>
      f7f9e22f
    • Kenneth Graunke's avatar
      run: Add separate shader objects support. · aa14141c
      Kenneth Graunke authored
      With this patch, if a .shader_test file contains
      
          [require]
          ...
          SSO ENABLED
      
      then we'll use glCreateShaderProgramv to create each shader, so that
      they're compiled as separate shader objects.  This prevents the linker
      from removing unused inputs and outputs.  Drivers may also choose to lay
      out interfaces of SSO programs differently, resulting in different code.
      
      v2:
      - Actually initialize use_separate_shader_objects
      - Fix memcmp length parameter (thanks to Matt)
      
      v3:
      - Search for "SSO ENABLED" instead of "GL_ARB_separate_shader_objects",
        to match what Timothy did in shader_runner.
      - Use GL_PROGRAM_SEPARABLE (suggested by Tapani).  This allows
        multi-stage SSO programs to optimize internal interfaces, while
        still making the end-stages separable.
      
      v4:
      - Go back to glCreateShaderProgramv.  Timothy pointed out that Piglit's
        shader_runner compiles each shader separately, and wouldn't optimize
        interfaces between programs.  I want to preserve the same semantics
        between both .shader_test file processors.  Today, it looks like
        multi-stage SSO programs are pretty uncommon (typically every stage
        is separable), so we'll punt on solving that until later.
      Acked-by: Ilia Mirkin's avatarIlia Mirkin <imirkin@alum.mit.edu>
      Acked-by: default avatarTimothy Arceri <timothy.arceri@collabora.com>
      aa14141c
  24. 25 Jul, 2016 1 commit
  25. 02 Jul, 2016 1 commit
  26. 04 Mar, 2016 1 commit
  27. 26 Jan, 2016 1 commit
  28. 09 Jan, 2016 1 commit
  29. 02 Dec, 2015 1 commit
    • Rob Clark's avatar
      Set more env-var's in run.c · 5241a199
      Rob Clark authored
      Simplify the instructions a bit by setting all the potentially needed
      environment variables in run.c itself.
      
      Made very trivially more complex by the fact that all of the gallium
      drivers are using u_debug stuff, so one env var contains potentially
      multiple flags.  We don't want to clobber any other flags that are set
      so we simply append.
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      5241a199
  30. 09 Nov, 2015 2 commits
  31. 27 May, 2015 1 commit