1. 21 Oct, 2016 4 commits
  2. 20 Oct, 2016 1 commit
    • HLSL: fix defect in EOpMethodSampleCmp* texture decomposition · 6b596682
      steve-lunarg authored
      HLSL holds the compare value in a separate intrinsic arg, but the AST wants
      a vector including the cmp val, except in the 4-dim coord case, where it
      doesn't fit and is in fact a separate AST parameter.  This is awkward but
      necessary, given AST semantics.  In the process, a new vector is constructed
      for the combined result, but this vector was not being given the correct
      TType, so was causing some downstream troubles.
      
      Now it is.  A similar defect existed in OpTextureBias, and has also been
      fixed.
  3. 19 Oct, 2016 3 commits
  4. 18 Oct, 2016 1 commit
    • HLSL: Fix unary and binary operator type conversion issues · e5921f13
      steve-lunarg authored
      This fixes defects as follows:
      
      1. handleLvalue could be called on a non-L-value, and it shouldn't be.
      
      2. HLSL allows unary negation on non-bool values.  TUnaryOperator::promote
         can now promote other types (e.g, int, float) to bool for this op.
      
      3. HLSL allows binary logical operations (&&, ||) on arbitrary types, similar
         (2).
      
      4. HLSL allows mod operation on arbitrary types, which will be promoted.
         E.g, int % float -> float % float.
  5. 16 Oct, 2016 8 commits
  6. 15 Oct, 2016 4 commits
  7. 14 Oct, 2016 1 commit
  8. 13 Oct, 2016 14 commits
  9. 12 Oct, 2016 4 commits
    • HLSL: phase 2e: introduce lower level addBinaryNode/UnaryNode fns · b3da8a9c
      steve-lunarg authored
      - hlsl.struct.frag variable changed to static, assignment replacd.
      
      - Created new low level functions addBinaryNode and addUnaryNode.  These are
        used by higher level functions such as addAssignment, and do not do any
        argument promotion or conversion of any sort.
      
      - Two functions above are now used in RWTexture lvalue conversions.  Also,
        other direction creations of unary or binary nodes now use them, e.g, addIndex.
        This cleans up some existing code.
      
      - removed handling of EOpVectorTimesScalar from promote()
      
      - removed comment from ParseHelper.cpp
    • HLSL: phase 2d: minor cleanup, & allow operator[] on non-rw textures · 07830e80
      steve-lunarg authored
      Improve comments.
      A few tweaked lines allow [] on non-rw tx.  Add test case for this.
      Improve VectorTimesScalar handling.
    • HLSL: phase 2c: use lValueErrorCheck in HLSL FE · 0de16da2
      steve-lunarg authored
      This commit splits lValueErrorCheck into machine dependent and independent
      parts.  The GLSL form in TParseContext inherits from and invokes the
      machine dependent part in TParseContextBase.  The base form checks language
      independent things.  This split does not change the set of errors tested
      for: the test results are identical.
      
      The new base class interface is now used from the HLSL FE to test lvalues.
      There was one test diff due to this, where the test was writing to a uniform.
      It still does the same indirections, but does not attempt a uniform write.
    • HLSL: phase 2b: add l-value operator[] for RWTexture/RWBuffer · 90707966
      steve-lunarg authored
      This commit adds l-value support for RW texture and buffer objects.
      Supported are:
      
      - pre and post inc/decrement
      - function out parameters
      - op-assignments, such as *=, +-, etc.
      - result values from op-assignments.  e.g, val=(MyRwTex[loc] *= 2);
      
      Not supported are:
      - Function inout parameters
      - multiple post-inc/decrement operators.  E.g, MyRWTex[loc]++++;