1. 30 Mar, 2020 7 commits
  2. 29 Mar, 2020 2 commits
  3. 28 Mar, 2020 5 commits
    • Regres: Generate coverage data on nightly runs · 536e2c80
      Ben Clayton authored
      Push this to https://github.com/swiftshader-regres/swiftshader-coverage so that it can be viewed at:
      https://swiftshader-regres.github.io/swiftshader-coverage/
      
      There's quite a lot of new code and fixes in this change. The most notable:
      * The regres daily run for the subzero backend now produces combined coverage information for all the test runs. The LLVM backend does not produce coverage information.
      * Regres now takes two additional command line arguments: `gh-user` and `gh-pass` for the swiftshader-regres account. If you omit these, then coverage will not be produced.
      * test.srcDir has been renamed to checkoutDir, as this was confusing with the `src` directory in the repo.
      * The coverage JSON now contains a root field to describe the git revision to which it relates. This prevents the coverage going out of sync with the source.
      * `git.CheckoutRemoteBranch()` drops back to a depth of 1 again. This was only increased to 99 to deal with issues checking out from gitlab, which we don't do any more.
      * Regres  now builds using `third_party/llvm-10.0`
      * Fixed the `--limit` regres command line flag which wasn't actually limiting, as it was using the len() on the number of groups, not the number of tests.
      
      Bug: b/152192800
      Bug: b/152339534
      Change-Id: I2d25735f485097d4efb080546d989056a3a8aab3
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43168
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
    • Subzero Coroutines: Use ultra-low-level marl APIs · c346653b
      Ben Clayton authored
      Instead of using the `marl::Event` synchronization primitives, drop all the way down to using `marl::Scheduler::Fiber` APIs directly, and use the new `marl::Scheduler::Fiber::wait()` function that does not take a lock.
      
      Provides around another 2x performance boost:
      
      ```
      go run ./third_party/marl/tools/cmd/benchdiff/main.go pre.json post.json
      Delta                | Test name                                | (A) pre.json | (B) post.json
      -2.08x -81.186µs     | Coroutines/Fibonacci/iterations:512      | 156.202µs    | 75.016µs
      -2.10x -668.201µs    | Coroutines/Fibonacci/iterations:4096     | 1.275069ms   | 606.868µs
      -2.11x -5.359326ms   | Coroutines/Fibonacci/iterations:32768    | 10.166126ms  | 4.8068ms
      -2.12x -10.342µs     | Coroutines/Fibonacci/iterations:64       | 19.585µs     | 9.243µs
      -2.13x -2.784542745s | Coroutines/Fibonacci/iterations:16777216 | 5.251299045s | 2.4667563s
      -2.13x -347.220746ms | Coroutines/Fibonacci/iterations:2097152  | 653.812928ms | 306.592182ms
      -2.14x -43.615678ms  | Coroutines/Fibonacci/iterations:262144   | 82.017312ms  | 38.401634ms
      ```
      
      Bug: b/145754674
      Change-Id: I5f6b0c8c92af645cc2a825c6f1e2769b2440638e
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42850Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • Subzero: Ensure coroutines are same-thread. · 76e9e535
      Ben Clayton authored
      Marl now has a new flag on the task to say that it should be run on the same thread that calls `marl::schedule()`.
      
      This can dramatically reduce the scheduling overhead when bouncing between two tasks, as other threads do not have to be woken.
      
      ```
      > go run ./third_party/marl/tools/cmd/benchdiff/main.go pre.json post.json
      Delta                    | Test name                                | (A) pre.json    | (B) post.json
      -15.53x -1m16.299750679s | Coroutines/Fibonacci/iterations:16777216 | 1m21.551049724s | 5.251299045s
      -15.71x -1.206771937s    | Coroutines/Fibonacci/iterations:262144   | 1.288789249s    | 82.017312ms
      -15.72x -9.624071378s    | Coroutines/Fibonacci/iterations:2097152  | 10.277884306s   | 653.812928ms
      -15.77x -35.755µs        | Coroutines/Fibonacci/iterations:8        | 38.176µs        | 2.421µs
      -15.77x -150.190662ms    | Coroutines/Fibonacci/iterations:32768    | 160.356788ms    | 10.166126ms
      -15.79x -18.864275ms     | Coroutines/Fibonacci/iterations:4096     | 20.139344ms     | 1.275069ms
      -15.93x -2.332202ms      | Coroutines/Fibonacci/iterations:512      | 2.488404ms      | 156.202µs
      -15.96x -292.896µs       | Coroutines/Fibonacci/iterations:64       | 312.481µs       | 19.585µs
      ```
      
      Bug: b/145754674
      Change-Id: I0e014083e1dbc9f5cdf51e7abc378df6be22d805
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42410Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • Rename constant cache to snapshot cache · d53eecae
      Nicolas Capens authored
      This helps clarify that the cache is able to take snapshots of its
      contents, and this snapshot can be queried without the overhead of
      acquiring a mutex.
      
      Bug: b/131246679
      Change-Id: I4317628a22f70d37309908b24df62dc5ec5a946c
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42568
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
    • Add sampling routine documentation · 28f4ec36
      Nicolas Capens authored
      Bug: b/152424696
      Change-Id: Ib064ff7f6d88bf965e58c0b640cd90f7f1bc2d83
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42988Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarSean Risser <srisser@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
  4. 27 Mar, 2020 14 commits
    • Fix Android.bp following the SPIRV-Tools update · de3f38a7
      Alexis Hetu authored
      Following the SPIRV-Tools update, Android.bp needs to be manually
      updated to reflect the changes made in SPIRV-Tools.
      
      This change was tested with SwANGLE on Android.
      
      Bug: b/123642959
      Change-Id: I3ba86796a0a5e75d642ef13a0f06735035f1bd5c
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43128Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
    • Regres: Switch to building with LLVM 10 · 1360648d
      Ben Clayton authored
      This is automatically downloaded and cached.
      This is another step towards having hermetic builds, and is required for generating code coverage.
      
      Bug: b/152192800
      Change-Id: I7c35d92f5844b41ad326e7b11a7725cc6ea9696b
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43111Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
    • Regres: Add llvm.Version.Download() to download and verify a LLVM toolchain · 3ca41df3
      Ben Clayton authored
      Will be used to have regres switch to LLVM 10.
      
      Change-Id: Ia425e5d357f4877c5608b9afc89d659ebb38f701
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43110Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
    • Kokoro: Test LLVM 10 backend for ubuntu · c8974b38
      Ben Clayton authored
      Bug: b/152339534
      Change-Id: Iff7d6d8955ce88beb6d9b98545c8d626ccb93801
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43108
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
    • Coverage: Add 'turbo-cov': a faster reimplementation of llvm-cov · 834c0e7a
      Ben Clayton authored
      `llvm-cov` can either emit data in json or lcov formats, where json is the faster of the two.
      `llvm-cov`'s output is directly piped into regres, where the json is immediately deserialized again.
      The cost of serializing and deserializing is surprisingly high.
      
      This change replaces the use of `llvm-cov` with `turbo-cov`, which simply emits a binary stream and offers up to 3x speed improvement, dramatically lowering the time taken to produce coverage for a full deqp test run.
      
      Bug: b/152339534
      Change-Id: I9292f3c27e016cf508557edf4da7656db81c2b07
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42948Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • Don't download all submodules for Kokoro tests · 4e60316e
      Nicolas Capens authored
      The necessary submodules should be downloaded automatically.
      
      Bug: b/141361933
      Change-Id: Icd4690dccb851ecdc67a8f216a5727f1d8b7142a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43068
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • Reactor: Disable more warnings to get LLVM 10 building · a7bc2b97
      Ben Clayton authored
      There's yet more unnecessary semicolons knocking around in the public LLVM headers, which are purely stylistic issues. Just silence them.
      
      `LegacyIRCompileLayer` is now annotated with deprecated, so we need to disable the warning for that too (and move to the new JIT in time).
      
      Bug: b/152339534
      Change-Id: Id84fe88fd2f6b50000e37a8b84f52742ca9db646
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43010Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
    • LLVM 10: Add configs/common and configs/darwin. · a0535bd3
      Ben Clayton authored
      Configs still to add: android, fuchsia, windows
      
      Bug: b/152339534
      Change-Id: Ieb743e50459114343e72f3be43cf6c215f1f03fe
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43013Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • LLVM 10: Add configs/common and configs/linux. · 47146dc4
      Ben Clayton authored
      Configs still to add: android, darwin, fuchsia, windows
      
      Bug: b/152339534
      Change-Id: I721b7a69a0a1e84f09158329557264bf2af9c5d6
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43009Tested-by: 's avatarBen Clayton <bclayton@google.com>
      Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • Update SPIR-V Tools to fd773eb50 · 14b1e3f3
      Alexis Hetu authored
      Includes fix #3253, which fixed the following SwANGLE test:
      KHR-GLES31.core.compute_shader.resources-max
      
      Changes:
          fd773eb50 Start SPIRV-Tools v2020.3
          fd8e13051 Finalize SPIRV-Tools v2020.2
          3ef8fe9a5 Update CHANGES
          022da4d0e Fix identification of Vulkan images and buffers (#3253)
          1346dd5de Disallow phis of images, samplers and sampled images (#3246)
          1c8bda372 Add data structure for DebugScope, DebugDeclare in spirv-opt (#3183)
          e6f372c5c Whitelist SPV_KHR_ray_tracing (#3241)
          7f341ffee Make file formatting comply with POSIX standards (#3242)
          60104cd97 Add opt::Operand::AsCString and AsString (#3240)
          da52d0875 Add RayQueryProvisionalKHR to opt types (#3239)
          18d3896a1 Whitelist SPV_EXT_demote_to_helper_invocation for opt passes (#3236)
          5a97e3a39 Add support for KHR_ray_{query,tracing} extensions (#3235)
          25ede1ced Roll external/spirv-headers/ 30ef660ce..a17e17e36 (1 commit) (#3230)
          7a8f79762 Update dependencies (#3228)
          1fe9bcc10 Instrument: Debug Printf support (#3215)
          6428ad05e spirv-fuzz: Support OpPhi when adding dead break and continue (#3225)
          1af1df3b2 spirv-fuzz: Fix vector width issue in 'add equation instructions' pass (#3223)
          dd3d91691 Allow sampledimage types as operand of OpCopyObject (#3222)
          7c3de218f spirv-fuzz: Remove duplicated functionality (#3220)
          659470446 spirv-fuzz: Allow OpPhi operand to be replaced with a composite synonym (#3221)
          4c027048d spirv-fuzz: Add toggle access chain instruction transformation (#3211)
          533af4981 spirv-fuzz: Add fuzzer pass to permute function parameters (#3212)
          da4cd2148 spirv-fuzz: Use better function name (#3207)
          66a682b6a spirv-fuzz: Add swap commutable operands transformation (#3205)
          044ecc0b2 spirv-fuzz: Fuzzer pass to add equation instructions (#3202)
          a6d3a2dd4 Refactor FuzzerPass::ApplyTransformation code duplication. (#3206)
          e1688b60c Avoid use of Python distutils.dir_util (#3203)
          661e79eec Adding WebGPU specific Workgroup scope rule (#3204)
          70f888131 Add validation rules for OpenCL.DebugInfo.100 extension (#3133)
          fb6e3e48d Combine extinst-name and extinst-output-base into one arg. (#3200)
      
      Commands:
          ./third_party/update-spirvtools.sh
      
      Bug: b/123642959
      Bug: b/148460089
      Change-Id: I8fa5d3609de1c6ae786c84b93cba7ac015b4f56e
    • Squashed 'third_party/SPIRV-Tools/' changes from 8910ea5f1..fd773eb50 · b8a77463
      Alexis Hetu authored
      fd773eb50 Start SPIRV-Tools v2020.3
      fd8e13051 Finalize SPIRV-Tools v2020.2
      3ef8fe9a5 Update CHANGES
      022da4d0e Fix identification of Vulkan images and buffers (#3253)
      1346dd5de Disallow phis of images, samplers and sampled images (#3246)
      1c8bda372 Add data structure for DebugScope, DebugDeclare in spirv-opt (#3183)
      e6f372c5c Whitelist SPV_KHR_ray_tracing (#3241)
      7f341ffee Make file formatting comply with POSIX standards (#3242)
      60104cd97 Add opt::Operand::AsCString and AsString (#3240)
      da52d0875 Add RayQueryProvisionalKHR to opt types (#3239)
      18d3896a1 Whitelist SPV_EXT_demote_to_helper_invocation for opt passes (#3236)
      5a97e3a39 Add support for KHR_ray_{query,tracing} extensions (#3235)
      25ede1ced Roll external/spirv-headers/ 30ef660ce..a17e17e36 (1 commit) (#3230)
      7a8f79762 Update dependencies (#3228)
      1fe9bcc10 Instrument: Debug Printf support (#3215)
      6428ad05e spirv-fuzz: Support OpPhi when adding dead break and continue (#3225)
      1af1df3b2 spirv-fuzz: Fix vector width issue in 'add equation instructions' pass (#3223)
      dd3d91691 Allow sampledimage types as operand of OpCopyObject (#3222)
      7c3de218f spirv-fuzz: Remove duplicated functionality (#3220)
      659470446 spirv-fuzz: Allow OpPhi operand to be replaced with a composite synonym (#3221)
      4c027048d spirv-fuzz: Add toggle access chain instruction transformation (#3211)
      533af4981 spirv-fuzz: Add fuzzer pass to permute function parameters (#3212)
      da4cd2148 spirv-fuzz: Use better function name (#3207)
      66a682b6a spirv-fuzz: Add swap commutable operands transformation (#3205)
      044ecc0b2 spirv-fuzz: Fuzzer pass to add equation instructions (#3202)
      a6d3a2dd4 Refactor FuzzerPass::ApplyTransformation code duplication. (#3206)
      e1688b60c Avoid use of Python distutils.dir_util (#3203)
      661e79eec Adding WebGPU specific Workgroup scope rule (#3204)
      70f888131 Add validation rules for OpenCL.DebugInfo.100 extension (#3133)
      fb6e3e48d Combine extinst-name and extinst-output-base into one arg. (#3200)
      
      git-subtree-dir: third_party/SPIRV-Tools
      git-subtree-split: fd773eb50d628c1981338addc093df879757c2cf
    • Update SPIR-V Headers to f8bf11a02 · fadb38a9
      Alexis Hetu authored
      Changes:
          f8bf11a02 Merge pull request #149 from dgkoch/prov_ray_tracing
          fdbc0d1c4 Add shadercalls scope
          9a186c772 Added ray flags, primitive culling flags, queries
          9e8e6aff3 Non-functional: Update header build to match Khronos spec. builder.
          8830d1d77 Merge pull request #135 from vulturm/patch-1
          95b48cedd Update headers for SPV_KHR_ray_tracing.
          a17e17e36 Merge pull request #148 from null77/fix-gn
          976926d58 Add missing header to BUILD.gn.
          30ef660ce Merge pull request #146 from s-perron/bazel
          0d334e4ad Export NonSemanticDebugPrintf.h in bazel build
          d9ce9ca52 Merge pull request #145 from jeffbolznv/nonsemantic_debugprintf
          e814bf006 Add NonSemantic.DebugPrintf JSON/header
          89bef4096 Fix max enum value
          0a7fc4525 Add grammars, C header, and header generator for vendor and KHR extended instruction sets (#143)
          5dbc1c321 Merge pull request #142 from mkinsner/additional_loop_control_bits
          4b013f0fd Allocate three bits for upcoming Intel extension
          dc77030ac Merge pull request #141 from dneto0/update-buildgn-lic
          9c63d5773 Fix the license to match LICENSE
          0125ae61b Merge pull request #140 from ShabbyX/add_build_gn
          c7f52d34c Add BUILD.gn
          927aae4dc Also propagate SPIRV-Headers version to CMakeLists.txt
      
      Commands:
          ./third_party/update-spirvheaders.sh
      
      Bug: b/123642959
      Change-Id: Iaacec0b1b56e49b53a16e27ddea851ee02cf6d3f
    • Squashed 'third_party/SPIRV-Headers/' changes from 204cd131c..f8bf11a02 · 035acbd2
      Alexis Hetu authored
      f8bf11a02 Merge pull request #149 from dgkoch/prov_ray_tracing
      fdbc0d1c4 Add shadercalls scope
      9a186c772 Added ray flags, primitive culling flags, queries
      9e8e6aff3 Non-functional: Update header build to match Khronos spec. builder.
      8830d1d77 Merge pull request #135 from vulturm/patch-1
      95b48cedd Update headers for SPV_KHR_ray_tracing.
      a17e17e36 Merge pull request #148 from null77/fix-gn
      976926d58 Add missing header to BUILD.gn.
      30ef660ce Merge pull request #146 from s-perron/bazel
      0d334e4ad Export NonSemanticDebugPrintf.h in bazel build
      d9ce9ca52 Merge pull request #145 from jeffbolznv/nonsemantic_debugprintf
      e814bf006 Add NonSemantic.DebugPrintf JSON/header
      89bef4096 Fix max enum value
      0a7fc4525 Add grammars, C header, and header generator for vendor and KHR extended instruction sets (#143)
      5dbc1c321 Merge pull request #142 from mkinsner/additional_loop_control_bits
      4b013f0fd Allocate three bits for upcoming Intel extension
      dc77030ac Merge pull request #141 from dneto0/update-buildgn-lic
      9c63d5773 Fix the license to match LICENSE
      0125ae61b Merge pull request #140 from ShabbyX/add_build_gn
      c7f52d34c Add BUILD.gn
      927aae4dc Also propagate SPIRV-Headers version to CMakeLists.txt
      
      git-subtree-dir: third_party/SPIRV-Headers
      git-subtree-split: f8bf11a0253a32375c32cad92c841237b96696c0
    • Remove two minor compiler warnings/errors: · 48f3f6cb
      David 'Digit' Turner authored
      Found when building with the Fuchsia toolchain, which
      uses a recent clang version:
      
      - The constants '1.0f / 0x7FFFFFFF' and
        '1.0f / 0xFFFFFFFF' cannot be computed directly without
        losing one bit of accuracy, and the compiler was complaining
        about it, so use intermediate double values
        to get the correct, final result.
      
      - The MemoryMapped class needs to be declared final to
        have a final destructor, otherwise the compiler complains
        with:
      
          error: class with destructor marked 'final' cannot be inherited from
          [-Werror,-Wfinal-dtor-non-final-class]
      
      Bug: None
      Change-Id: I9728df87fd5d12418ef7d73aa651eca02b0e36f9
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42888
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
      Tested-by: 's avatarBen Clayton <bclayton@google.com>
  5. 26 Mar, 2020 8 commits
  6. 25 Mar, 2020 4 commits