Skip to content
Snippets Groups Projects
  1. Dec 08, 2018
  2. Oct 26, 2018
  3. Oct 25, 2018
  4. Aug 23, 2018
  5. Aug 13, 2018
  6. Aug 09, 2018
  7. Jul 02, 2018
  8. May 10, 2018
  9. Apr 18, 2018
  10. Apr 17, 2018
  11. Apr 06, 2018
  12. Mar 17, 2018
  13. Mar 06, 2018
  14. Feb 22, 2018
  15. Dec 21, 2017
  16. Dec 07, 2017
    • LoopDawg's avatar
      HLSL: add optional position.Y inversion · b22c069f
      LoopDawg authored
      Adds command line options:
      
         --invert-y
         --iy
      
      (synonyms) which invert position.Y on vertex shader output.  Handles these cases:
      
      * Direct single variable return
      * Member of direct returned struct
      * Single variable output parameter
      * Member of struct output parameter
      
      API:
      
          // Enables position.Y output negation in vertex shader
          void TShader::setInvertY(bool invert);
      
      Fixes #1173
      b22c069f
  17. Nov 09, 2017
    • LoopDawg's avatar
      Reverse order of setShiftBindingForSet parameters · e570955c
      LoopDawg authored
      Per feedback on PR #1111, this reverses the order of the parameters for the setShiftBinding API.
      
      It is now:
      
          void TShader::setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set);
      e570955c
  18. Oct 19, 2017
    • LoopDawg's avatar
      Add per-descriptor-set IO mapping shift values. · 08a14422
      LoopDawg authored
      This PR adds the ability to provide per-descriptor-set IO mapping shift
      values.  If a particular binding does not land into a per-set value,
      then it falls back to the prior behavior (global shifts per resource class).
      
      Because there were already 6 copies of many different methods and internal
      variables and functions, and this PR would have added 6 more, a new API is
      introduced to cut down on replication and present a cleaner interface.
      For the global (non-set-specific) API, the old entry points still exist
      for backward compatibility, but are phrased internally in terms of the
      following.
      
          // Resource type for IO resolver
          enum TResourceType {
              EResSampler,
              EResTexture,
              EResImage,
              EResUbo,
              EResSsbo,
              EResUav,
              EResCount
          };
      
      Methods on TShader:
      
          void setShiftBinding(TResourceType res, unsigned int base);
          void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base);
      
      The first method replaces the 6 prior entry points of various spellings, which
      exist now in depreciated form.  The second provides per-resource-set functionality.
      Both accept an enum from the list above.
      
      From the command line, the existing options can accept either a single shift value as
      before, or a series of 1 or more [set offset] pairs.  Both can be provided, as in:
      
          ... --stb 20 --stb 2 25 3 30 ...
      
      which will use the offset 20 for anything except descriptor set 2 (which uses 25) and
      3 (which uses 30).
      08a14422
  19. Sep 27, 2017
    • GregF's avatar
      Enable HLSL legalization · cd1f169c
      GregF authored
      Also added known-good mechanism to fetch latest validated spirv-tools.
      Also added -Od and -Os to disable optimizer and optimize for size.
      
      Fetching spirv-tools is optional for both glsl and hlsl. Legalization
      of hlsl is done by default if spirv-opt is present at cmake time.
      Optimization for glsl is currently done through the option -Os.
      
      Legalization testing is currently only done on four existing shaders.
      A separate baseLegalResults directory holds those results. All previous
      testing is done with the optimizer disabled.
      cd1f169c
  20. Sep 20, 2017
    • LoopDawg's avatar
      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.
      8004d365
  21. Sep 12, 2017
  22. Aug 26, 2017
  23. Aug 25, 2017
  24. Jul 18, 2017
    • LoopDawg's avatar
      Fix crash with --resource-set-binding [n] (common set form, not per-register form) · 52017192
      LoopDawg authored
      --resource-set-binding has a mode which allows per-register assignments of
      bindings and descriptor sets on the command line, and another accepting a
      single descriptor set value to assign to all variables.
      
      The former worked, but the latter would crash when assigning the values.
      This fixes it, and makes the former case a bit more robust against premature
      termination of the pre-register values, which must come in (regname,set,binding)
      triples.
      
      This also allows the form "--resource-set-binding stage setnum", which was
      mentioned in the usage message, but did not parse.
      
      The operation of the per-register form of this option is unchanged.
      52017192
  25. Jul 14, 2017
  26. Jul 06, 2017
  27. Jun 26, 2017
  28. Jun 15, 2017
  29. Jun 07, 2017
  30. Jun 01, 2017
  31. May 31, 2017
  32. May 18, 2017
  33. May 10, 2017
  34. Apr 20, 2017
    • steve-lunarg's avatar
      WIP: HLSL: hlsl register class iomapping · be283550
      steve-lunarg authored
      Adds --hlsl-iomap option to perform IO mapping in HLSL register space.
      
      --shift-cbuffer-binding is now a synonym for --shift-ubo-binding.
      
      The idea way to do this seems to be passing in a dedicated IO resolver, but
      that would require more intrusive restructuring, so maybe best for its
      own PR.
      
      The TDefaultHlslIoResolver class and the former TDefaultIoResolver class
      share quite a bit of mechanism in a common base class.
      
      TODO: tbuffers are landing in the wrong register class, which needs some
      investigation.  They're either wrong upstream, or the detection in the
      resolver is wrong.
      be283550
  35. Apr 05, 2017
  36. Mar 16, 2017
  37. Dec 10, 2016
  38. Dec 05, 2016
  39. Dec 01, 2016
    • steve-lunarg's avatar
      allow renaming of shader entry point when creating SPIR-V · f1e0c871
      steve-lunarg authored
      Use "--source-entrypoint name" on the command line, or the
      TShader::setSourceEntryPoint(char*) API.
      
      When the name given to the above interfaces is detected in the
      shader source, it will be renamed to the entry point name supplied
      to the -e option or the TShader::setEntryPoint() method.
      f1e0c871
  40. Oct 02, 2016
    • steve-lunarg's avatar
      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.
      8ffc36ae
Loading