1. 29 Jul, 2019 3 commits
  2. 26 Jul, 2019 1 commit
    • Faster image sampler fetch from key · 3575550a
      Alexis Hetu authored
      This cl makes a tradeoff of a one time conversion of the
      LRUCache to a constant unordered map to save time on a
      costly per pixel imageSampler fetch operation.
      
      When the renderer is idle, the device copies the LRUCache
      to an unordered map, which has faster fetch times. This
      cache is always constant throughout any rendering
      operation, so it can be fetched without a mutex. This copy
      operation happens only if the LRUCache was modified since
      the last copy occurred, so, if all sampling variations
      happened on the first frame, all subsequent frames can
      render much faster.
      
      On MacOS, the Glass demo goes from 2.6 FPS to 20 FPS.
      
      Bug b/129523279 b/137649247
      
      Change-Id: I195ca8b2ead59eb5cc9e75e8b0dc5119c794d717
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34348
      Presubmit-Ready: Alexis Hétu <sugoi@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
  3. 24 Jul, 2019 1 commit
  4. 19 Jul, 2019 5 commits
  5. 17 Jul, 2019 3 commits
  6. 16 Jul, 2019 3 commits
  7. 15 Jul, 2019 6 commits
  8. 11 Jul, 2019 2 commits
    • Fix reporting VK_ERROR_OUT_OF_HOST_MEMORY · 4cd9767e
      Nicolas Capens authored
      The regular C++ operator new calls the installed new-handler on
      out-of-memory, which by default throws std::bad_alloc when exception
      handling is enabled, or aborts when not. Under no circumstance is null
      returned. Furthermore, LLVM installs a new-handler itself, which also
      ends up aborting the program.
      
      Using the std::nothrow version of new does not work because it still
      calls the new-handler. Installing our own non-fatal new-handler is also
      futile because the new operator will re-attempt allocation.
      
      Setting the new-handler to nullptr will cause the nothrow version of new
      to return null on out-of-memory. However, this still overrides any new
      handler which the application may have installed, or, can be overridden
      by the application again at any point.
      
      Instead just use legacy malloc(), which is guaranteed to never throw and
      returns null on failure. This is already checked for by vk::Create() and
      it reports VK_ERROR_OUT_OF_HOST_MEMORY.
      
      Bug: b/137093675
      Change-Id: I6c9ccf738cfd21af9e52382d6e7755071d613d39
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34028
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • Fix for rendering being too dark · f3dce112
      Alexis Hetu authored
      Using a non SRGB format with VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
      yields a resulting image in the wrong color space. Making sure
      a surface format where format and color space are both SRGB
      fixes the issue.
      
      Bug b/137088174
      
      Change-Id: I934e6b60afe5f65d22832162e48aecef773627e8
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34048Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
      Presubmit-Ready: Alexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
  9. 10 Jul, 2019 3 commits
  10. 08 Jul, 2019 1 commit
  11. 05 Jul, 2019 6 commits
  12. 04 Jul, 2019 6 commits