1. 13 Jan, 2017 1 commit
  2. 12 Jan, 2017 3 commits
  3. 11 Jan, 2017 3 commits
  4. 10 Jan, 2017 1 commit
  5. 09 Jan, 2017 3 commits
  6. 08 Jan, 2017 4 commits
  7. 06 Jan, 2017 6 commits
  8. 05 Jan, 2017 5 commits
  9. 04 Jan, 2017 2 commits
  10. 03 Jan, 2017 7 commits
  11. 02 Jan, 2017 1 commit
  12. 30 Dec, 2016 2 commits
  13. 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.
  14. 27 Dec, 2016 1 commit
    • 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.