- 03 Feb, 2017 5 commits
-
-
Jorge E. Moreira authored
The BackoffLock spins idle for a while when waiting for a locked mutex before yielding the core, thus wasting many CPU cycles. Modern pthread implementations have low overhead mutexes which make the thread sleep if the lock is already held, and efficiently resume them it becomes available. Change-Id: I26b64c86db620739671373fd0d82085744d34fa8 Reviewed-on: https://swiftshader-review.googlesource.com/8648Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Since floating-point scalars are stored in vector registers, Subzero allows us to just bitcast between them, eliminating a load and insert before shuffling. Change-Id: Ibccf242fd4cfc28604f35f420a04fd4ee6eabe52 Reviewed-on: https://swiftshader-review.googlesource.com/8575Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Array accesses with unsigned indices can be faster on x86-64 because we can take advantage of implicit zero-extension of 32-bit integers to 64-bit during pointer arithmetic. Change-Id: I17d531d9ad05c2d2994f007d5444b2a514a591b8 Reviewed-on: https://swiftshader-review.googlesource.com/8571Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Greg Hartman authored
BUG: 30979264 Change-Id: I315bc6e6b64a012896542667d7db58f3516b29de Reviewed-on: https://swiftshader-review.googlesource.com/8649Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Greg Hartman <ghartman@google.com>
-
Greg Hartman authored
Test: foo Change-Id: I27a139266d34d26f5d3468e3993a502f0596ae7d Reviewed-on: https://swiftshader-review.googlesource.com/8650Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Greg Hartman <ghartman@google.com>
-
- 02 Feb, 2017 2 commits
-
-
Nicolas Capens authored
After a pthread_join() call the handle becomes invalid or could be recycled by another thread, leading to undefined behavior when attempting to join it again. Also, on Windows the handle has to be closed to free it. Bug b/34883464 Change-Id: Ib20d0539b6b46e331c6378b3a9f0c2a334d34892 Reviewed-on: https://swiftshader-review.googlesource.com/8612Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Alexis Hetu authored
Modified the BUILD.gn files in order to be able to easily switch between Subzero and LLVM back ends. Note that Subzero compilation should already work on Linux, as soon as the Wheezy to Jessie update lands. For now, only Windows will build Subzero. Also removed linux hack from libEGL build file. Change-Id: Ic584b604496c4b4f745b05d72a752f056495055b Reviewed-on: https://swiftshader-review.googlesource.com/8630Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 01 Feb, 2017 1 commit
-
-
Alexis Hetu authored
Linux handled the extra / properly, but Windows did not, so it had to be removed. Change-Id: Ie42d8777aef83c0024bc9b3e5c631ece7e87e236 Reviewed-on: https://swiftshader-review.googlesource.com/8629Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 31 Jan, 2017 2 commits
-
-
Victor Khimenko authored
When second arch is translated we don't have 32-bit platform and 64-bit platform. Instead we have two 32-bit ones, just one is translated. Test: Build system refactoring CL. Existing unit tests still pass. BUG=31422117 BUG=27526885 Change-Id: Ia5fdd2f485dd5e4e8bc6799f0691cd03c2bff1a0 Reviewed-on: https://swiftshader-review.googlesource.com/8609Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com> (cherry picked from commit f24b1b445274b0dbb4ffc860847a26d0b33d3a21) Reviewed-on: https://swiftshader-review.googlesource.com/8611
-
Greg Hartman authored
The 3.0 camera HAL makes extensive use of HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, which Android defines as the format that is best for the hardware. The fake camera implementation decided that that was RGBX8888, so it seem like that is what we should use. Test: untested Change-Id: Ia02ebbefd015f9ca099b4393daf5d464f38fe8fc Reviewed-on: https://swiftshader-review.googlesource.com/8588Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
- 30 Jan, 2017 7 commits
-
-
Nicolas Capens authored
Bug b/34799114 Change-Id: Id42d3b784946291d8754774a7916a186a4694ba1 Reviewed-on: https://swiftshader-review.googlesource.com/8591Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Change-Id: I82f8215ce4366e0795ce249b4d8f6c8e391af96c Reviewed-on: https://swiftshader-review.googlesource.com/8568Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Alexis Hetu authored
Fixed MacOS build after the recent Linux fix caused an issue on MacOS. Removed a few flags and changed visibility to fix it. Change-Id: Ic9d08d8ec0ccf8a2002f2787c3ec79861bb59139 Reviewed-on: https://swiftshader-review.googlesource.com/8589Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Change-Id: I4136781005cbd0551461adecdd94d8e3cc8688d0 Reviewed-on: https://swiftshader-review.googlesource.com/8570Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
operator[] on a pointer was using the vector register size (16 bytes) instead of the size of the (emulated) vector type. Change-Id: Ice8677b41a3af81176fe9495fd02ede9f8b0482f Reviewed-on: https://swiftshader-review.googlesource.com/8569Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Stores are dead if the address is from an alloca and all uses of the address are stores, not just when it's a single store. Change-Id: I5b65a64e21b9e398922e5440c35f0d318c03e911 Reviewed-on: https://swiftshader-review.googlesource.com/8574Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
If a store address has no definition, it must be a pointer argument. Unlike stores to alloca's, these are not dead. Change-Id: I66e50b14ffea1cfc61fc756b5545ab8ae28b4bf8 Reviewed-on: https://swiftshader-review.googlesource.com/8573Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 27 Jan, 2017 2 commits
-
-
Alexis Hetu authored
In order to add Subzero as a dependency in Chromium, Chromium's DEPS file will be modified to use SwiftShader's DEPS file in order to pull SwiftShader's desired revision of Subzero. This will ensure that SwiftShader and Subzero are always in sync. Change-Id: I0b24845c0ddbf974baac4ef6cc3ff6ab397d5f69 Reviewed-on: https://swiftshader-review.googlesource.com/8529Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Alexis Hetu authored
Although SwiftShader was building properly on the build bots, it wasn't exporting its symbols properly. I compared the flags used in the BUILD.gn files and in the CMakeLists.txt file and attempted to get both build systems to use the same flags and options. Change-Id: Idc73d4ad5b45311881e88720bf611e25110dcc70 Reviewed-on: https://swiftshader-review.googlesource.com/8576Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 25 Jan, 2017 2 commits
-
-
Nicolas Capens authored
Constant operands of commutative operations preferably go on the right hand side to avoid requiring an extra register for two operand instructions. Also, Subzero assumes constants in pointer arithmetic are on the right hand side to consider optimizing it into an addressing mode. Change-Id: Ife5a471903d5f4bef0c19b6c908d75715f06bfec Reviewed-on: https://swiftshader-review.googlesource.com/8548Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Change-Id: I40922c89056cacd00f9d728dfe1f3f12824c81a1 Reviewed-on: https://swiftshader-review.googlesource.com/3253Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 23 Jan, 2017 2 commits
-
-
Greg Hartman authored
BUG: 31072273 Change-Id: I037505ad3ab1ba80aecab4e24ec8d1932df2dcf7 Reviewed-on: https://swiftshader-review.googlesource.com/7030Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Lingfeng Yang <lfy@google.com>
-
Nicolas Capens authored
MAP_ANON has been deprecated in favor of MAP_ANONYMOUS, but Mac OS only defines MAP_ANON. Bug chromium:630728 Change-Id: I7345a5f9227acbc0caa29d8103855ab531f16499 Reviewed-on: https://swiftshader-review.googlesource.com/8531Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
- 19 Jan, 2017 2 commits
-
-
Alexis Hetu authored
Fixed: - type comparison mismatch - redefined macros - unused functions - line endings Change-Id: I965ca4b887aee968e6cf95feb36c3cbf90b85580 Reviewed-on: https://swiftshader-review.googlesource.com/8528Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Change-Id: I7979eb2557a6103ad10b7be3c274fadf12d27ae7 Reviewed-on: https://swiftshader-review.googlesource.com/8508Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 18 Jan, 2017 3 commits
-
-
Nicolas Capens authored
Bug swiftshader:20 Change-Id: I67818bfe10cb29211559fb2ee047f6bec6ce46d4 Reviewed-on: https://swiftshader-review.googlesource.com/8451Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Bug swiftshader:20 Change-Id: I20c2ab7cb4c00c365520ff8b8500f7594127498b Reviewed-on: https://swiftshader-review.googlesource.com/8468Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
When we have an uninitialized variable that is declared outside of a loop and is read and written to inside the loop, we should not eliminate the load and replace it with an undefined value, because in the next iteration we want the value from the previous iteration. Change-Id: Ic996c796307f62fc835079af6c58adf1eb288259 Reviewed-on: https://swiftshader-review.googlesource.com/8488Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 17 Jan, 2017 3 commits
-
-
Nicolas Capens authored
Bug swiftshader:20 Change-Id: I81ad267d450713ffe2a5a84e1d7f7f140b515c85 Reviewed-on: https://swiftshader-review.googlesource.com/8454Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Provide default constructors for each type, and initialize the swizzle parent in a less bug prone manner. Change-Id: Ia7f406a66274c7b1737cbe82db733e2e3ab65175 Reviewed-on: https://swiftshader-review.googlesource.com/8453Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Change-Id: Ic8785bd56ac7303b0502f0303f9270a6999a1df9 Reviewed-on: https://swiftshader-review.googlesource.com/8452Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
- 16 Jan, 2017 3 commits
-
-
Nicolas Capens authored
Subzero silently allows inserting a 32-bit integer into a vector with 16-bit elements. This generates a pinsrd instruction, which requires SSE4.1, even when specifying to only support SSE2. This change emits a pinsrw instruction instead, which is SSE2. Bug swiftshader:20 Change-Id: I37bd0ebb6d9cfdd2cdef4788e89e9672386c685e Reviewed-on: https://swiftshader-review.googlesource.com/8450Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Subzero returns vNi1 type results for vector comparisons, which we were sign-extending to v4i32, even for smaller fields. We don't actually ever have to sign-extend these results. Change-Id: Ifdd30edd498d66fc4c557804035794a659eacd87 Reviewed-on: https://swiftshader-review.googlesource.com/8449Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
Subzero uses a helper function to convert uint to float. It's faster to just emit a sequence of operations to perform the cast manually. This implementation converts the lower 31 bits as a signed integer, and adds 0x80000000 as a floating-point value when the upper bit is set. This approach does not produce the correct rounding in rare cases, but should still be adequate. For consistency, we're also using this method with the LLVM back-end. Change-Id: Ic5d7b73cd2a9e154056365cdbe9af0962bdbe1cb Reviewed-on: https://swiftshader-review.googlesource.com/8312Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 13 Jan, 2017 1 commit
-
-
Nicolas Capens authored
Change-Id: I01d1e3a5464ba81440cc144ac50beae2c8b3f3c8 Reviewed-on: https://swiftshader-review.googlesource.com/8448Reviewed-by:
Nico Weber <thakis@google.com> Reviewed-by:
Nicolas Capens <capn@google.com> Tested-by:
Nicolas Capens <capn@google.com>
-
- 12 Jan, 2017 1 commit
-
-
Alexis Hetu authored
Whenever we land a SwiftShader related change in Chromium, it will look for owners of SwiftShader to make sure the cl is properly LGTMed before landing, so the file was added here. Also fixed a case typo in an rc file. Change-Id: I282a39764654a08b06320360dd66a5d877f368d3 Reviewed-on: https://swiftshader-review.googlesource.com/8428Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 10 Jan, 2017 2 commits
-
-
Nicolas Capens authored
Change-Id: Ie5f7d782764fbc40d4e3ed9cdce0110bbb9da80d Reviewed-on: https://swiftshader-review.googlesource.com/8408Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Chromium does not allow any third_party code to depend on base, so the main test runner for swiftshader's tests in chromium can't live inside the swiftshader repo. To solve this: 1) Added a test environment for swiftshader that will be used for testing in chromium. Currently, it is simply empty. 2) Split unit tests in 2 files, unittests.cpp, which will contain the tests ran by both chromium and swiftshader and main.cpp, which will be used as the swiftshader test runner, but NOT as the chromium test runner (that one will be added in chromium at the same time I do the swiftshader update). 3) The BUILD.gn file was updated to make the chromium version of the test depend on base and on the chromium version of the swiftshader test runner (swiftshader_tests_main.cc, to be added). Change-Id: I1128bb482565908bc285dcd6818d90d1d881a50e Reviewed-on: https://swiftshader-review.googlesource.com/8409Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
- 09 Jan, 2017 2 commits
-
-
Nicolas Capens authored
PNaCl does not use the Microsoft x86-64 calling convention on Windows, so the System V convention is the new default for Subzero. We need to set a compile definition to explicitly request the use of the Microsoft convention. Change-Id: Ic70f5015d4b5753aa08a1247b6ac73eb9a9d278c Reviewed-on: https://swiftshader-review.googlesource.com/8378Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-
Nicolas Capens authored
libX11 may have already been loaded (dynamically or statically) by the application. Attempting to load it again could result in a different version being loaded, causing various compatibility issues. Bug b/32880157 Change-Id: Ica8e6b1c85b82469885a20dcef31e25e6b598132 Reviewed-on: https://swiftshader-review.googlesource.com/8348Tested-by:
Nicolas Capens <capn@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <capn@google.com>
-