- 04 Jul, 2018 2 commits
-
-
Nicolas Capens authored
Exported symbols with protected visibility (change made in the next patch) have a relocation type that is incompatible with passing their address to dladdr(). Instead we can use a static local variable. Bug b/110884149 Change-Id: I3e38280276ec00913b28ff97b007490619a99f58 Reviewed-on: https://swiftshader-review.googlesource.com/19710Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
EQUAL compares numeric values. Use STREQUAL instead. Also clarify the macro for setting the export map / version script. Bug b/110884149 Change-Id: If30c31d17ad35684a8c637b3619bdd0b90be6f2d Reviewed-on: https://swiftshader-review.googlesource.com/19709Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 28 Jun, 2018 2 commits
-
-
Nicolas Capens authored
For seamless cube maps the pitch (in pixels) differs from the width, due to the border. Also renamed identicalFormats() to identicalBuffers() since much more than the format is compared to determine if the buffers should be identical. Bug swiftshader:45 Change-Id: I295557b2cb039615a624c106be3e74588463b102 Reviewed-on: https://swiftshader-review.googlesource.com/19668Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Clang treats conversion of an unsigned constant to a signed one that doesn't fit its range as an error. Make Visual Studio also produce an error. Change-Id: I2d392d5ba7765b72aa9e9478c5eee02102bdf286 Reviewed-on: https://swiftshader-review.googlesource.com/19648Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 27 Jun, 2018 1 commit
-
-
Nicolas Capens authored
Bug swiftshader:104 Change-Id: I037fcb69131906b52e0c1919f36fea61b2e1c621 Reviewed-on: https://swiftshader-review.googlesource.com/19628Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 26 Jun, 2018 2 commits
-
-
Nicolas Capens authored
Bug chromium:853424 Change-Id: I9b2de054baf6b042bcd04c5d023099a39ca20d2a Reviewed-on: https://swiftshader-review.googlesource.com/19569Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
The EGL spec allows that on context creation, a newer, compatible version is returned. OpenGL ES 3.0 is stated to be backward compatible with OpenGL ES 2.0, so we can stop creating a context that is limited to OpenGL ES 2.0 features, and always return an OpenGL ES 3.0 context. This simplifies our code and maintenance a bit and reduces the risk of incorrect validation. Note that Appendix F of the OpenGL ES 3.0 specification lists changes in behavior that aren't entirely backward compatible with OpenGL ES 2.0: * OpenGL ES 3.0 requires that all cube map filtering be seamless. OpenGL ES 2.0 specified that a single cube map face be selected and used for filtering. See section 3.8.9.1. * OpenGL ES 3.0 specifies a zero-preserving mapping when converting back and forth between signed normalized fixed-point values and floating- point values. OpenGL ES 2.0 specified a mapping by which zeros are not preserved. See section 2.1.6. * OpenGL ES 3.0 requires that framebuffer objects not be shared between contexts. OpenGL ES 2.0 left it undefined whether framebuffer objects could be shared. See appendix D. Additional differences can stem from new extensions being exposed (e.g. GL_EXT_color_buffer_float), and framebuffer configurations that are newly supported or no longer supported (in particular we allowed separate depth and stencil attachments, which OpenGL ES 3.0 expressly disallows). See also https://gitlab.khronos.org/opengl/API/issues/82 Bug swiftshader:45 Change-Id: I90d72698d509b4f03263edcf7c67e44fcef0beb6 Reviewed-on: https://swiftshader-review.googlesource.com/19388Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 22 Jun, 2018 4 commits
-
-
Alexis Hetu authored
Early returns were erroneous and were causing memory leaks Change-Id: Ifd6e37d79b6abd3f7d8d8899c951f1a0b4a66fb0 Reviewed-on: https://swiftshader-review.googlesource.com/19588Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The use of std::unordered_map was the main source of slowdowns in the optimizer code, so it was re-written without any maps. In order to do so, the information originally carried by the maps was moved to user-defined information stored within Subzero classes. The optimizer now manages the memory used to store this information. Bug swiftshader:69 Bug b/67872293 Change-Id: I2757169f0d3d467766317af6e00e149b4317fb9c Reviewed-on: https://swiftshader-review.googlesource.com/19508Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Previously we were only attempting to obtain a handle to an already loaded sibling library residing in the same directory. If it wasn't already pre-loaded, we only loaded the library by name without any directory prefix. This could lead to not finding the correct library. Also, it's fine if the directory prefix is empty, so there's no need for duplicate loops. Bug b/110407478 Change-Id: Ia55b426e58b9f4039064bba9253dae80e4fdf5cf Reviewed-on: https://swiftshader-review.googlesource.com/19549Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Added MSAN, ASAN, TSAN, and UBSAN build options. Disabled use of --no-undefined if a Santizer is used, since by design they leave some symbols unresolved until run time. UBSAN required blacklisting of our old copy of LLVM. Bug swiftshader:108 Change-Id: Iab94b6815bc188c2a7f07d5b7a461234fb1035f3 Reviewed-on: https://swiftshader-review.googlesource.com/19548Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 21 Jun, 2018 1 commit
-
-
Adrienne Walker authored
BUG=chromium:854817 Change-Id: Icd81848fbbf3691eca46c9582b3c053ba1b00353 Reviewed-on: https://swiftshader-review.googlesource.com/19528Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Adrienne Walker <enne@chromium.org>
-
- 20 Jun, 2018 2 commits
-
-
Alexis Hetu authored
ChromeOS runs tests on some bots which run on Linux, but do not support X11. In order to allow SwiftShader to successfully build on these bots, all X11 dependencies are #ifdefed behind the USE_X11 flag, which is already supplied by the Chromium build system. Change-Id: I6b914b1e662d9fbf101eb7caea7ac59e43cc7b56 Reviewed-on: https://swiftshader-review.googlesource.com/19488Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug b/110185979 Bug b/72330874 Change-Id: I593e975dca0798d027c8c5476e384eeca0fd1f7f Reviewed-on: https://swiftshader-review.googlesource.com/19428Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 18 Jun, 2018 1 commit
-
-
Alexis Hetu authored
Whenever a cube map was being used, these asserts would fire as soon as any border computation would happen. Fixed the asserts to allow cube maps to work properly. Change-Id: Iedc2661e63db37e5b4e77e08f97ce044e9f88837 Reviewed-on: https://swiftshader-review.googlesource.com/19468Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 15 Jun, 2018 2 commits
-
-
Nicolas Capens authored
When clear operations fall back to the slow path (i.e. neither fastClear nor blitReactor is used), we were copying a rectangle the size of the destination image. It should only sample within the 1x1 source pixel instead. Bug chromium:852641, chromium:851707 Change-Id: I9f247483f6167f92be8308b8470c021f5641b657 Reviewed-on: https://swiftshader-review.googlesource.com/19448Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Tom Anderson authored
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary since it's automatically added. This CL removes all remaining manual references to exe_and_shlib_deps. [1] https://chromium.googlesource.com/chromium/src.git/+/d7ed1f0a9c28c932fddc834ca5de44f28266c7f5 BUG=chromium:845700 R=capn Change-Id: I20a88d716ed4cddd55047529f87267b5383366bc Reviewed-on: https://swiftshader-review.googlesource.com/19348Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Tom Anderson <thomasanderson@google.com>
-
- 14 Jun, 2018 2 commits
-
-
Alexis Hetu authored
Optimizer::optimizeStoresInSingleBasicBlock() was taking an extremely long time due to looping through all the instructions of a single basic block at every iteration. By creating a much smaller list of only load/store operations the first time a single basic block is encountered and reusing that list when the same block is encountered again, this function now runs ~10X faster. In my test case: out/Default/cc_unittests --gtest_filter=ImageBackgroundFilter.BackgroundFilterRotated_GL The sw::optimize function went from taking almost 16s to roughly 1.5s. Bug b/67872293 Change-Id: I7e2e2aa8dc1bf2663988fb59b58d72d9ee986e36 Reviewed-on: https://swiftshader-review.googlesource.com/19408Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
SwiftShader should be able to build on Fuchsia, but it would hit a collision error if added as a dependency in Fuchsia, so the same logic currently used on MacOS could also be used to avoid the collision on Fuchsia. Change-Id: I9ac216dfc2180165a82bd5ae81c843ee4aea7ce6 Reviewed-on: https://swiftshader-review.googlesource.com/19328Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Sergey Ulanov <sergeyu@chromium.org> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 08 Jun, 2018 1 commit
-
-
Nicolas Capens authored
The parameters of the matrix constructor form an aggregate node that was passed directly to the constructor of the structure, instead of creating a one-element aggregate containing the matrix. https://github.com/mc-imperial/shader-compiler-bugs/issues/74 Bug swiftshader:56 Change-Id: Iff9a2d8dc60d79a0dde28f2aad76407028486ec8 Reviewed-on: https://swiftshader-review.googlesource.com/19308Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 05 Jun, 2018 4 commits
-
-
Alexis Hetu authored
It appears that not only render targets, but also samplers that use IOSurfaces require SwiftShader to perform synchronized draws, otherwise it seems like using a shared IOSurface's CPU memory is unsafe and can cause crashes in Layout Tests. Bug chromium:846693 Change-Id: I0ce24700d34c657ac2447ceb2f6f837bfa3a9a58 Reviewed-on: https://swiftshader-review.googlesource.com/19288Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: If953be0cce3cd11b833d9646e10ede0b31732729 Reviewed-on: https://swiftshader-review.googlesource.com/19248Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I0984f43de3846428c30232192c7ba83342b1debd Reviewed-on: https://swiftshader-review.googlesource.com/19228Reviewed-by:
Krzysztof Kosiński <krzysio@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug chromium:849217 Change-Id: I69d2269c117500d21e5d0860aed0acea212948ba Reviewed-on: https://swiftshader-review.googlesource.com/19268Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 04 Jun, 2018 2 commits
-
-
Alexis Hetu authored
Added missing function declaration. Change-Id: I52ddb666d70733187242906d298fb986f413756a Reviewed-on: https://swiftshader-review.googlesource.com/19208Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Because of the way SwiftShader is integrated into Chromium on MacOS, a synchronization issue exists when Chromium attempts to use an IOSurface before SwiftShader is done rendering into it. In order to solve this, all draw calls that end up rendering into an IOSurface must be synchronized within SwiftShader and can't yield to Chromium until rendering is complete. Bug chromium:847094 Change-Id: If2dba4fa998e7437ec414d3b4aff9e8b19ecc128 Reviewed-on: https://swiftshader-review.googlesource.com/19188Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Jun, 2018 2 commits
-
-
Nicolas Capens authored
Fixes "error: conditional expression is ambiguous; 'sw::Float' can be converted to 'RValue<sw::Float>' and vice versa". Change-Id: I2bd21036803dc54ce212df61a7520b7276b94b2a Reviewed-on: https://swiftshader-review.googlesource.com/19168Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The numeric imprecision can accumulate quickly and cause visible sampling errors. Bug chromium:848238 Change-Id: Ie41c10a0462e5b5e5c3ed5f7329ece00dab3f7f9 Reviewed-on: https://swiftshader-review.googlesource.com/19148Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Jun, 2018 1 commit
-
-
Nicolas Capens authored
On Windows, GLAPI defaults to __declspec(dllimport), while GLAPICALL is empty, leading to declaration mismatches. Either should be empty for the unit tests since we link statically, for all platforms. Change-Id: I2dde0ca35108678fd9767895e0120ee4b0d7030f Reviewed-on: https://swiftshader-review.googlesource.com/19128Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 31 May, 2018 2 commits
-
-
Nicolas Capens authored
GLAPI is the desktop OpenGL equivalent of OpenGL ES's GL_APICALL macro. They need to be consistent to prevent CLang from producing errors when compiling with -Werror,-Winconsistent-dllimport. Change-Id: Iceb73f42f52628a31aba7ce18fe60221529f890c Reviewed-on: https://swiftshader-review.googlesource.com/19108Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
https://github.com/KhronosGroup/EGL-Registry/pull/43 made eglplatform.h include X11 headers on Mac OS, which aren't pre-installed and breaks the Chrome build. https://github.com/KhronosGroup/EGL-Registry/issues/52 Change-Id: I73e3c11244a07e269684323ce76cc9700fe9c1aa Reviewed-on: https://swiftshader-review.googlesource.com/19088Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 30 May, 2018 6 commits
-
-
Nicolas Capens authored
Fixing https://github.com/KhronosGroup/OpenGL-Registry/pull/149 and https://github.com/KhronosGroup/OpenGL-Registry/pull/183 enabled including desktop OpenGL headers without conflicts, so we no longer have to define enums for ARB extensions ourselves. Change-Id: I4f2e2d3b79a6f5cacf53f2a8ace78b6d124cb5d1 Reviewed-on: https://swiftshader-review.googlesource.com/19029Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: If56e711f15236397ac0f8b15f4ca182a7b1e7c49 Reviewed-on: https://swiftshader-review.googlesource.com/19028Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Peter Collingbourne authored
This allows compilers targeting the MS ABI to select the correct inheritance model for the member function pointer field DrawCall::setupPrimitives using the complete type of Renderer. It will allow us to enable the new Clang flag -fcomplete-member-pointers globally. Bug: chromium:847724 Change-Id: Ied5859ec2f5d38b3ccf51608527506caec53f470 Reviewed-on: https://swiftshader-review.googlesource.com/19068Tested-by:
Peter Collingbourne <pcc@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
delete[] should be called on memory allocated with new[]. Change-Id: Ic21e270a7aa0e6e15132cbc3c454ea4f1e0222ea Reviewed-on: https://swiftshader-review.googlesource.com/19048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops were no longer getting unrolled because we analyzed the entire loop, not just the body, for changes to the index variable. Also, the logic was inverted. Also, be conservative about loops with return statements not being unrollable. Bug chromium:845103 Change-Id: I5957e17f7b985ae90b10053216b6945f3f64338e Reviewed-on: https://swiftshader-review.googlesource.com/19008Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Previously we only copied the GLSL shader compiler's info log on failure. This hid any warnings or debug info from the application. Bug chromium:845103 Change-Id: Ia1877a405db2017d327dfc68037596fbda1579fa Reviewed-on: https://swiftshader-review.googlesource.com/19009Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 29 May, 2018 3 commits
-
-
Nicolas Capens authored
Previously only dynamic indexing of uniforms was supported. Since this is essentially a gather operation within the register file, it is slow. We optimize the common case of using the loop index variable as relative address, where the index value would be the same for all shader invocations running in lock-step across SIMD lanes. Bug chromium:845103 Bug skia:7846 Change-Id: Idb36b512dd560d740ac9088691b633ff3a1561c1 Reviewed-on: https://swiftshader-review.googlesource.com/18968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This allows to address the registers with a vector of indices. Also rename 'dynamic' register files to 'indirect addressable', to disambiguate from 'dynamic indexing' at the shader level. Indexing with a uniform does not require gather/scatter operations, but does require indirect addressing. Bug chromium:845103 Bug skia:7846 Change-Id: I3c42be33def66328688f2900c61c80246bf1e584 Reviewed-on: https://swiftshader-review.googlesource.com/18989Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops can only be unrolled if their loop index variable is not being modified in the loop body. Also check that the increment step of the loop operates on the initial index variable. Also remove some UNIMPLEMENTED's that were benign. Bug chromium:845103 Bug chromium:843867 Bug skia:7846 Change-Id: Ib2b39f2d58763f0299ce7f6f75a8a75e6bdc7963 Reviewed-on: https://swiftshader-review.googlesource.com/18988Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-