1. 15 Jul, 2020 1 commit
  2. 14 Jul, 2020 3 commits
  3. 13 Jul, 2020 5 commits
  4. 11 Jul, 2020 3 commits
    • Fix copying of multiple image layers · ad65826a
      Nicolas Capens authored
      Only a single layer was being copied in the case of 2D array to 2D array
      copies. In the case of 2D array to 3D image copies, or vice-versa, the
      extent depth is the same as the layer count as per the Vulkan
      requirements, but this relied on the layer pitch to be the same as the
      slice pitch, which isn't true when layers contain multiple mipmap
      levels.
      
      Both issues have been addressed by adding a loop to iterate over the
      layers, adjusting the pitch in case a layer is copied to/from a slice.
      The inner loop for copying slices to slices is used for 3D image to
      3D image copies, and for multisample 2D image to multisample 2D image
      copies (which can also have multiple layers).
      
      Also clarify the Image::getLastLayerIndex() and getLastMipLevel()
      methods should not be used for VkImageSubresourceLayers structures used
      by copy, blit, and resolve operations (they require explicit layer and
      level counts). VkImageSubresourceRange is only for image view creation,
      memory barriers, and clear operations, which accept the use of
      VK_REMAINING_ARRAY_LAYERS and VK_REMAINING_MIP_LEVELS.
      
      Bug: b/159666631
      Bug: swiftshader:152
      Change-Id: If998795e2b5e55950cc9fa23373a7300b6d2e0fc
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46132
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    • Fix copying of multisample images · 2aace0d7
      Nicolas Capens authored
      Multisample images can be copied to other multisample images with the
      same number of samples, without undergoing multisample resolve.
      
      We were using the Blitter::copy() code path both for vkCmdCopyImage and
      attachment resolve operations at the end of subpasses, leading to
      resolve operations happening on copy commands. They are now detangled
      and copy() is able to handle multiple samples the same way as 3D
      slices.
      
      Bug: b/159210008
      Change-Id: I4c285ca7ca58e9f8c6cf7bd942041e038b042cb9
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46129
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    • Fix image slice / plane name usage · c55fd97b
      Nicolas Capens authored
      Image planes have a distinct meaning in Vulkan, signifying the disjoint
      memory regions which store components of a texel format. Typically this
      includes YCbCr formats that can have 2 or 3 planes for luminance and
      chroma data.
      
      Slices refer to 2D sections of 3D images. Currently we also use slices
      for storing each sample of a multisample image separately. Note only
      2D images can be multisampled, so there are no 3D images with slices
      for the depth and the number of samples.
      
      Bug: b/159210008
      Change-Id: I4b70a7b8bb49e79c7494e28aa8280752a5b9727d
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46288
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
  5. 10 Jul, 2020 4 commits
  6. 09 Jul, 2020 2 commits
  7. 08 Jul, 2020 5 commits
  8. 07 Jul, 2020 4 commits
  9. 06 Jul, 2020 4 commits
  10. 02 Jul, 2020 2 commits
  11. 01 Jul, 2020 1 commit
  12. 30 Jun, 2020 1 commit
  13. 28 Jun, 2020 1 commit
    • Optimize clearing of depth and stencil images · b3240d0c
      Nicolas Capens authored
      Extend Blitter::fastClear(), which is based on memset() instead of using
      Reactor routines, to also handle D32_SFLOAT and S8_UINT formats.
      
      Benchmark results:
      
      Run on (48 X 2594 MHz CPU s)
      CPU Caches:
        L1 Data 32 KiB (x24)
        L1 Instruction 32 KiB (x24)
        L2 Unified 256 KiB (x24)
        L3 Unified 30720 KiB (x2)
      --------------------------------------------------------------------------
      Benchmark                                Time             CPU   Iterations
      --------------------------------------------------------------------------
      (LLVM, before)
      ClearImage/VK_FORMAT_D32_SFLOAT       3.74 ms        0.016 ms         1000
      
      (LLVM, after)
      ClearImage/VK_FORMAT_D32_SFLOAT       1.08 ms        0.044 ms        10000
      
      (Subzero, before)
      ClearImage/VK_FORMAT_D32_SFLOAT       4.51 ms        0.063 ms         1000
      
      (Subzero, after)
      ClearImage/VK_FORMAT_D32_SFLOAT      0.963 ms        0.040 ms         7467
      
      This change re-implements https://swiftshader-review.googlesource.com/c/SwiftShader/+/45888
      which was reading 'clearValue' out of bounds when accessing color[1]
      when it's only a single depth or stencil value.
      
      Bug: b/159455503
      Bug: chromium:1097740
      Change-Id: Id3e74b4fa28ee0422540a8480814f8c9988f402a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45949
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
  14. 26 Jun, 2020 1 commit
  15. 23 Jun, 2020 3 commits