1. 07 Oct, 2013 3 commits
  2. 03 Oct, 2013 1 commit
  3. 02 Oct, 2013 2 commits
  4. 29 Sep, 2013 1 commit
  5. 21 Sep, 2013 1 commit
  6. 17 Sep, 2013 1 commit
  7. 09 Sep, 2013 2 commits
    • Matt Turner's avatar
      glsl: Add conditional-select IR. · 7aaa3872
      Matt Turner authored
      It's a ?: that operates per-component on vectors. Will be used in
      upcoming lowering pass for ldexp and the implementation of frexp.
      
       csel(selector, a, b):
         per-component result = selector ? a : b
      Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      7aaa3872
    • Kenneth Graunke's avatar
      glsl: Pass _mesa_glsl_parse_state into matching_signature and such. · 3e820e3a
      Kenneth Graunke authored
      During compilation, we'll use this to determine built-in availability.
      The plan is to have a single shader containing every built-in in every
      version of the language, but filter out the ones that aren't actually
      available to the shader being compiled.
      
      At link time, we don't actually need this filtering capability: we've
      already imported prototypes for every built-in that the shader actually
      calls, and they're flagged as is_builtin().  The linker doesn't import
      any additional prototypes, so it won't pull in any unavailable
      built-ins.  When resolving prototypes to function definitions, the
      linker ensures the values of is_builtin() match, which means that a
      shader can't trick the linker into importing the body of an unavailable
      built-in by defining a suspiciously similar prototype.
      
      In other words, during linking, we can just pass in NULL.  It will work
      out fine.
      Signed-off-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
      Reviewed-by: default avatarPaul Berry <stereotype441@gmail.com>
      3e820e3a
  8. 27 Aug, 2013 1 commit
  9. 15 Aug, 2013 1 commit
  10. 02 Aug, 2013 2 commits
  11. 30 Jul, 2013 1 commit
  12. 12 Jul, 2013 2 commits
    • Brian Paul's avatar
      tgsi: rename the TGSI fragment kill opcodes · 46205ab8
      Brian Paul authored
      TGSI_OPCODE_KIL and KILP had confusing names.  The former was conditional
      kill (if any src component < 0).  The later was unconditional kill.
      At one time KILP was supposed to work with NV-style condition
      codes/predicates but we never had that in TGSI.
      
      This patch renames both opcodes:
        TGSI_OPCODE_KIL -> KILL_IF   (kill if src.xyzw < 0)
        TGSI_OPCODE_KILP -> KILL     (unconditional kill)
      
      Note: I didn't just transpose the opcode names to help ensure that I
      didn't miss updating any code anywhere.
      
      I believe I've updated all the relevant code and comments but I'm
      not 100% sure that some drivers had this right in the first place.
      For example, the radeon driver might have llvm.AMDGPU.kill and
      llvm.AMDGPU.kilp mixed up.  Driver authors should review their code.
      Reviewed-by: default avatarJose Fonseca <jfonseca@vmware.com>
      46205ab8
    • Brian Paul's avatar
      tgsi: fix-up KILP comments · f501baab
      Brian Paul authored
      KILP is really unconditional fragment kill.
      
      We've had KIL and KILP transposed forever.  I'll fix that next.
      Reviewed-by: default avatarJose Fonseca <jfonseca@vmware.com>
      f501baab
  13. 02 Jul, 2013 1 commit
  14. 21 Jun, 2013 2 commits
  15. 12 Jun, 2013 1 commit
  16. 24 May, 2013 1 commit
  17. 17 May, 2013 1 commit
    • Roland Scheidegger's avatar
      st/mesa: fix weird UCMP opcode use for bool ubo load · 0346e9b3
      Roland Scheidegger authored
      I don't know what this code was trying to do but whatever it was it couldn't
      have worked since negation of integer boolean inputs while not specified as
      outright illegal (not yet at least) won't do anything since it doesn't affect
      the result of comparison with zero at all. In fact it looks like the whole
      instruction can just be omitted.
      Reviewed-by: default avatarMarek Olšák <maraeo@gmail.com>
      0346e9b3
  18. 13 May, 2013 1 commit
    • Ian Romanick's avatar
      glsl: Add lowering pass for ir_triop_vector_insert · ee7a6dad
      Ian Romanick authored
      This will eventually replace do_vec_index_to_cond_assign.  This lowering
      pass is called in all the places where do_vec_index_to_cond_assign or
      do_vec_index_to_swizzle is called.
      
      v2: Use WRITEMASK_* instead of integer literals.  Use a more concise
      method of generating broadcast_index.  Both suggested by Eric.
      
      v3: Use a series of scalar compares instead of a single vector compare.
      Suggested by Eric and Ken.  It still uses 'if (cond) v.x = y;' instead
      of conditional assignments because ir_builder doesn't do conditional
      assignments, and I'd rather keep the code simple.
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      ee7a6dad
  19. 12 May, 2013 1 commit
  20. 11 May, 2013 1 commit
  21. 08 May, 2013 1 commit
  22. 06 May, 2013 2 commits
  23. 17 Apr, 2013 1 commit
    • José Fonseca's avatar
      gallium: Disambiguate TGSI_OPCODE_IF. · 50b3fc62
      José Fonseca authored
      TGSI_OPCODE_IF condition had two possible interpretations:
      
      - src.x != 0.0f
      
        - Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was false either for
          vertex and fragment shaders
        - gallivm/llvmpipe
        - postprocess
        - vl state tracker
        - vega state tracker
        - most old drivers
        - old internal state trackers
        - many graw examples
      
      - src.x != 0U
      
        - Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was true for both
          vertex and fragment shaders
        - tgsi_exec/softpipe
        - r600
        - radeonsi
        - nv50
      
      And drivers that use draw module also were a mess (because Mesa would
      emit float IFs, but draw module supports native integers so it would
      interpret IF arg as integers...)
      
      This sort of works if the source argument is limited to float +0.0f or
      +1.0f, integer 0, but would fail if source is float -0.0f, or integer in
      the float NaN range.  It could also fail if source is integer 1, and
      hardware flushes denormalized numbers to zero.
      
      But with this change there are now two opcodes, IF and UIF, with clear
      meaning.
      
      Drivers that do not support native integers do not need to worry about
      UIF.  However, for backwards compatibility with old state trackers and
      examples, it is advisable that native integer capable drivers also
      support the float IF opcode.
      
      I tried to implement this for r600 and radeonsi based on the surrounding
      code.  I couldn't do this for nouveau, so I just shunted IF/UIF
      together, which matches the current behavior.
      Reviewed-by: default avatarRoland Scheidegger <sroland@vmware.com>
      Reviewed-by: default avatarMarek Olšák <maraeo@gmail.com>
      
      v2:
      - Incorporate Roland's feedback.
      - Fix r600_shader.c merge conflict.
      - Fix typo in radeon, spotted by Michel Dänzer.
      - Incorporte  Christoph Bumiller's patch to handle TGSI_OPCODE_IF(float)
        properly in nv50/ir.
      50b3fc62
  24. 11 Apr, 2013 1 commit
    • Dave Airlie's avatar
      st/mesa: add support for ARB_texture_multisample (v3) · f152da6b
      Dave Airlie authored
      This adds support to the mesa state tracker for ARB_texture_multisample.
      
      hardware doesn't seem to use a different texture instructions, so
      I don't think we need to create one for TGSI at this time.
      
      Thanks to Marek for fixes to sample number picking.
      
      v2: idr pointed out a bug in how we picked the max sample counts,
      use new internal format chooser interface to pick proper answers.
      v3: use st_choose_format directly, it was okay, fix anding of masks.
      Reviewed-by: default avatarMarek Olšák <maraeo@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      f152da6b
  25. 29 Mar, 2013 1 commit
  26. 26 Mar, 2013 2 commits
  27. 19 Mar, 2013 3 commits
  28. 15 Mar, 2013 2 commits