- 06 Dec, 2019 5 commits
-
-
Ben Clayton authored
Should fix the dEQP-VK.synchronization.basic.fence.* flakes. Change-Id: I9995af6bdb25907b97848f1fc249f6fb8ee15e7d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39051Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Ben Clayton authored
• Place all commands into an anonymous namespace. Prevents needless symbol pollution across the SwiftShader library. • Don't use a mix of class and struct for commands - stick to using class. • Prefix commands with 'Cmd' to avoid a symbol collision with Win32 ResetEvent. • Remove pointless 'protected' modifiers. Bug: b/116336664 Change-Id: I05a7d5a196f1b49144be7a685a0923dee1c55fbc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38909Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Based on the discussions on: b/145746360#comment2 Bug: b/145746360 Change-Id: I4b390ebf448a8015d39dfe832ea5d5066637342e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39050Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
SwiftShader Regression Bot authored
Change-Id: I126bd580694a7f26211745d16747d395d1875b65 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39009 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
This migrates from 2-bit swizzle codes per lane to 4-bit, which reads more fluently in hex. The order has been reversed so that the most significant nibble (leftmost on little-endian CPUs) represents the first output lane. Fixed up Swizzle, Mask, and ShuffleLowHigh Bug: b/145746360 Change-Id: I132bd757801a5ca543ef2b9b0ed34d0527db5bfa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39049 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
David Turner <digit@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 05 Dec, 2019 15 commits
-
-
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:Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
David Turner <digit@google.com>
-
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:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
The clip distance is used to perform per-fragment clipping - any fragments with a negative linear-interpolated distance are discarded. The cull distance is used to perform per-primitive culling - any primitives with all vertices with a negative distance are discarded. Bug: b/139207336 Tests: dEQP-VK.clipping.* Change-Id: Ia6680601b27599152f68410df47aaaa726d0b349 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34915 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Paul Thomson authored
If you compile SwiftShader with gcc and the --coverage flag, the build will contain coverage instrumentation. However, the coverage instrumentation races when multiple instances of SwiftShader run in parallel. This change makes Regres replace the string "PROC_ID" inside the GCOV_PREFIX environment variable with an ID that is unique between parallel dEQP processes. This allows the user to prevent races using e.g. GCOV_PREFIX=/tmp/cov/PROC_ID Change-Id: I227896053c5a0ea34dc8acc282014970a626785d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38928Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Paul Thomson <paulthomson@google.com>
-
Chris Forbes authored
Change-Id: Ide10273059331f3bff431f407a9a4692f83d19f3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39008 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Chris Forbes authored
The go docs say the exit code is clobbered by `-1` on abnormal exit, but what they don't say is there's some type mangling along the way so we see it as 255 Bug: b/144426261 Change-Id: Ife77a950e4739afc94b9f5a950a06f4b853708ae Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38989 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
David 'Digit' Turner authored
This CL clarifies the macros used by the external memory and semaphore implementations in the following way: - Replace SWIFTSHADER_EXTERNAL_MEMORY_LINUX_MEMFD with SWIFTSHADER_EXTERNAL_OPAQUE_FD, and do the same for semaphore. This is driven by the fact that there is nothing specific to Linux in the VK_KHR_external_{memory,semaphore}_fd extensions. The fact that Linux and Android use a memfd-backed region is an implementation detail (that is now only captured in VkDeviceMemoryExternalLinux.h). This also opens the door to an OSX implementation of the extension that would use a Mach-based shared memory regions instead. - Remove SWIFTSHADER_EXTERNAL_SEMAPHORE_ZIRCON_EVENT, since the VK_FUCHSIA_external_semaphore extension is platform-specific, and replace all checks against VK_USE_PLATFORM_FUCHSIA instead. NOTE: This shall not change the generated code at all, for any platform. Bug: b/143122483 Bug: b/140421726 Change-Id: If3dffef15df2bf3c39b7860ed401af5a0b95e4e9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38489Reviewed-by:Ben Clayton <bclayton@google.com> Tested-by:
David Turner <digit@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Antonio Maiorano authored
Bug: b/130459196 Change-Id: I19ecfaa6350654b0c4808739a4dd680d2e5506f1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38875 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Antonio Maiorano authored
* Implement intrinsics for the Subzero backend required for ANGLE / SwiftShader for GLES 2 and 3. * Note that most intrinsics are implemented as "emulated". I've added rr::emulated namespace in EmulatedReactor.hpp/cpp that contains the set of Reactor functions that are presently being emulated. These are invoked from SubzeroReactor until we decide to implement proper intrinsics for these in Subzero. Bug: b/130459196 Change-Id: I01171cfa7cc45b078c3b98be6b61328eee4f35e5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38874 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Antonio Maiorano authored
* Implement Nucleus::createCoroutine and acquireCoroutine so that they create a regular function for the Begin entry, and stubbed functions for the Await and Destroy entries. * Made Routine::getEntry const as Coroutine expects this function to be callable from multiple threads. Subzero's implementation would lazily finalize the entry and cache it. Now we finalize it eagerly in acquireRoutine, and getEntry simply returns pointers. Bug: b/130459196 Change-Id: Id9fa447ce55c7df6fb55e1c878ca021e825fecfa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38873 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Subzero's sqrt intrinsic implementation was assuming only scalar float args when moving the result to the destination, despite its sqrt implementation supporting vector float. Bug: b/130459196 Change-Id: I1c5baf2dc72448785add421c87900964f877ce6f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38872 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
Under certain conditions, the Dest value of InstX86Movd doesn't get a register allocated to it. This is unlikely the right fix, as it's unidiomatic, but pending further investigation, this seems to do the trick. Bug: b/145529686 Change-Id: I5b5d5148aef04ebac957d5941779d5cd8e544098 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38871 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
This assert happens when legalizing the operand of an InstAlloca, which comes from when we want to allocate an IceType_v4f32 on the stack. The ConstantInteger32 we create has the wrong type, and Subzero asserts. Bug: b/130459196 Change-Id: I43bd5e516dcd549f5fd35a62ee97cef284a9e656 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38870 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
This is for debugging, when ALLOW_DUMP=1. Bug: b/130459196 Change-Id: I734d73b6996e4c3e53e38f65e47fa7f1b04bfe67 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38869Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Chris Forbes authored
This includes some new rasterization tests which may be interesting for us Change-Id: Ie1eacc45fc25298886eae43a5b48309e6ade067b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38988Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
- 04 Dec, 2019 3 commits
-
-
Alexis Hetu authored
According to the Vulkan spec: "fullDrawIndexUint32 specifies the full 32-bit range of indices is supported for indexed draw calls when using a VkIndexType of VK_INDEX_TYPE_UINT32. maxDrawIndexedIndexValue is the maximum index value that may be used (aside from the primitive restart index, which is always 2^32-1 when the VkIndexType is VK_INDEX_TYPE_UINT32). If this feature is supported, maxDrawIndexedIndexValue must be 2^32-1; otherwise it must be no smaller than 2^24-1." maxDrawIndexedIndexValue is already set to 2^32-1, so there's nothing left to do but enable the feature. Bug: b/145670585 Change-Id: I5f2e554ccd2eb94cd0b0e3c30391b83389200afa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38948 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
SwiftShader Regression Bot authored
Change-Id: I50d4b038701e14b7add07ab35bfbe61fedb97ce3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38849 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Ben Clayton authored
This has caught me out several times now. Time to fix it. Bug: b/126871859 Change-Id: Ia6fa46404ea89e55311721e4be6e37b7a94f1cd3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38916 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 03 Dec, 2019 3 commits
-
-
Chris Forbes authored
We already include the equivalent System/Types.hpp here. This was the sole remaining bit of include crosstalk between the GLES and VK worlds. Bug: b/145318391 Change-Id: I21a1845ac7d5d2d99260c83723233f938240f966 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38769Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Change-Id: Ida07aa22365990b23dbddf59025506c75e880c22 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38768 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Sean Risser authored
We want Vk::Stringify to return the numeric value passed to it when it's in release mode or when it fails to find the matching string. However, we can't do that if we return a char* because the char* will be a pointer to a point on the stack. Bug: b/139528538 Change-Id: I1bab741e7e7aceea44c6179b2159f8a55497d3e0 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38868Reviewed-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Sean Risser <srisser@google.com> Presubmit-Ready: Sean Risser <srisser@google.com>
-
- 30 Nov, 2019 1 commit
-
-
Ben Clayton authored
The full list of optimization passes was taken from RegisterPerformancePasses(). Let's just call that instead of copying the list. This way, we'll keep track of new optimization passes, or re-orderings that are deemed 'better' when updating SPIRV-Tools. Bug: b/144832356 Change-Id: I90c69131b5e55c185892cefc2e5de8180b44ce9d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38454 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 29 Nov, 2019 2 commits
-
-
Paul Thomson authored
Refactor the dEQP runner functions into a package so that others can re-use them. Change-Id: Ia9c92ca708c3f17a87687c2627843922a8c27514 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38812 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Paul Thomson <paulthomson@google.com>
-
SwiftShader Regression Bot authored
Change-Id: If68454e87d38be521e56a220efd3dad5d2740997 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38848 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 28 Nov, 2019 11 commits
-
-
Ben Clayton authored
Instead of rolling yet another version. Bug: b/145351270 Change-Id: Id272ed53278571741e5cdf80dbc7559781163a3d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38820Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
The `dbg` / `Debug` suffix is going to be used to implement parts of the new Vulkan shader debugger. Bug: b/145351270 Change-Id: Ifdd45692aa285ba7875b052857c2ea601f995da2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38819Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: Ia6ec5eebd290538c9c183cedac0226f688342dc2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38818Reviewed-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: Idaa0f1b260361b9bce4f3b9890c083a07f605e6a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38817Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: Ie988c583d2429dac65aaacadf7c89598cd5996c5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38816 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: I202a8c4a126b2de25703bdde6409e878d4f33d31 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38815 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: I69d91df9045e003474abf3b258ce168bb08be7dc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38814 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: I19b9ee325d349e5a0c6ca79cdac2ee1ac8d227a2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38813 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: I1b78cd03247e64f06de77da07b7f08bbc25e326f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38811 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/145336353 Change-Id: I39a5bffc1784c7b35ab9c4016658f4532d6ce5fb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38810 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
SpirvShader had a lot of utility functions in an anonymous namespace at the top of the file. Given that we're going to try splitting up this huge file, we need somewhere common for this code to live. ShaderCore looks like the most appropriate place for this right now. Bug: b/145336353 Change-Id: If4137875098fbeb761fdf63caf8d45011236cff1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38809 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-