- 19 Aug, 2019 2 commits
-
-
Chris Forbes authored
Newer Vulkan CTS has started providing this extension structure during device creation. Bug: b/139528538 Change-Id: Ied17274d95acb8be1766f62e21fcc1c6b7594015 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35249Tested-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Sean Risser authored
Now that the GLES unit tests can cause the float calculations in these functions to result in inf and NaN, some platforms are throwing errors when those floats are converted to integers. The Clip*Rect functions no longer continue processing if any operation results in a non-finite value, and tell their callers that they have failed to clip properly. Make Context.cpp set the error state to GL_INVALID_OPERATION when it fails to blit. Bug chromium:979986 Change-Id: I8e11e77b1e25eab37dee97aa616a908737b16036 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35269 Presubmit-Ready: Sean Risser <srisser@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Sean Risser <srisser@google.com>
-
- 16 Aug, 2019 3 commits
-
-
Ben Clayton authored
Bug: b/139010488 Change-Id: I6a152c3df27e89c38ee89d57270b604bbe6d5acf Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35212Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Chris pointed out that ".S" assembler files hint that they should be preprocessed. Now these files have the correct extension, we don't need to be explicit about running assembly files through the preprocessor. Bug: b/139010488 Change-Id: I1399e884071c7fc2f169e93809a9f15204e41eff Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35211Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
This can be #defined in the assembly files, reducing per-build-system complexity. Bug: b/139010488 Change-Id: Ided03000dc5e93e4d1e04ce6f0b57c6e45565545 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35210 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 15 Aug, 2019 8 commits
-
-
Ben Clayton authored
This is backed by a regular heap allocation, so we can read and write to it. Bug: b/139479506 Change-Id: I4a5ef04386120667a27c817c4ac0b59b8b44cd0b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35030Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Change-Id: I7ae85ca4b77ad9d90fb2f30230f1b74e5b1f665a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35248Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
LLVM 7.0 properly supports ARM (unlike the LLVM 3.0 version we used before), including the features needed by our Vulkan implementation (unlike Subzero). Bug: b/115344057 Change-Id: Ic9155b644ab649597219093c3d757862c60a9fa0 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35228 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
Pastel proved that the LLVM path works well for all the architectures we care about for Android. Converted all aspects of the build to Android.bp Bug: b/139147241 Change-Id: I8ad8c2cc816fbb313feaf4a0c4d3dcf40cff37af Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35168 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Chris Forbes authored
- Had to rename .c of .c/.s pair to avoid Android's build system producing name clashes - Rename .s to .S to get assembler-with-cpp behavior Bug: b/139010488 Change-Id: Ib5ee9355e60fe52b1caedfc6ec1b456296d519f5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35188Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
If the merge block M contains phis, and M is a loop header of a second loop, we will get assertions that the back edges of the second loop have not yet been generated. We're only trying to update the phis of M for the lane exits of the first loop, so filter the phi updates to edges from those blocks. Bug: b/139424793 Change-Id: Idc197fb93c28cdc4b91174a687179f9fc498344a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35208 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
vk::trace is pretty much a no-op, and hides warnings and errors. If we do get an error, spirv-opt tends to eat the SPIR-V, leading to a cryptic 'ASSERT(code.size() > 0)' crash. Bug: b/139424793 Change-Id: Ie6f3819265ad0e32e85d4c6b1824d263d9fde02f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35209 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
SwiftShader Regression Bot authored
Change-Id: Ie3fdd1532a899562736b0b9497a7e6ca588ca4e2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35154 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 14 Aug, 2019 26 commits
-
-
Sean Risser authored
If glBlitFramebuffer tries to blit massive rectangles, it can result in NaNs. This change ignores those rectangles instead of trying to blit them. Added a unittest for blitting a framebuffer. Also fixed a typo in a debug message. Bug chromium:979986 Change-Id: Ifd8e379f27b6882044bb93c6a68647b8474e7afc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34428 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Presubmit-Ready: Sean Risser <srisser@google.com> Tested-by:
Sean Risser <srisser@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
David 'Digit' Turner authored
This adds a new header <vulkan/vulkan_fuchsia_extras.h> which provides Fuchsia-specific definitions that are not part of the upstream Khronos headers yet, and are still only available from the Fuchsia platform tree. Putting these into a separate header should make comparisons and updates to the rest of the Khronos headers much easier in the future. Once everything has been upstreamed properly, the extra header will be removed. NOTE: vulkan.hpp is not updated because doing so is tricky and this header is not included by any SwiftShader code. Change-Id: Ifac0f4fde305156dfe6b349935bab321b2f21622 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35130Reviewed-by:Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
David Turner <digit@google.com>
-
Ben Clayton authored
Currently only implements the parallelize() function - useful for evenly distributing workloads across threads. Bug: b/139010488 Change-Id: I7c5705a46afadf137a0cf7fd517b61027ac3a239 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34819Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Ticket is a synchronization primitive used to serially order execution. Bug: b/139010488 Change-Id: I7f34556609b0206c87f57be9c6bc14b21096f8f4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34818Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
BoundedPool<> is a fixed capacity pool which blocks when attempting to borrow an item when the pool is empty. UnboundedPool<> is a automatically growing pool that never blocks. Useful for building data pipelines. Bug: b/139010488 Change-Id: Ie1ceec970a866d9d0107247ad2baaced7f024973 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34817Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
WaitGroup is a synchronization primitive that holds an internal counter that can incremented, decremented and waited on until it reaches 0. WaitGroups can be used as a simple mechanism for waiting on a number of concurrently execute a number of tasks to complete. Bug: b/139010488 Change-Id: I086859b81509076de3dbce8a5fde656ab4e4e347 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34816Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Basically a partial clone of std::condition_variable, but works with fibers / the scheduler. Bug: b/139010488 Change-Id: Ia89a4930f8c203b03197a4dda9ddd585ae5d8e40 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34815Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
The yarn::containers namespace holds STL-like container implementations that are optimized for avoiding heap allocations. Bug: b/139010488 Change-Id: I9620488c607742132aff9dfdd35a7582a82bf687 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34814Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
When enabled, it writes out a chrome trace file populated with events from the YARN_* event macros. Bug: b/139010488 Change-Id: Ifae27b2bcf08f767e9886664b1a998162a617108 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34813Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
The scheduler is the core of Yarn, and has tight coupling with the OS-abstracted Scheduler::Fiber class. Added basic tests - this will be expanded in later changes. Bug: b/139010488 Change-Id: I562c61d3c4551c4347d9306a3dd87efed06e45a5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34812Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
This lets us use the SAL annotations to detect locking bugs on MSVC, and are nops on other platforms. Bug: b/139010488 Change-Id: Ibe63befa9fb88078d2af3e9a9ade71bd21a37090 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34811Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Contains static methods that abstract OS-specific thread / cpu queries and control. Bug: b/139010488 Change-Id: Idab47624598c3585d7741058ba62974faadc191d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34810Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Windows uses OSFiber_windows.hpp. macOS and Linux uses OSFiber_asm_* or OSFiber_ucontext.hpp Android has no support for makecontext / swapcontext, and so relies on the OSFiber_asm_* implementations. Unlike makecontext, swapcontext or the Windows fiber APIs, these assembly implementations *do not* save or restore signal masks, floating-point control or status registers, FS and GS segment registers, thread-local storage state nor any SIMD registers. This should not be a problem as the yarn scheduler requires fibers to be executed on a single thread. Bug: b/139010488 Change-Id: I5f890ffe4f069361a7eeae64567a77be3a4ba008 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34771Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Provides a number of standard debug macros. assert_has_bound_scheduler() is stubbed as it depends on the Scheduler (coming in a later change). Bug: b/139010488 Change-Id: I1854404477efb982c26e7ad3273c2ca544fd1725 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34770Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
These are RAII-based helpers for ensuring that logic is executed, regardless of the control flow path taken. Bug: b/139010488 Change-Id: I7bea0e550aaccf7504221a661ed2cd04e46018f9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34769Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
David 'Digit' Turner authored
This small CL allows one to build and run the VulkanUnitTests suite for Fuchsia using the Chromium build system. Note that the output library generated by the BUILD.gn file is also renamed libvk_swiftshader.so to correspond to the name used by other build systems (e.g. CMakeList.txt and Android.{mk,bp}). This also avoids a Fuchsia-specific issue, where the packaging scripts under //build/fuchsia/ (in the Chromium src/ tree), get confused when a generated library has the same name as one of the system libraries (in this case, libvulkan.so, which is the Vulkan loader provided by the SDK, and which must be copied into the final Fuchsia package along the ICD). Note also that most tests crash inside the generated coroutine machine code :-/ Instructions to properly rebuild and test this: - Have depot_tools in your path, and a valid Chromium source checkout. - Ensure that your .gclient file contains 'fuchsia' in its `target_os` list variable definition, otherwise add it and run `gclient sync` again to fetch the Fuchsia SDK and other dependencies. - Create an output directory configured for a Fuchsia/x64 build, then rebuild the test suite target, e.g.: gn gen out/Fuchsia --args 'target_os="fuchsia" target_cpu="x64" \ use_goma = true \ root_extra_deps = [ \ "//third_party/swiftshader/tests/VulkanUnitTests:swiftshader_vulkan_unittests" \ ]' ninja -C out/Fuchsia swiftshader_vulkan_unittests - Run the test suite with the wrapper script: out/Fuchsia/bin/run_swiftshader_vulkan_unittests NOTE: This will start a QEMU instance running a Fuchsia system image automatically. + Define VK_USE_PLATFORM_FUCHSIA when building for Fuchsia. This will be used by future CLs that add support for Fuchsia-specific extensions. Change-Id: I687f51e98ee3cb16f6d585f44f4bb5f0631b1cd8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911Tested-by:David Turner <digit@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Bug: b/139010488 Change-Id: I9ea07d945a9dae6f9b92c283be0052ee68865be2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34809Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Bug: b/139010488 Change-Id: Ie5f753df22a55dd2718b0e6ee24e48678d6a956c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34808 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
We had these already for UInt4. Bug: b/139010488 Change-Id: Idb9451db1221da7b309b64ef407abcea33fea21e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34768 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
There was lots of duplicate code here. Add SpirvRoutine::setImmutableInputBuiltins() to de-duplicate the setting of compile-time constant values. Add SpirvRoutine::setInputBuiltin() to unify the method for setting input builtins. Change-Id: If3c2632b4fdd74f050d2dc1494349ca359ea92fb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35108 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Implements the following opcodes: • OpGroupNonUniformShuffleUp • OpGroupNonUniformShuffleDown Bug: b/133510501 Tests: dEQP-VK.subgroups.* Change-Id: Ia0c8b3f90b9247e7052c287601e110107dbaa17e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35090 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Implements the following opcodes: • OpGroupNonUniformShuffle • OpGroupNonUniformShuffleXor Bug: b/133510501 Tests: dEQP-VK.subgroups.* Change-Id: I85dcfebe3d56d7c5a73b7fdbcb88885e7e228747 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35089 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Replace these with the more generic AndAll() and OrAll(). These can be used to clean up some existing code. Bug: b/133510501 Tests: dEQP-VK.subgroups.* Change-Id: I49f84f6c7088c1c810a0dfda5358a2cc4778f79d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35088 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Implements the following opcodes: • OpGroupNonUniformAll • OpGroupNonUniformAny • OpGroupNonUniformAllEqual Bug: b/133510501 Tests: dEQP-VK.subgroups.* Change-Id: Ic2ff8d99bfc7d21d7dc356eae170a95f1d016fcc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35068 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Implements the following opcodes: • OpGroupNonUniformBroadcast • OpGroupNonUniformBroadcastFirst • OpGroupNonUniformBallot • OpGroupNonUniformInverseBallot • OpGroupNonUniformBallotBitExtract • OpGroupNonUniformBallotBitCount • OpGroupNonUniformBallotFindLSB • OpGroupNonUniformBallotFindMSB Also don't yield for subgroup scoping - this is pointless, and does not currently work for graphics shaders. Bug: b/133510501 Tests: dEQP-VK.subgroups.* Change-Id: I39470bfa9f2184344d1c22e36975db0e23e48cc9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35033 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Some capabilities affect downstream behaviour in unexpected ways. For example: https://github.com/KhronosGroup/glslang/issues/1868 Bug: b/139207336 Change-Id: I43b4f1ab3558864bb6cb93c0cbf780d0dd2e3406 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35029Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
- 13 Aug, 2019 1 commit
-
-
Ben Clayton authored
"The CMakeSettings.json file contains information that specifies how Visual Studio should interact with CMake to build a project for a specified platform" More information can be found here: https://docs.microsoft.com/en-us/cpp/build/cmakesettings-reference?view=vs-2019 Bug: b/139189696 Change-Id: Ib2d6a79ad997b39538d49e17c3362818b8deaac4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35091Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-