1. 28 Sep, 2017 1 commit
    • HLSL: force textures to shadow modes from combined samplers · 195f584e
      LoopDawg authored
      Texture shadow mode must match the state of the sampler they are
      combined with.  This change does that, both for the AST and the
      symbol table.  Note that the texture cannot easily be *created*
      the right way, because this may not be known at that time.  Instead,
      the texture is subsequently patched.
      
      This cannot work if a single texture is used with both a shadow and
      non-shadow sampler, so that case is detected and generates an error.
      This is permitted by the HLSL language, however.  See #1073 discussion.
      
      Fixed one test source that was using a texture with both shadow and
      non-shadow samplers.
  2. 26 Sep, 2017 1 commit
  3. 25 Sep, 2017 1 commit
  4. 23 Sep, 2017 1 commit
  5. 22 Sep, 2017 1 commit
  6. 21 Sep, 2017 1 commit
    • CMake changes for HLSL legalization · fd34f0e6
      GregF authored
      Cmake now looks for External/spirv-tools. If found, it links in
      SPIRV-Tools-opt and SPVRemapper, and adds -DENABLE_OPT to build.
  7. 20 Sep, 2017 1 commit
    • Remapper: make remapper robust against non-exiting error handlers · 8004d365
      LoopDawg authored
      Remapper errors are generally fatal: there has been some unexpected situation while
      parsing the SPV binary, and there is no reasonable way to carry on.  The
      errorHandler() function is called in this case, which by default exits, but
      it is possible to submit a handler which does not.  In that case the remapper would
      carry on in a bad state.
      
      This change ensures a graceful termination of the remap() function.
      
      While a try {} catch {} construct would be the ideal and safe way to do this,
      that's off limits for certain environments, so this tries to do the same thing
      with explicit code, to catch all the bailout paths.
  8. 19 Sep, 2017 1 commit
  9. 16 Sep, 2017 1 commit
  10. 15 Sep, 2017 4 commits
  11. 14 Sep, 2017 2 commits
    • HLSL: handle split InputPatch templat type in patch constant functions · 4a145dbf
      LoopDawg authored
      InputPatch parameters to patch constant functions were not using the
      internal (temporary) variable type.  That could cause validation errors
      if the input patch had a mixture of builtins and user qualified members.
      
      This uses the entry point's internal form.
      
      There is currently a limitation: if an InputPatch is used in a PCF,
      it must also have appeared in the main entry point's parameter list.
      That is not a limitation of HLSL.  Currently that situation is detected
      and an "implemented" error results.  The limitation can be addressed,
      but isn't yet in the current form of the PR.
    • HLSL: allow mixed user & builtin members in hull shader output structure · a5d86164
      LoopDawg authored
      Hull shaders have an implicitly arrayed output.  This is handled by creating an arrayed form of the
      provided output type, and writing to the element of it indexed by InvocationID.
      
      The implicit indirection into that array was causing some troubles when copying to a split
      structure.  handleAssign was able to handle simple symbol lvalues, but not an lvalue composed
      of an indirection into an array.
  12. 13 Sep, 2017 1 commit
  13. 12 Sep, 2017 10 commits
  14. 11 Sep, 2017 1 commit
    • Delete unused 'this' capture · 933c10cd
      mchock-nv authored
      Remove an unused 'this' entry from a lambda capture list.
      
      This cleans up a unused-lambda-capture warning.
  15. 09 Sep, 2017 1 commit
  16. 08 Sep, 2017 1 commit
  17. 07 Sep, 2017 2 commits
  18. 06 Sep, 2017 1 commit
    • Fix lvalue check in SPIR-V generation · 76117921
      LoopDawg authored
      There were several locations in TGlslangToSpvTraverser::handleUserFunctionCall testing for
      whether a fn argument should be in the lvalue or rvalue array.  They must get the same
      result for indexing sanity, but had slightly different logic.
      
      They're now forced into the same test.
  19. 05 Sep, 2017 1 commit
  20. 01 Sep, 2017 3 commits
  21. 31 Aug, 2017 3 commits
    • Fix issues of GL_ARB_viewport_layer_array · 2a305f65
      Rex Xu authored
    • Merge pull request #1037 from LoopDawg/clip-cull-geom · 75e057f9
      John Kessenich authored
      HLSL: add geometry stage support for clip/cull distance
    • HLSL: add geometry stage support for clip/cull distance · 5e5b12e9
      LoopDawg authored
      Changes:
      
      (1) Allow clip/cull builtins as both input and output in the same shader stage.  Previously,
      not enough data was tracked to handle this.
      
      (2) Handle the extra array dimension in GS inputs.  The synthesized external variable can
      now be created with the extra array dimension if needed, and the form conversion code is
      able to handle it as well.
      
      For example, both of these GS inputs would result in the same synthesized external type:
      
          triangle in float4 clip[3] : SV_ClipDistance
      
          triangle in float2 clip[3][2] : SV_ClipDistance
      
      In the second case, the inner array dimension packs with the 2-vector of floats into an array[4],
      which there is an array[3] of due to the triangle geometry.
  22. 29 Aug, 2017 1 commit