1. 15 Oct, 2016 1 commit
    • HLSL: phase 3a: Add sub-vec4 rwtexture formats (qualifier.layoutFormat) · 4f2da27a
      steve-lunarg authored
      This PR sets the TQualifier layoutFormat according to the HLSL image type.
      For instance:
      
        RWTexture1D <float2> g_tTex1df2;
      
      becomes ElfRg32f.  Similar on Buffers, e.g, Buffer<float4> mybuffer;
      
      The return type for image and buffer loads is now taken from the storage format.
      Also, the qualifier for the return type is now (properly) a temp, not a global.
  2. 13 Oct, 2016 2 commits
  3. 12 Oct, 2016 7 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]++++;
    • HLSL: phase 2a: add r-value operator[] for RWTexture/RWBuffer · 6b43d274
      steve-lunarg authored
      This commit adds r-value support for RW textures and buffers.
      Supported is:
      
      - Function in parameter conversions
      - conversion of rvalue use to imageLoad
    • Merge pull request #546 from yavn/OpImageQueryLod-with-SampledImage · e3aa654c
      John Kessenich authored
      SPV: Use SampledImage with OpImageQueryLod
    • SPV: Use SampledImage with OpImageQueryLod · 7208a974
      Maciej Jesionowski authored
      Khronos SPIR-V issue #74
  4. 11 Oct, 2016 4 commits
  5. 10 Oct, 2016 2 commits
  6. 09 Oct, 2016 1 commit
    • Address some compiler warnings. · 49ad2b72
      Alex Szpakowski authored
      - Add explicit casts from long to int.
      - Comment out method argument names that are unused.
      - Always initialize a boolean variable before it's read.
  7. 07 Oct, 2016 1 commit
  8. 06 Oct, 2016 4 commits
  9. 05 Oct, 2016 5 commits
  10. 04 Oct, 2016 1 commit
    • HLSL: fix for flattening assignments from non-symbol R-values. · 2199c240
      steve-lunarg authored
      If a member-wise assignment from a non-flattened struct to a flattened struct sees a complex R-value
      (not a symbol), it now creates a temporary to hold that value, to avoid repeating the R-value.
      This avoids, e.g, duplicating a whole function call.  Also, it avoids re-using the AST node, making a
      new one for each member inside the member loop.
      
      The latter (re-use of AST node) was also an issue in the GetDimensions intrinsic decomposition,
      so this PR fixes that one too.
  11. 03 Oct, 2016 1 commit
  12. 02 Oct, 2016 3 commits
    • add reflection queries to return a TType. Fix minor issue with interface names. · 8ffc36ae
      steve-lunarg authored
      - Add new queries: TProgram::getUniformTType and getUniformBlockTType,
        which return a const TType*, or nullptr on a bad index.  These are valid for
        any source language.
      
      - Interface name for HLSL cbuffers is taken from the (only) available declaration name,
        whereas before it was always an empty string, which caused some troubles with reflection
        mapping them all to the same index slot.  This also makes it appear in the SPIR-V binary
        instead of an empty string.
      
      - Print the binding as part of the reflection textual dump.
      
      - TType::clone becomes const.  Needed to call it from a const method, and anyway it doesn't
        change the object it's called on.
      
      - Because the TObjectReflection constructor is called with a TType *reference* (not pointer)
        so that it's guaranteed to pass in a type, and the "badReflection" value should use a nullptr
        there, that now has a dedicated static method to obtain the bad value.  It uses a private
        constructor, so external users can't create one with a nullptr type.
    • Non-functional: Rationalizing parse helper hierarchy, step 3 (effected editable… · de97fe0a
      John Kessenich authored
      Non-functional: Rationalizing parse helper hierarchy, step 3 (effected editable symbols and IO resize).
    • Non-functional: Rationalizing parse helper hierarchy, step 2 (effected error… · a2a5dd47
      John Kessenich authored
      Non-functional: Rationalizing parse helper hierarchy, step 2 (effected error messaging and cascading errors).
  13. 01 Oct, 2016 8 commits