1. 27 Dec, 2016 1 commit
    • 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.
  2. 26 Dec, 2016 1 commit
    • HLSL: inter-stage structure splitting. · a2e75310
      steve-lunarg authored
      This adds structure splitting, which among other things will enable GS support where input structs
      are passed, and thus become input arrays of structs in the GS inputs.  That is a common GS case.
      
      The salient points of this PR are:
      
      * Structure splitting has been changed from "always between stages" to "only into the VS and out of
        the PS".  It had previously happened between stages because it's not legal to pass a struct
        containing a builtin IO variable.
      
      * Structs passed between stages are now split into a struct containing ONLY user types, and a
        collection of loose builtin IO variables, if any.  The user-part is passed as a normal struct
        between stages, which is valid SPIR-V now that the builtin IO is removed.
      
      * Internal to the shader, a sanitized struct (with IO qualifiers removed) is used, so that e.g,
        functions can work unmodified.
      
      * If a builtin IO such as Position occurs in an arrayed struct, for example as an input to a GS,
        the array reference is moved to the split-off loose variable, which is given the array dimension
        itself.
      
      When passing things around inside the shader, such as over a function call, the the original type
      is used in a sanitized form that removes the builtIn qualifications and makes them temporaries.
      This means internal function calls do not have to change.  However, the type when returned from
      the shader will be member-wise copied from the internal sanitized one to the external type.
      The sanitized type is used in variable declarations.
      
      When copying split types and unsplit, if a sub-struct contains only user variables, it is copied
      as a single entity to avoid more AST verbosity.
      
      Above strategy arrived at with talks with @johnkslang.
      
      This is a big complex change.  I'm inclined to leave it as a WIP until it can get some exposure to
      real world cases.
  3. 22 Dec, 2016 1 commit
  4. 21 Dec, 2016 10 commits
  5. 20 Dec, 2016 8 commits
  6. 19 Dec, 2016 7 commits
    • Build: Fix #633, add missing overrides. · 432576fd
      John Kessenich authored
    • Merge pull request #637 from KhronosGroup/token-paste · 0955b1cb
      John Kessenich authored
      PP: Implement token pasting for PP identifiers.
    • Merge pull request #624 from steve-lunarg/remapper-strip-removed · e6cbc5b1
      John Kessenich authored
      WIP: Remapper: remove debug info for IDs stripped in other passes
    • Merge pull request #635 from steve-lunarg/sample-fix-2 · 4ba444b6
      John Kessenich authored
      HLSL: allow "sample" in expressions.
    • Merge pull request #625 from jbeich/gcc6 · 059d46ee
      John Kessenich authored
      Unbreak build on FreeBSD with GCC/libstdc++ 6.2.0
    • PP: Implement token pasting for PP identifiers. · d485e0b7
      John Kessenich authored
      Implement token pasting as per the C++ specification, within the current
      style of the PP code.
      Non-identifiers (turning 12 ## 10 into the numeral 1210) is not yet covered;
      they should be a simple incremental change built on this one.
      Addresses issue #255.
    • HLSL: allow "sample" in expressions. · a64ed3eb
      steve-lunarg authored
      Unlike other qualifiers, HLSL allows "sample" to be either a qualifier keyword or an
      identifier (e.g, a variable or function name).
      
      A fix to allow this was made a while ago, but that fix was insufficient when 'sample'
      was used in an expression.  The problem was around the initial ambiguity between:
      
         sample float a; // "sample" is part of a fully specified type
      and
         sample.xyz;     // sample is a keyword in a dot expression
      
      Both start the same.  The "sample" was being accepted as a qualifier before enough
      further parsing was done to determine we were not a declaration after all.  This
      consumed the token, causing it to fail for its real purpose.
      
      Now, when accepting a fully specified type, the token is pushed back onto the stack if
      the thing is not a fully specified type.  This leaves it available for subsequent
      purposes.
      
      Changed the "hlsl.identifier.sample.frag" test to exercise this situation, distilled
      down from a production shaders.
  7. 17 Dec, 2016 1 commit
  8. 15 Dec, 2016 1 commit
  9. 14 Dec, 2016 3 commits
  10. 13 Dec, 2016 1 commit
    • Fix size_t to int cast warnings. · 3ec327c5
      Jamie Madill authored
      Several instances in Visual Studio 2015:
      
      warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
  11. 12 Dec, 2016 2 commits
  12. 10 Dec, 2016 3 commits
  13. 09 Dec, 2016 1 commit
    • Add missing header and drop duplicate one · 1bcb254a
      Jan Beich authored
      In file included from C:/Projects/glslang/glslang/MachineIndependent/glslang.y:59:0:
      glslang/MachineIndependent/ParseHelper.h:276:24: error: 'va_list' has not been declared
                              va_list args);
                              ^~~~~~~