1. 27 Mar, 2020 7 commits
    • 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>
  2. 26 Mar, 2020 8 commits
  3. 25 Mar, 2020 12 commits
  4. 24 Mar, 2020 6 commits
  5. 23 Mar, 2020 3 commits
  6. 20 Mar, 2020 1 commit
    • Subzero: fix CoroutineBegin generation · 22d73d15
      Antonio Maiorano authored
      Rework how instructions are injected at the top of the CoroutineBegin
      function by getting rid of replaceEntryNode, which attempted to replace
      the entry node with a non-entry one. This seemed to work on all targets,
      except for Windows x86-32 (Win32) when passing enough arguments to
      Coroutines. In this case, it would crash in the code generated right
      after this injected code. It looks like the code in replaceEntryNode is
      not quite right, resulting in Subzero creating needless stack allocs per
      argument, and ultimately generating invalid offsets from the stack
      pointer.
      
      Instead of fixing replaceEntryNode, I now simply remember the entryNode
      for CoroutineBegin to use, adding the rest to a separate node for
      basicBlock, and when finalizing the function, I connect entryNode to the
      initial basicBlock node via a branch. This way, there is not messing
      around with function's node list.
      
      This not only fixes the crash, but gets rid of the needless stack
      allocs per arg.
      
      Bug: angleproject:4482
      Change-Id: I13f9c8c43ee07f35302208d9876e6fbdf0b1ad26
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42608
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
  7. 19 Mar, 2020 2 commits
  8. 18 Mar, 2020 1 commit
    • Subzero: fix external function calls on x86-32 · bc98fbee
      Antonio Maiorano authored
      On x86-32, the CALL instruction takes an IP-relative target address.
      These are emitted as relocatable addresses, which we fix up in
      rr::loadImage in SubzeroReactor.cpp. The problem is that we were calling
      loadImage multiple times when compiling Coroutine functions - three
      times, in fact, since there are three Coroutine functions (create,
      await, destroy). As such, we would fixup the same relocatable addresses
      multiple times, but the fixup uses the existing value, so it would
      become invalid after the second fixup. To fix this, we now only call
      loadImage once, collecting all entry points at once.
      
      Also opportunistically fixed a missing argument to coro::isDone, and
      added a static_assert to sz::Call to avoid this happening again.
      
      Bug: angleproject:4482
      Change-Id: If847d02649152abc1a9d8476023dd240465fa736
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42448
      Presubmit-Ready: Antonio Maiorano <amaiorano@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>