1. 02 Jun, 2021 2 commits
  2. 31 May, 2021 1 commit
  3. 29 May, 2021 2 commits
  4. 27 May, 2021 4 commits
  5. 26 May, 2021 1 commit
  6. 22 May, 2021 1 commit
  7. 21 May, 2021 3 commits
  8. 20 May, 2021 1 commit
  9. 19 May, 2021 3 commits
  10. 17 May, 2021 1 commit
  11. 14 May, 2021 2 commits
  12. 12 May, 2021 2 commits
    • Work around MemorySanitizer scalar SSE false positives · c4d054c6
      Nicolas Capens authored
      Scalar SSE instructions only use the lowest scalar of an SSE vector
      register, but MemorySanitizer doesn't recognize some of them so it will
      check the entire 128-bit operand for uninitialized bits.
      
      This change makes sure the other elements of the vector gets zero-
      initialized instead of leaving it undefined. This affects Round, Trunc,
      Frac, Ceil, Floor, Sqrt, and RcpSqrt scalar operations.
      
      Note that this workaround results in MemorySanitizer marking the entire
      output vector to have a well-defined value, which isn't actually the
      case in non-MSan builds. Fortunately, a scalar can't be cast into a
      vector (unlike our 'emulated' small vectors), so we just have to make
      sure to immediately extract the scalar from the intrinsic's result.
      
      Bug: b/172238865
      Change-Id: If68388e476ac9e27e2de33ddf2efab4124540c7a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54269
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
    • Work around MemorySanitizer movmsk false positives · b162fcf9
      Nicolas Capens authored
      MemorySanitizer does not recognize the x86 movmskps and pmovmskb
      instructions. In such cases it falls back to checking all input operands
      for uninitialized bits. This causes false positives specifically with
      Reactor's Byte8 type which is often loaded from memory, leaving the
      upper 64-bit of an SSE register undefined.
      
      This change masks out the unused parts of the input vector, leaving just
      the sign bits.
      
      Bug: b/172238865
      Change-Id: I50c921a7ff8a4ebdba89136bb82c9f46ccdc3769
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54268
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
  13. 11 May, 2021 1 commit
  14. 10 May, 2021 3 commits
  15. 07 May, 2021 1 commit
  16. 06 May, 2021 2 commits
  17. 05 May, 2021 4 commits
  18. 28 Apr, 2021 1 commit
  19. 22 Apr, 2021 1 commit
    • Format switch statements consistently · 112faf44
      Nicolas Capens authored
      Each non-fallthrough case should end with a break (or return). If a
      scope is needed because local variables are defined, it should end
      before this break.
      
      This avoids bugs such as:
      
      switch(i)
      {
      case 0:
          if(c)
          {
              // lots
              // of
              // code
      
              // Easy to misread as always breaking instead of conditionally
              // falling through due to not spotting the if(c).
              break;
          }
      
      case 1:
          // ...
      }
      
      The new scope should also be indented. It makes it easier to spot where
      each case ends and where the switch ends. This is achieved by setting
      IndentCaseBlocks to true.
      
      Lastly, the case labels themselves should not be indented. Like goto
      labels they mark where in the code to jump to, and the code itself is
      already indented within the switch block.
      
      Bug: b/144825072
      Change-Id: I9a130d1d234795f53b5872e411f1315f56a0e908
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39551
      Commit-Queue: Nicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
  20. 20 Apr, 2021 2 commits
  21. 16 Apr, 2021 1 commit
  22. 14 Apr, 2021 1 commit