1. Jan 01, 2022
  2. Oct 13, 2021
  3. Oct 12, 2021
  4. Oct 08, 2021
  5. Oct 07, 2021
  6. Oct 06, 2021
  7. Oct 05, 2021
  8. Oct 04, 2021
  9. Oct 03, 2021
  10. Oct 01, 2021
  11. Sep 30, 2021
  12. Sep 29, 2021
    • Jim Blandy's avatar
      Simplify implementation of `Namer::namespace`. (#1438) · 92a97fb7
      Jim Blandy authored
      Eliminate `Namer::namespace_index` and remove namespace indices from
      `Namer::unique` keys. Instead, implement `Namer::namespace` by just swapping in
      a fresh table for the duration of the call.
      
      Create the fresh hash table with the right initial capacity. The prior
      implementation did manage to avoid allocations by sharing a hash table, and we'd
      like to not lose that advantage entirely.
      
      This has no effect on generated code.
      92a97fb7
    • Igor Shaposhnik's avatar
      Emit std430 layout qualifiers for storage buffers (#1435) · a4bf25a0
      Igor Shaposhnik authored
      * Remove unused petgraph dependency from glsl-out
      
      * Emit std430 layout qualifiers for storage buffers
      a4bf25a0
  13. Sep 28, 2021
  14. Sep 27, 2021
    • João Capucho's avatar
      [glsl-in] Use intermediate local if storage class isn't function · 38d74a7f
      João Capucho authored
      Automatically spills to a local variable function call arguments to
      parameters expecting a pointer where the argument storage class isn't
      function since the storage classes wouldn't match.
      38d74a7f
    • João Capucho's avatar
      aa08cf94
    • Jim Blandy's avatar
      [wgsl-out] Correct handling of named pointer expressions. · 8122598f
      Jim Blandy authored
      Treat expressions in `Function::named_expressions` like WGSL `let` declarations,
      assuming that the Load Rule was applied to the rhs of the declaration, meaning
      that their values are always `Indirection::Ordinary`.
      
      Split `write_expr_plain_form` out from `write_expr_with_indirection`, to clean
      up the parenthesis generation: no more `opened_paren` variable, just function
      calls. This makes the early return for named expressions neater.
      
      Fixes #1382.
      8122598f
    • Jim Blandy's avatar
    • Jim Blandy's avatar
      [wgsl-in]: Correctly compare pointer types. · f3ea2130
      Jim Blandy authored
      Treat `TypeInner::ValuePointer` and `TypeInner::Pointer` as equivalent by
      converting them to a canonical form before comparison.
      
      Support `ValuePointer` in WGSL type output.
      
      Fixes #1318.
      f3ea2130
    • Jim Blandy's avatar
      Rename `UniqueArena` methods to more closely resemble `HashSet`. · 6e4401ae
      Jim Blandy authored
      `UniqueArena::fetch_or_append` becomes `insert`.
      
      `UniqueArena::try_get` becomes `get_handle`, by analogy with `get`, that takes a
      type as a key.
      6e4401ae
    • Jim Blandy's avatar
      Use `UniqueArena` for types. · 944a693a
      Jim Blandy authored
      Ensure that each distinct type occurs only once in `Module::types`, so that we
      can use `Eq` on `Type` or `TypeInner` for type equivalence, without being
      confused by differing `Handle<Type>` values that point to identical types.
      
      This removes a number of duplicate types from the ir snapshots.
      
      Fixes #1385.
      944a693a
    • Jim Blandy's avatar
      Consolidate Handle construction code. · d026577a
      Jim Blandy authored
      d026577a
    • Jim Blandy's avatar
    • Jim Blandy's avatar
      Simplify interpolation defaulting. · d44e2ad2
      Jim Blandy authored
      Replace `Module::apply_common_default_interpolation` with a simpler function
      that handles a single `Binding` at a time. In exchange for the simplicity, the
      function must be called at each point function arguments, function results, and
      struct members are prepared. (Any missed spots will be caught by the verifier.)
      
      This approach no longer requires mutating types in the arena, a prerequisite for
      properly handling type identity.
      
      Applying defaults to struct members when the struct declaration is parsed does
      have a disadvantage, compared to the old whole-module pass: at struct parse
      time, we don't yet know which pipeline stages the struct will be used in. The
      best we can do is apply defaults to anything with a `Location` binding. This
      causes needless qualifiers to appear in some output. However, it seems that our
      back end languages all tolerate such qualifiers.
      d44e2ad2
    • João Capucho's avatar
      [Typifier] Some relational functions output vectors · 73f9d072
      João Capucho authored
      Previously the typifier flagged all relational functions as producing a
      scalar boolean but with the exception of `all` and `any`, according to
      the wgsl spec, all other relational functions output a type the same
      size as the input.
      73f9d072
  15. Sep 23, 2021
  16. Sep 22, 2021
  17. Sep 21, 2021