1. 12 Jan, 2017 3 commits
  2. 11 Jan, 2017 3 commits
  3. 10 Jan, 2017 1 commit
  4. 09 Jan, 2017 3 commits
  5. 08 Jan, 2017 4 commits
  6. 06 Jan, 2017 6 commits
  7. 05 Jan, 2017 5 commits
  8. 04 Jan, 2017 2 commits
  9. 03 Jan, 2017 7 commits
  10. 02 Jan, 2017 1 commit
  11. 30 Dec, 2016 2 commits
  12. 29 Dec, 2016 1 commit
    • HLSL default function parameters · 26d31453
      steve-lunarg authored
      This PR adds support for default function parameters in the following cases:
      
      1. Simple constants, such as void fn(int x, float myparam = 3)
      2. Expressions that can be const folded, such a ... myparam = sin(some_const)
      3. Initializer lists that can be const folded, such as ... float2 myparam = {1,2}
      
      New tests are added: hlsl.params.default.frag and hlsl.params.default.err.frag
      (for testing error situations, such as ambiguity or non-const-foldable).
      
      In order to avoid sampler method ambiguity, the hlsl better() lambda now
      considers sampler matches.  Previously, all sampler types looked identical
      since only the basic type of EbtSampler was considered.
  13. 27 Dec, 2016 2 commits
    • HLSL: allow scalar type keywords as identifiers, and add half type support. · 5ca85ad9
      steve-lunarg authored
      HLSL allows type keywords to also be identifiers, so a sequence such as "float half = 3" is
      valid, or more bizzarely, something like "float.float = int.uint + bool;"
      
      There are places this is not supported.  E.g, it's permitted for struct members, but not struct
      names or functions.  Also, vector or matrix types such as "float3" are not permitted as
      identifiers.
      
      This PR adds that support, as well as support for the "half" type.  In production shaders,
      this was seen with variables named "half".  The PR attempts to support this without breaking
      useful grammar errors such as "; expected" at the end of unterminated statements, so it errs
      on that side at the possible expense of failing to accept valid constructs containing a type
      keyword identifier.  If others are discovered, they can be added.
      
      Also, half is now accepted as a valid type, alongside the min*float types.
    • HLSL: struct splitting: assignments of hierarchical split types · 132d3318
      steve-lunarg authored
      This commit adds support for copying nested hierarchical types of split
      types.  E.g, a struct of a struct containing both user and builtin interstage
      IO variables.
      
      When copying split types, if any subtree does NOT contain builtin interstage
      IO, we can copy the whole subtree with one assignment, which saves a bunch
      of AST verbosity for memberwise copies of that subtree.