- 22 Apr, 2020 11 commits
-
-
Ben Clayton authored
The ENABLE_DBG_MSGS flag controls printing of verbose debug messages to stdout as each SPIR-V instruction is executed. This is very handy for performing text diffs when the thread count is reduced to 1 and execution is deterministic. Bug: b/140287657 Change-Id: I3b62f0f9f3017087cf7f2786e1c30497cfa05a20 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31488Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
There's no point writing these to disk, we just overwrite them with the next test. Unfortunately there's no way to actually disable writing these files. Think green! Save a SSD! Change-Id: Ib4f7f9417839acf491eac1828bbae7b067988e06 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44015Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
I missed these when factoring out the root CMakeLists into multiple files. Bug: b/145758253 Change-Id: I9c5869b8bab01d823ae064ef7906566afe1e5933 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44108Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Antonio Maiorano authored
Replace set_target_properties(... LINK_FLAGS ...) with target_link_options. This allows us to keep our link flags variables. Note that this requires CMake 3.13. Bug: b/145758253 Change-Id: I8425f7a8e6db087d4000a721971a0dadfed6c3a5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44110Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Antonio Maiorano authored
A future change will make use of target_link_options, which was added in CMake 3.13. Bug: b/145758253 Change-Id: Icac9609c5d2a9df6039a1d3defeb8db9d3cfd61d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44109Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Antonio Maiorano authored
This is so that we can require CMake 3.13 in order to use target_link_options in a future change. Bug: b/145758253 Change-Id: Ia01743395453160ae658cc507499a68a79d4eede Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44088Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Going above this causes mayhem on my 3990x. Given that this is pretty much top end hardware, I don't think anything else in existance could cope with more than 100. Change-Id: I8b6e4ad09312655c59084aaf5185bb99ee459bdb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44016Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
vk::DescriptorSet has a header which has a pointer to the descriptor set layout, which is needed for vkUpdateDescriptorSets. This information should not be available to shaders during execution. Bug: b/152227757 Change-Id: I088828a28ab4ed75ae84fb3f103455f70a8bc051 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43968 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Nicolas Capens authored
Only the descriptor binding type is needed. It's an implementation detail that we currently store the entire original VkDescriptorSetLayoutBinding structures, which might change in the future. This also avoids specializing generated code for things which should not be treated as pipeline immutable state. Bug: b/152227757 Change-Id: I20ca7de53e972e77649dec20fcf623f818d4f53c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43972 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Install gcc with aptitude instead of apt-get. Mirroring workaround from https://github.com/google/amber/pull/844 Bug: none. Fixing kokoro. Change-Id: I4b57653a539ef78bf037d508dedc47f339c5257d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44130 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
David 'Digit' Turner authored
Fix an issue where tryWait() would abort when called on an unsignaled semaphore. Due to the fact that zx_object_wait_one() will return ZX_ERR_TIMED_OUT in this case (because the expiration time was set with zx_clock_get_monotonic() instead of ZX_TIME_INFINITE). This fixes an issue that appears when vkWaitForIdle() is called by certain Fuchsia Vulkan graphics tests. + Replace ABORT() calls with DABORT() and proper returns to avoid crashing if DCHECK_ALWAYS_ON is not defined at build time. Bug: None Change-Id: Idaf14ed580c0c3ab326705842bcfe5e23eaad2b8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44018 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
David Turner <digit@google.com>
-
- 21 Apr, 2020 1 commit
-
-
Antonio Maiorano authored
In my refactoring of the astc-encoder (https://swiftshader-review.googlesource.com/c/SwiftShader/+/43269), I had incorrectly set the dependency on astc-encoder in the Vulkan module, rather than Device. Vulkan depends on Device, and we make use of astc-encoder public macros in both modules. Thanks to bclayton@ for finding and reporting this problem. Fixes: b/154593186 Fixes: b/154593187 Fixes: b/154589883 Fixes: b/154591494 Fixes: b/154591735 Fixes: b/154593191 Fixes: b/154591498 Fixes: b/154593113 Change-Id: I8a71a6471ef85783110afb4f034a611116892b05 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44148 Presubmit-Ready: Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
- 20 Apr, 2020 1 commit
-
-
Nicolas Capens authored
Use llvm::VectorType::getNumElements() instead by casting to the expected subtype. Bug: b/152339534 Change-Id: I29d2b8d60872f6f4eff4ae2bb38d1738515d11dc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44068 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 17 Apr, 2020 9 commits
-
-
Nicolas Capens authored
When JIT_IN_SEPARATE_THREAD is defined we generate Reactor routines on LLVM in a new thread. Since concurrent code generation was enabled by making ::jit thread-local, we need to assign it the pointer of the thread that creates the new thread. Bug: b/153803432 Change-Id: Ia7454ac5823d61a1fb139b337d2af2de3a5104af Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Switch from std::mutex and std::unique_lock to marl::mutex and marl::lock. The marl versions are TSA-friendly replacements, and do not involve the marl scheduler. Bug: b/153194656 Change-Id: Ief3758fb0d52b8fcdaa4208d2c25ad04c2d40108 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43436Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
David 'Digit' Turner authored
This CL adds -Wno-deprecated-copy to the CLang compile options, to avoid multiple errors with Fuchsia's Clang toolchain. Also updates the package name used to access Fuchsia libaries from FuchsiaSdk to FuchsiaLibraries. This reflects changes performed in https://fuchsia-review.googlesource.com/c/fuchsia/+/379673/ Bug: None Change-Id: Ie97a69a2bd9adaa043b3be2abdbf2e8a6dcd1936 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44017 Presubmit-Ready: David Turner <digit@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
David Turner <digit@google.com>
-
Ben Clayton authored
* changes: Update Marl to 748d3c161 Squashed 'third_party/marl/' changes from 539094011..748d3c161
-
Ben Clayton authored
LLVMReactor used to have a Big Fat Global Mutex over the entire lifetime of the Nucleus object. This was required as LLVMReactor used global variables for storing builder state. Over the past year, there has been significant code cleanup and global state has been reduced to a couple of globals that can now be marked thread_local. With all state now being immutable global or thread local, we are now able to remove the mutex. ASAN and TSAN checks for our unittests are clean. Bug: b/153803432 Change-Id: Ibe4019fb783f86e734387db431539e915369b488 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33484Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Ben Clayton authored
TargetMachine have internal fields mutated during compilation. In order to support concurrent implementation, each compile needs a new TargetMachine. Bug: b/153803432 Change-Id: I1a46d8e0193e6176c777d82ce10008afca91ec94 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44013Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Required for making Reactor thread safe. Bug: b/153803432 Change-Id: I6d36346e22e4ba7a629e280baaa8d293969c366f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44012Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
https://swiftshader-review.googlesource.com/c/SwiftShader/+/43693 added an assert to SpirvShader::Operand that checks the object is a constant or an intermediate. SpirvShader::Impl::Debugger::exposeVariable() was constructing an Operand for pointer object types (but was not using it), firing this assert. Bug: b/129000021 Bug: b/148401179 Change-Id: Id22a92e28b1bb16781b98979d26180b1c022db96 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44014 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
David 'Digit' Turner authored
This changes a CMake FATAL_ERROR message into a WARNING to allow building SwiftShader for arm64 with an LLVM backend properly. Otherwise, the CMake configuration aborts prematurely even if Subzero is not used in the final binaries. Bug: b/154080675 Change-Id: Ia9ea9896d793071c6d275864955a89a1c262c5d6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43853 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
David Turner <digit@google.com> Presubmit-Ready: David Turner <digit@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 16 Apr, 2020 18 commits
-
-
Ben Clayton authored
Changes: 748d3c161 Add usage recommendations to README.md 2939fcfed Replace marl::parallelize() 4b4600208 Fix stupid typo in front page code samples. 742bba9c8 Fix clang-tidy and go-vet warnings. Commands: ./third_party/update-marl.sh --squash Bug: b/140546382 Change-Id: Ia8226c11bafbf40907a4622cfdfae3cdcdc303ba -
Ben Clayton authored
748d3c161 Add usage recommendations to README.md 2939fcfed Replace marl::parallelize() 4b4600208 Fix stupid typo in front page code samples. 742bba9c8 Fix clang-tidy and go-vet warnings. git-subtree-dir: third_party/marl git-subtree-split: 748d3c16165c7dcff018273cfaf9d8f26a33333a
-
Ben Clayton authored
Enable `-Wextra` and `-Wunreachable-code-loop-increment`. Disable `-Wno-unused-parameter`. Detects the build warning / breakage fixed by https://swiftshader-review.googlesource.com/c/SwiftShader/+/43989. Bug: none. Reducing chance of future build breakages. Change-Id: I3001f0ded71f2f71f817581996cc727e345845a3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43991 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Caught with clang -Wextra. Bug: b/150155499 Change-Id: I80bdcaeb7f11954e57fd6e27d8747625eba66694 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43990 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Presubmit-Ready: Ben Clayton <bclayton@google.com>
-
David 'Digit' Turner authored
These were generated by running the LLVM CMake with a Fuchsia toolchain, from the release/10.x branch of https://github.com/ then copying the include/llvm/Config directory here. The content is exactly the same as the linux one, except for config.h due to platform differences. The generated stripped Fuchsia/x64 binary is 25 MiB (compared to 22 MiB for LLVM 7.0). git clone https://github.com/llvm/llvm-project.git --depth=1 git checkout release/10.x cd llvm-project mkdir build && cd build cmake ../llvm -DCMAKE_TOOLCHAIN_FILE=/tmp/cmake-sdk/FuchsiaSdkToolchain.cmake -GNinja ninja -j32 mkdir -p $SWIFTSHADER_DIR/third_party/llvm-10.0/configs/fuchsia/include/llvm cp -r include/llvm/Config $SWIFTSHADER_DIR/third_party/llvm-10.0/configs/fuchsia/include/llvm/ Bug: b/154082485 Change-Id: Ife30265cf77ee79f14face1f0de8e9b9f8d639b1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43851 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
David Turner <digit@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Antonio Maiorano authored
Moved the copy to bin custom command into Vulkan/CMakeLists.txt. We always copy, just like for the GL targets. Bug: b/145758253 Change-Id: Idf3af01b453e202610156eff3b302c41fb0ac292 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43974Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Antonio Maiorano authored
If a project that uses SwiftShader already imports the Vulkan::Headers target, and these are different from the version in SwiftShader, we fail to build because we have a static_assert to match the exact version. Replace compile-time assert with a runtime assert to make sure our code still works with different versions of the headers. This fixes Amber building against SwiftShader. Bug: b/154215163 Change-Id: I39e32370b51c702ab6d0a9790d06c31537f27472 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43973Tested-by:
Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Antonio Maiorano authored
If parent project sets CMAKE_BUILD_TYPE as a non-cache variable (e.g. like https://github.com/google/amber does), CMake emits an error because we're trying to set it as a cache variable. Bug: b/145758253 Change-Id: Ie169c45dd11674be9e40610f5dd711b8fd5830f8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43952 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Pass "-C ${SWIFTSHADER_DIR}" to the git submodule command so that it executes from the SwiftShader directory, and not CMAKE_CURRENT_SOURCE, which will be an outer directory. Also, make sure to always check if one target from the submodule already exists to allow parent projects to add their own version. Also: * Refactor submodule init code into function(InitSubmodule) * Only download libbacktrace if REACTOR_EMIT_DEBUG_INFO is enabled * Add downloads of json and cppdap if SWIFTSHADER_BUILD_CPPDAP is enabled Bug: b/145758253 Change-Id: I3bd3f3fcb7f7190f052d2e6f144468bffa0c79da Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43951 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Essentially, do not assume CMAKE_SOURCE_DIR is the SwiftShader root directory. Instead, we now set SWIFTSHADER_DIR in the root CMakeLists, and use that everywhere. Bug: b/145758253 Change-Id: I4968d0dc06ebd8e45791f7cd956e5aeeefddd54f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43949 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Bug: b/145758253 Change-Id: I15f02fc3f619aac398564f4aacfd30d1dadbe5ef Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43948 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Should have done this in my previous changes. These options aren't meant to be exposed to dependee targets. This also allows us to disable/remove these options on a given target, without depender targets adding them back. Bug: b/145758253 Change-Id: Ieaba6824554d74e65d313409916bdf9ce4fd6182 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43928 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Ben Clayton authored
marl::blocking_call() calls the passed function on another thread. Attempting to unlock a mutex on a different thread that locked it is illegal. Also lock for destruction. Bug: b/140421726 Change-Id: I87226176bc3a1a454d9c79a139f4d42e51f66814 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43908Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Change-Id: I47b09ed307bb2cf4159b375171de0d393a017d3d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43994Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
"ProcessState contains information about an exited process, available after a call to Wait or Run" As ProcessState is only assigned after `Wait()` has completed, and this is run on another goroutine, it may be nil. Check before using it. Change-Id: I319f0703b3547186b53caca8d9d70bc5cd738d34 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43993Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
These used a static for caching the computation, but didn't use a static initializer. This meant there was a race between the check for zero and the assignment. Bug: b/153803432 Change-Id: Id5b91050ced0b8d4811eb32ffed24885816ade7a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43909Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
This will also be used by the pipelines for dynamic recompilation. Bug: b/154158882 Change-Id: I0fe16dbc3bc4eed8ffdd90afcd62f255ca8e4505 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43848 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Fix warning raised by the compiler being too smart for its own good: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment] Bug: b/153194656 Change-Id: Idca543c13213c6e0bd2d1ff2fdbaa48348f53bf2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43989Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-