Skip to content
Snippets Groups Projects
  1. Oct 28, 2017
  2. Oct 27, 2017
  3. Oct 25, 2017
  4. Oct 24, 2017
  5. Oct 23, 2017
  6. Oct 22, 2017
  7. Oct 21, 2017
  8. Oct 20, 2017
  9. Oct 19, 2017
    • John Kessenich's avatar
    • 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
    • John Kessenich's avatar
    • John Kessenich's avatar
      GLSL: Make sampling operations have agnostic precision qualifiers for desktop. · f0e35bf0
      John Kessenich authored
      Desktop defaults to highp for samplers, but this should not apply to the built-in
      functions, so make it appy only to user declarations.
      f0e35bf0
  10. Oct 18, 2017
  11. Oct 17, 2017
  12. Oct 16, 2017
  13. Oct 12, 2017
  14. Oct 07, 2017
  15. Oct 06, 2017
    • Sebastian Tafuri's avatar
      4f6865f4
    • LoopDawg's avatar
      HLSL: split textures used for both shadow and non-shadow modes · 73c57bbe
      LoopDawg authored
      A single texture can statically appear in code mixed with a shadow sampler
      and a non-shadow sampler.  This would be create invalid SPIR-V, unless
      one of them is provably dead.
      
      The previous detection of this happened before DCE, so some shaders would
      trigger the error even though they wouldn't after DCE.  To handle that
      case, this PR splits the texture into two: one with each mode.  It sets
      "needsLegalization" (if that happens for any texture) to warn that this shader
      will need post-compilation legalization.
      
      If the texture is only used with one of the two modes, behavior is as it
      was before.
      73c57bbe
  16. Oct 04, 2017
  17. Oct 03, 2017
  18. Oct 02, 2017
    • LoopDawg's avatar
      HLSL: add subpass input types and methods · 7f93d56e
      LoopDawg authored
      Add support for Subpass Input proposal of issue #1069.
      
      Subpass input types are given as:
      
          layout(input_attachment_index = 1) SubpassInput<float4> subpass_f;
          layout(input_attachment_index = 2) SubpassInput<int4>   subpass_i;
          layout(input_attachment_index = 3) SubpassInput<uint4>  subpass_u;
      
          layout(input_attachment_index = 1) SubpassInputMS<float4> subpass_ms_f;
          layout(input_attachment_index = 2) SubpassInputMS<int4>   subpass_ms_i;
          layout(input_attachment_index = 3) SubpassInputMS<uint4>  subpass_ms_u;
      
      The input attachment may also be specified using attribute syntax:
      
          [[vk::input_attachment_index(7)]] SubpassInput subpass_2;
      
      The template type may be a shorter-than-vec4 vector, but currently user
      structs are not supported.  (An unimplemented error will be issued).
      
      The load operations are methods on objects of the above type:
      
          float4 result = subpass_f.SubpassLoad();
          int4   result = subpass_i.SubpassLoad();
          uint4  result = subpass_u.SubpassLoad();
      
          float4 result = subpass_ms_f.SubpassLoad(samp);
          int4   result = subpass_ms_i.SubpassLoad(samp);
          uint4  result = subpass_ms_u.SubpassLoad(samp);
      
      Additionally, the AST printer could not print EOpSubpass* nodes.  Now it can.
      
      Fixes #1069
      7f93d56e
  19. Sep 30, 2017
  20. Sep 29, 2017
  21. Sep 28, 2017
    • LoopDawg's avatar
      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.
      195f584e
  22. 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
    • Rex Xu's avatar
      Implement extension GL_NV_shader_atomic_int64 · e8fe8b0d
      Rex Xu authored
      e8fe8b0d
  23. 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
  24. Sep 19, 2017
  25. Sep 15, 2017
Loading