1. 17 Dec, 2020 2 commits
    • Optimize reciprocal sqrt operation · 1cc5b335
      Antonio Maiorano authored
      This change deprecates rr::RcpSqrt_pp with rr::RcpSqrt. As with Rcp,
      RcpSqrt computes the result using Newton-Rhapson if it's faster and the
      initial approximation intrinsic is available on the current target.
      Currently, only LLVM on Intel will use NR for RelaxedPrecision. Note
      that passing in Precision::Relaxed will produce a faster, but less
      precise reciprocal sqrt.
      
      Also made it so that SprivShader instruction GLSLstd450InverseSqrt now
      invokes RcpSqrt(x, Precision::Full) instead of performing 1/sqrt(x).
      Note that the Vulkan spec states that inversesqrt()'s precision is 2
      ULP, and sqrt()'s precision is inherited from 1.0 / inversesqrt();
      however, our rr::Sqrt is implemented in terms of x86's sqrt intrinsic on
      x86, or as calls to sqrt from Math.h.
      
      Bug: b/169760262
      Change-Id: I65ba9a64d1db934c523dda11c1a2c186059d220b
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51268
      Commit-Queue: Antonio Maiorano <amaiorano@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    • Optimize reciprocal operation · d1561871
      Antonio Maiorano authored
      This change deprecates rr::Rcp_pp with rr::Rcp, which makes sure to
      correctly compute the reciprocal using the Newton-Rhapson refinement
      only if the current target supports the required instrinsic, otherwise
      using 1 / x. Currently, only LLVM on Intel will use NR. Note that
      passing in Precision::Relaxed will produce a faster, but less precise
      reciprocal.
      
      Also removed PixelProgram::linearToSRGB as it's unused.
      
      Bug: b/169760262
      Bug: b/149574741
      Change-Id: I4a2f943aa60116c4397d7a8ae18583a260824788
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50648Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Commit-Queue: Antonio Maiorano <amaiorano@google.com>
  2. 15 Dec, 2020 1 commit
  3. 14 Dec, 2020 5 commits
  4. 12 Dec, 2020 1 commit
  5. 11 Dec, 2020 7 commits
  6. 10 Dec, 2020 4 commits
  7. 09 Dec, 2020 8 commits
  8. 07 Dec, 2020 2 commits
  9. 05 Dec, 2020 1 commit
  10. 04 Dec, 2020 7 commits
  11. 02 Dec, 2020 2 commits