1. 11 Dec, 2019 3 commits
  2. 10 Dec, 2019 15 commits
  3. 09 Dec, 2019 13 commits
  4. 07 Dec, 2019 1 commit
  5. 06 Dec, 2019 6 commits
  6. 05 Dec, 2019 2 commits
    • [vulkan] Add VK_SUBGROUP_FEATURE_ARITHMETIC_BIT support · b9f03f47
      David 'Digit' Turner authored
      As the name suggest, this CL adds many operations related
      to arithmetic subgroup operations, i.e.:
      
        - Reduction / Inclusive Scan / Exclusive Scans for:
      
          - IntAdd, UIntAdd, FloatAdd
          - IntMul, UIntMul, FloatMul,
          - IntMin, UIntMin, FloatMin,
          - IntMax, UIntMax, FloatMax,
          - BitwiseAnd, BitwiseOr, BitwiseXor
          - LogicalAnd, LogicalOr, LogicalXor
      
      The implementation uses a single template function to
      implement all these, based on the fact that these are
      all binary commutative operations.
      
      NOTE: Only 32-bit values are supported.
      
      To make scans efficient, a new Reactor operation, named
      Blend() is introduced. It is used to mix two input vectors
      using 4 3-bit indices (encoded in a single 16-bit value)
      to select the result's lane values.
      
      A new unit-test is added to ReactorUnittests to check its
      behaviour. Unfortunately, the test takes about 2 minutes
      on a fast workstation when doing a full scan, so it will
      by default only check 1/11th of all possible values
      (see comments in the patch for more details).
      
      Also, Float4::positive_inf() and Float4::negative_inf()
      methods were added, since trying to build Float4(INFINITY)
      will trigger a DCHECK() in the Float4(float) constructor,
      and the infinity values are required by the subgroup
      floating-point scan operations.
      
      Bug: b/142002682
      Test: dEQP-VK.subgroups.arithmetic.*
      Change-Id: I86f509fc47f7475ca126615ed698ee493ae835ef
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38929Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarDavid Turner <digit@google.com>
    • Vulkan: Optimize shaderClipDistance and shaderCullDistance · f6a128b6
      Ben Clayton authored
      Only process clip/cull distances if they're actually outputted from the vertex shader.
      
      There's still overhead of having these distances stored in each vertex / primitive, but we should optimize the structure sizes as a larger set of changes.
      
      Bug: b/139207336
      Tests: dEQP-VK.clipping.*
      Change-Id: I8f04b1c3ea823bb1a8cf62f18c987e01cd0c979a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35032Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>